Re: [BUGS] constraints & tableoid [pgsql8.1]

2006-04-11 Thread 姜维
Tom Lane 写道: > Michael Fuhr <[EMAIL PROTECTED]> writes: > >> Apparently a new row's tableoid isn't set until the row is actually >> inserted. >> > > I believe that's true of all the system columns. If you're using oid, > for example, that's not assigned either until heap_insert(). > > This

Re: [BUGS] constraints & tableoid [pgsql8.1]

2006-04-11 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Apparently a new row's tableoid isn't set until the row is actually > inserted. I believe that's true of all the system columns. If you're using oid, for example, that's not assigned either until heap_insert(). This behavior doesn't seem unreasonable to

Re: [BUGS] constraints & tableoid [pgsql8.1]

2006-04-11 Thread Michael Fuhr
On Tue, Apr 11, 2006 at 03:11:46PM +0800, ??? ??? wrote: > jw=# CREATE TABLE base ( CHECK (tableoid = 'base'::regclass) ); > CREATE TABLE > jw=# \d base > Table "public.base" > Column | Type | Modifiers > +--+--- > Check constraints: > "base_tableoid_check" CHECK (table

Re: [BUGS] constraints & tableoid [pgsql8.1]

2006-04-11 Thread Richard Huxton
维 姜 wrote: jw=# CREATE TABLE base ( CHECK (tableoid = 'base'::regclass) ); CREATE TABLE jw=# \d base Table "public.base" Column | Type | Modifiers +--+--- Check constraints: "base_tableoid_check" CHECK (tableoid = 'base'::regclass::oid) jw=# INSERT INTO base DEFAULT

[BUGS] constraints & tableoid [pgsql8.1]

2006-04-11 Thread 维 姜
jw=# CREATE TABLE base ( CHECK (tableoid = 'base'::regclass) ); CREATE TABLE jw=# \d base Table "public.base" Column | Type | Modifiers +--+--- Check constraints: "base_tableoid_check" CHECK (tableoid = 'base'::regclass::oid) jw=# INSERT INTO base DEFAULT VALUES ; ERRO