On Thu, Oct 12, 2006 at 06:58:52PM -0400, Tom Lane wrote:
> I wrote:
> > aggregate_state would have no other uses in the system, and its input
> > and output functions would raise an error, so type safety is assured
> > --- there would be no way to call either the sfunc or ffunc "manually",
> > except by passing a NULL value, which should be safe because that's what
> > they'd expect as the aggregate initial condition.
> Um, no, I take that back, unless you want to invent a separate
> pseudotype for each such aggregate.  Otherwise you can crash it with


What this really calls for is a type that users are forbidden to
interact with directly. Basically, the type may only be used by C
functions and such C functions may not appear in an SQL query.

Seems the only way to safely deal with datums you don't know the
representation of.

The name "internal" would be nice, but it's taken :(

Have a nice day,
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to