| От | Thomas Kellerer |
|---|---|
| Тема | "Named" column default expression |
| Дата | |
| Msg-id | j8dlju$4g9$1@dough.gmane.org обсуждение |
| Ответы |
Re: "Named" column default expression
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера