Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?

From: Zoltan Boszormenyi <zboszor(at)dunaweb(dot)hu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?
Date: 2007-03-01 05:03:12
Message-ID: 45E65E90.3070401@dunaweb.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I would like to be able to harden the conditions
of generating IDENTITY columns so the
events below run in this order:

- assign values for regular columns (with or without DEFAULT)
- NOT NULL checks on regular columns
- CHECK constraints whose expression contains only regular columns

- assign values for GENERATED columns
- NOT NULL checks on GENERATED columns
- CHECK constraints whose expression may contain regular
or GENERATED columns

- UNIQUE index checks that has only regular columns
- UNIQUE index checks that may have regular or GENERATED columns

- assign values for IDENTITY column
- NOT NULL on IDENTITY
- CHECK constraints on IDENTITY
- UNIQUE index checks that can reference IDENTITY column

At this point the heap tuple and the index tuple can be inserted
without further checks.

Currently tuple->t_self is required by ExecInsertIndexTuples()
and I don't see any way to make IDENTITY work the way it's
intended but to mix heap_insert()/heap_update() and
ExecInsertIndexTuples() together and use the result in
ExecInsert() and ExecUpdate().

Would it be acceptable?

Best regards,
Zoltán Böszörményi

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2007-03-01 05:20:07 Re: COMMIT NOWAIT Performance Option
Previous Message Galy Lee 2007-03-01 04:48:50 Re: Resumable vacuum proposal and design overview