Search Postgresql Archives

On enforcing default column value, AKA "Bloody nulls"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all!
In a scenario like this:

> =# create table tab1(text1 text default 'from table');
>  
> =# create procedure ins_tab1(p_text1 text default 'from proc') language sql as
> -# $$
> $# insert into tab1(text1) values (p_text1);
> $# $$;
>
> =# call ins_tab1 (null);
>
> =#  select * from tab1 ;
>  text1
> --------
>  [nUlL]

Is there a way (apart from triggers) to force at least one of the default values?

Thanks!



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux