Search Postgresql Archives

Re: Using Insert - Default in a condition expression ??

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

 



>
> I'm trying to write an INSERT INTO statement that will use a DEFAULT
> value when an input parameter is null.
>   
Neither of my 2 methods are pretty.
1) Use a trigger.
2) Grab and cast the default value from the information_schema.columns
view and plug it in.

Another option is to build your insert sql as a string and then execute it.

Sim

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux