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

From: Chris Curvey <chris(at)chriscurvey(dot)com>
To: Khangelani Gama <kgama(at)argility(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: 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: 2014-03-28 11:50:29
Message-ID: CADfwSsDxgw-keXKkRpfcKvJNwLWFq8bTfE4Yfw9yUefO9o6Qkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 28, 2014 at 5:56 AM, Khangelani Gama <kgama(at)argility(dot)com> wrote:

> Hi Chris or anyone who can help
>
>
>
> When I try this just below, it complains about foo , 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;
>
>
>

you need to replace "foo" and "bar" with the names of your tables.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Khangelani Gama 2014-03-28 11:59:03 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
Previous Message Alban Hertroys 2014-03-28 11:23:13 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