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
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
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
维 姜 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
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