From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Maximilian Tyrtania" <maximilian(dot)tyrtania(at)onlinehome(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Select default values |
Date: | 2008-07-23 09:28:54 |
Message-ID: | 162867790807230228s46d7d3dof8292934c2c894f4@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello
2008/7/23 Maximilian Tyrtania <maximilian(dot)tyrtania(at)onlinehome(dot)de>:
> Hi there, just a quickie: Is there a way to select all default values of a
> given table? Something like "Select Default values from sometable" ?
> Unfortunately this syntax doesn't seem to be supported. I know i can select
> the default values for each column, but being able to select them in one go
> would be handy...
it's not possible directly, you can find expressions used as default
in system tables or
postgres=# create table f(a integer default 1, b integer);
CREATE TABLE
postgres=# insert into f(a,b) values(default, default) returning *;
a | b
---+---
1 |
(1 row)
INSERT 0 1
regards
Pavel Stehule
>
> tia,
>
> Maximilian Tyrtania
>
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
From | Date | Subject | |
---|---|---|---|
Next Message | Maximilian Tyrtania | 2008-07-23 09:49:25 | Re: Select default values |
Previous Message | A. Kretschmer | 2008-07-23 09:26:55 | Re: Select default values |