> >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.