Search Postgresql Archives

Re: Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

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

 



On 28 March 2014 11:07, Khangelani Gama <kgama@xxxxxxxxxxxx> wrote:
> Hi Chris or anyone who can help
>
> When I try this just below, it complains about foo (new table created in
> db2) , saying ERROR: schema foo does not exist. I got stuck on this error
> for a while now but still trying to see why but still no luck so far. If you
> have something please help
>
> begin;
>
> update foo
> set br_desc = bar.br_desc
> , br_active = bar.br_active
> (rest of columns)
> where foo.br_cde = bar.br_cde;

Really? I would have expected ERROR: table or schema bar does not exist.

Look up the syntax for UPDATE FROM.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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