Search Postgresql Archives

Re: visibility rule in a EXECUTE with multi sql

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

 



laser <laserlist@xxxxxxxxxxx> writes:
>  when I do a:

>  execute 'set search_path to bar; create table foo(f1 int);insert into 
> table foo blah..blah;'

> in plpgsql, I found that the insert statement always report that "can't 
> found table foo" or something
> like that.

Well, yeah.  The whole string is parsed, then executed, so you are
trying to parse the insert before foo exists.  Break it into multiple
EXECUTEs.  Or maybe you want "create table as select ...".

			regards, tom lane


[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