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 name in 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 there is a way to retrieve that information once the table is created.
Thanks
Thomas