Re: request for advise

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brian Hirt" <bhirt(at)mobygames(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, "Brian A Hirt" <bhirt(at)berkhirt(dot)com>, Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: Re: request for advise
Date: 2001-11-05 18:08:19
Message-ID: 23109.1004983699@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Brian Hirt" <bhirt(at)mobygames(dot)com> writes:
> I tried writing a function to
> recursively delete the list but it fails with "ERROR: unexpected SELECT
> query in exec_stmt_execsql()"

If you want to evaluate a SQL query and discard the results, plpgsql
wants you to say "PERFORM foo", not "SELECT foo".

Enough people have been confused by this that I think we ought to do
something: either allow SELECT with no destination, or at least reword
the error message to mention PERFORM.

Comments?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message X 2001-11-05 18:13:15 copy command with PSQL
Previous Message qradius 2001-11-05 18:02:05 about quotes on stored procedures