Search Postgresql Archives

Re: 'Select INTO" in Execute (dynamic query )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Dinesh Pandey" <dpandey@xxxxxxxx> writes:
> What's wrong with this code (ERROR:  syntax error at or near "INTO" at
> character 8)?

You can't use plpgsql's SELECT INTO in an EXECUTE'd command, because
SELECT INTO means something entirely different to the main SQL engine.

The usual workaround is to use FOR ... IN EXECUTE.  See the plpgsql docs.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux