Re: Huh? Mysterious Function Error - Mailing list pgsql-sql

From Tom Lane
Subject Re: Huh? Mysterious Function Error
Date
Msg-id 15771.982690612@sss.pgh.pa.us
Whole thread Raw
In response to Huh? Mysterious Function Error  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Josh Berkus <josh@agliodbs.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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: now() with microsecond granulity needed
Next
From: Stephan Szabo
Date:
Subject: Re: Huh? Mysterious Function Error