Re: Question about function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Lopes (Desenvolvimento) <blvieira(at)pcsolution(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about function
Date: 2002-03-14 16:00:04
Message-ID: 16003.1016121604@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruno Lopes (Desenvolvimento) <blvieira(at)pcsolution(dot)com(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andre Radke 2002-03-14 16:00:20 problem with array of boxes
Previous Message Stephan Szabo 2002-03-14 15:54:47 Re: Select not using primary key index