Re: pg_type defaults
От | Stephan Szabo |
---|---|
Тема | Re: pg_type defaults |
Дата | |
Msg-id | 20020220082253.U836-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | pg_type defaults ("Rod Taylor" <rbt@zort.ca>) |
Список | pgsql-hackers |
On Wed, 20 Feb 2002, Rod Taylor wrote: > According to the system table documentation > http://developer.postgresql.org/docs/postgres/catalog-pg-type.html the > typdefault information is to be copied from the pg_type value to the > table value when the default specified is NULL or a default is not > specified. > > The below shows that it's not to be true. > > > junk=# update pg_type set typdefault = 3 where typname = 'int2'; > UPDATE 1 > junk=# create table example (col1 int2); > CREATE > junk=# \d example > Table "example" > Column | Type | Modifiers > --------+----------+----------- > col1 | smallint | Seems to work for me :) insert into example default values; select * from example; col1 ------ 3 It doesn't show up in \d, but it is the default. I'd also say this makes sense/is right since the type's default is 3 and you don't have a default on the table.
В списке pgsql-hackers по дате отправления: