Re: mysql replace in postgreSQL?

From: Bricklen Anderson <bricklen(at)shaw(dot)ca>
To: blackwater dev <blackwaterdev(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: mysql replace in postgreSQL?
Date: 2005-10-29 03:12:24
Message-ID: 4362E898.6050303@shaw.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

blackwater dev wrote:
> In MySQL, I can use the replace statement which either updates the
> data there or inserts it. Is there a comporable syntax to use in
> postgreSQL?
>
> I need to do an insert and don't want to have to worry about if the
> data is already there or not...so don't want to see if it there, if so
> do update if not insert...etc.
>
> Thanks.
>

In Oracle this is called the MERGE statement, but it not yet in pg. It
is on the TODO list, though.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kostas Maistrelis 2005-10-29 08:21:08 Re: mysql replace in postgreSQL?
Previous Message Joshua D. Drake 2005-10-29 02:18:29 Re: Installation trouble -- oops