SPI_stringtodatum SPI_datumtostring ?

From: Clark Evans <clark(dot)evans(at)manhattanproject(dot)com>
To: Pgsql-Hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: SPI_stringtodatum SPI_datumtostring ?
Date: 1999-03-13 02:20:01
Message-ID: 36E9CB51.BDB79ADB@manhattanproject.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was looking at the tutorial code (funcs.c) a bit more
and it seems that a bulk of the work going on for the
"copytext" and "concat16" (soon to be defunct *smile* )
is converting from string to datum and then back again.

Perhaps if two functions were added to the SPI that
did this operation...

Datum SPI_stringtodatum(const char *type, const char *data);
const char *SPI_datumtostring(Datum data);

These two functions would lookup the type in the
type table, find the input/output functions for
the datatype and make the call.

Thoughts?

Clark

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-03-13 02:25:42 Re: [HACKERS] tutorial won't compile in current tree.
Previous Message Clark Evans 1999-03-13 01:32:31 GetAttributeByName