From: Rod Taylor <rbt@rbt.ca>
To: Dani Oderbolz <oderbolz@ecologic.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: SEQUENCE and PRIMARY KEY
Date: 03 Jul 2003 08:22:17 -0400
Message-ID: <1057234937.30368.26.camel@jester> (raw)
In-Reply-To: <3F03E3B6.80807@ecologic.de>
References: <200307021730.23659.ralf.werny@gmx.de>
<1057160585.90653.88.camel@jester>
<3F03E3B6.80807@ecologic.de>
> >A trigger (maybe a rule) is the way to go about this.
> >
> >The alternative is to teach the bad clients to use DEFAULT rather than
> >NULL when they expect the GENERATOR to create the value for them.
> >
> Hmm, Rod, there really seems a demand for the GENERATOR feature :-)
> Do you see any performance problems with a trigger instead of a default?
> I cant imagine that its so much of a difference (ok, depending on the
> trigger, a
> lookup in the catalog is needed, but still it should be fast enough, right?)
A trigger written in C will have similar speeds as processing the
default. Plpgsql isn't that slow, but it is slower -- probably not
noticeably for this operation.
Attachments:
signature.asc (application/pgp-signature, 186B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rbt@rbt.ca, oderbolz@ecologic.de
Subject: Re: SEQUENCE and PRIMARY KEY
In-Reply-To: <1057234937.30368.26.camel@jester>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox