Re: request for advise

From: Justin Clift <justin(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Brian Hirt <bhirt(at)mobygames(dot)com>, 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-06 08:05:25
Message-ID: 3BE799C5.62D8031B@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
>
> "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?

I think re-wording the error message is the way to go here. It's easy
and doesn't unexpectedly change functionality.

:-)

Regards and best wishes,

Justin Clift

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carlo F. Florendo 2001-11-06 08:12:13 pg_dump error
Previous Message Jean-Michel POURE 2001-11-06 08:02:06 Re: functions, shell script