Search Postgresql Archives

Re: Why UPDATE gl SET gl.glnum = gl.glnum; cause error when UPDATE gl

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

 



David Gagnon <dgagnon@xxxxxxxxxx> writes:

> update test set id=test2.id from test2 where id=test2.id;
>
> ERROR:  column reference "id" is ambiguous

It's complaining about the second use of "id", which could mean either
"test2.id" (which would be a self-join) or "test.id" (which is what
you want).

-Doug

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[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