Re: Version 1 Calling convention

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Version 1 Calling convention
Дата
Msg-id 20060830100955.GK13929@svana.org
обсуждение исходный текст
Ответ на Re: Version 1 Calling convention  ("Jasbinder Bali" <jsbali@gmail.com>)
Список pgsql-general
On Wed, Aug 30, 2006 at 06:05:18AM -0400, Jasbinder Bali wrote:
> Does that mean if I am passing a char value to the version 1 function from a
> function in the database then in the version 1 function it needs to be
> treated as text*??

It depends on what type you're passing:

char    -> PG_GETARG_CHAR     => char
cstring -> PG_GETARG_CSTRING  => char*
text    -> PG_GETARG_TEXT_P   => text*

What type is it in SQL terms? That tells you what type you use at the C
level.

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.

Вложения

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

Предыдущее
От: "Jasbinder Bali"
Дата:
Сообщение: Re: Version 1 Calling convention
Следующее
От: Pantelis Natsiavas
Дата:
Сообщение: Encoding problem