select only default
От | Nabil Sayegh |
---|---|
Тема | select only default |
Дата | |
Msg-id | 1053041523.979.16.camel@billy обсуждение исходный текст |
Ответы |
Re: select only default
|
Список | pgsql-novice |
Hi all, just for curiosity: Is it possible to SELECT a row that consists only of default values of a table ? Let's suppose I have a Table: CREATE TEMP TABLE tempo ( a int DEFAULT 5, b text DEFAULT 'five' ); I want as a result: (5, 'five') But without inserting a row. Is this possible with 1 query ? I thought of something like OUTER JOINS where you get defaults for non-existing rows, too. What I need this for ? I want to present users a form for inserting new rows. The form should be loaded with default values. Of course I can do it without SQL, but I thought, hey, that'd be cool in plain SQL. BTW: The DEFAULT values are all 'simple' types, no serials etc. included TIA -- e-Trolley Sayegh & John, Nabil Sayegh Tel.: 0700 etrolley /// 0700 38765539 Fax.: +49 69 8299381-8 PGP : www.e-trolley.de
В списке pgsql-novice по дате отправления: