On Sat, Nov 27, 2010 at 11:23:46AM -0500, Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > Where does your uniqueidentifier.so file come from? It's not a part of
> > standard PostgreSQL 9.0, and this is the part that's crashing..
>=20
> There used to be a project of that name on gborg. I can't find the
> source code anymore though.
How about
http://www.postgresql.org/ftp/projects/gborg/uniqueidentifier/stable/
> > Any chance it's a third party module that you didn't recompile for 9.0?
>=20
> The magic-block mechanism should prevent that. What I'm wondering about
> is whether the input function is (a) careless about null input and (b)
> not marked STRICT.
I think you're right:
PG_FUNCTION_INFO_V1(uniqueidentifier_out);
Datum
uniqueidentifier_out(PG_FUNCTION_ARGS)
{
char *result;
uniqueidentifier *in =3D (uniqueidentifier *) PG_GETARG_POINTER(0);
if (in =3D=3D NULL)
PG_RETURN_CSTRING (NULL);
...and...
CREATE OR REPLACE FUNCTION uniqueidentifier_in(cstring)
returns uniqueidentifier
as 'MODULE_PATHNAME'
language 'c';
It should use PG_ARGISNULL(0), no?
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com