Re: Huh? Mysterious Function Error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: sqllist <pgsql-sql(at)postgresql(dot)org>, Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: Re: Huh? Mysterious Function Error
Date: 2001-02-20 17:36:52
Message-ID: 15771.982690612@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> ERROR: unexpected SELECT query in exec_stmt_execsql()

plpgsql doesn't think you should execute bare SELECTs, only SELECT INTO.

On reflection this seems an overly anal-retentive restriction, since
there are cases where one might execute a SELECT for its side effects
alone ("SELECT setval()" comes to mind).

Jan, do you think there's a good case for refusing plain SELECTs?

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-02-20 17:48:42 Re: Huh? Mysterious Function Error
Previous Message Tom Lane 2001-02-20 16:57:42 Re: now() with microsecond granulity needed