Re: Question about function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question about function
Дата
Msg-id 16003.1016121604@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Question about function  (Bruno Lopes (Desenvolvimento) <blvieira@pcsolution.com.br>)
Список pgsql-general
Bruno Lopes (Desenvolvimento) <blvieira@pcsolution.com.br> writes:
> CREATE FUNCTION test() RETURNS bool AS 'INSERT INTO b (nome) VALUES (\'PQP\');' LANGUAGE 'sql';
> function declared to return type bool, but final query is not a retrieve

> obviously my return type is incorrect... so what should I use?

It's unhappy because you're not returning anything (no final SELECT
statement).

You might consider updating to a more recent PG version; that error
message hasn't been worded that way for quite awhile.

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Select not using primary key index
Следующее
От: Andre Radke
Дата:
Сообщение: problem with array of boxes