Re: SEQUENCE and PRIMARY KEY - Mailing list pgsql-sql

From Rod Taylor
Subject Re: SEQUENCE and PRIMARY KEY
Date
Msg-id 1057234937.30368.26.camel@jester
Whole thread Raw
List pgsql-sql
> >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.

pgsql-sql by date:

Previous
From: g.o.d@zefix.tv
Date:
Subject: Weird order problem (ignoring whitespaces?)
Next
From: Bruno Wolff III
Date:
Subject: Re: Inquiry From Form [pgsql]