SPI_stringtodatum SPI_datumtostring ?

Поиск
Список
Период
Сортировка
От Clark Evans
Тема SPI_stringtodatum SPI_datumtostring ?
Дата
Msg-id 36E9CB51.BDB79ADB@manhattanproject.com
обсуждение исходный текст
Ответ на RE: [HACKERS] tutorial won't compile in current tree.  ("Stupor Genius" <stuporg@erols.com>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Clark Evans
Дата:
Сообщение: GetAttributeByName
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] tutorial won't compile in current tree.