Search Postgresql Archives

"select ..... for update of ..." doesn't support full qualified table name?

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

 



CREATE SCHEMA one;
CREATE TABLE one.aa ( a INT );
CREATE SCHEMA two;
CREATE TABLE two.bb ( b INT );
SELECT * FROM one.aa, two.bb WHERE one.aa.a = two.bb.b FOR UPDATE OF one.aa;

ERROR:  syntax error at or near "." at character 73 (points to the
last instance of "one.aa" in SQL query)

p.s. in our application we actually have the same table names but in
different schemas, so avoiding using of schema name in table reference
is not possible, so actual select looks like this:

CREATE TABLE one.t ( a INT );
CREATE TABLE two.t ( b INT );
SELECT * FROM one.t, two.t WHERE one.t.a = two.t.b FOR UPDATE OF one.t;

-- 
Vlad

---------------------------(end of broadcast)---------------------------
TIP 4: 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