"Named" column default expression - Mailing list pgsql-general

From Thomas Kellerer
Subject "Named" column default expression
Date
Msg-id j8dlju$4g9$1@dough.gmane.org
Whole thread Raw
Responses Re: "Named" column default expression  (Thom Brown <thom@linux.com>)
List pgsql-general
Hello,

I just noticed that Postgres allows the following syntax:

create table foo
(
     id integer constraint id_default_value default 42
);

But as far as I can tell the "constraint id_default_value" part seems to be only syntactical sugar as this is stored
nowhere.At least I couldn't find it going through the catalog tables and neither pg_dump -s or pgAdmin are showing that
namein the generated SQL source for the table. 

It's not important, I'm just curious why the syntax is accepted (I never saw a default value as a constraint) and if
thereis a way to retrieve that information once the table is created. 

Thanks
Thomas

pgsql-general by date:

Previous
From: Mohamed Hashim
Date:
Subject: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!
Next
From: Radosław Smogura
Date:
Subject: Re: Server hitting 100% CPU usage, system comes to a crawl.