Re: return varchar from C function

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: return varchar from C function
Дата
Msg-id 20070218150855.GB6828@svana.org
обсуждение исходный текст
Ответ на return varchar from C function  ("scotty@linuxtime.it" <scotty@linuxtime.it>)
Список pgsql-hackers
On Sun, Feb 18, 2007 at 12:56:08PM -0500, scotty@linuxtime.it wrote:
> Hi,
> just for fun, I wrote a little postgresql contrib,
> who has a C function called myfun inside it.
> The function myfun returns a value , now I return
> a cstring type value, and it works fine if
> I run from psql shell:

You don't provide the definition you used, but:

> select value from myfun(paramteres);

This isn't the usual way to return things, unless it is a set returning
function. Did you provide the return type at declaration time?

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-hackers по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: return varchar from C function
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: return varchar from C function