Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group