| From: | "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com> |
|---|---|
| To: | Waldomiro <waldomiro(at)shx(dot)com(dot)br> |
| Cc: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: INSERT OU UPDATE WITHOUT SELECT? |
| Date: | 2006-05-30 21:05:17 |
| Message-ID: | 36e682920605301405u4d665fcftbe0a97b5753f5209@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On 5/30/06, Waldomiro <waldomiro(at)shx(dot)com(dot)br> wrote:
> Is there a command to Insert a record If It does not exists and a update if
> It exists?
Sure, it's called MERGE. See http://en.wikipedia.org/wiki/Merge_%28SQL%29
> I mean the postgres should test if a record exist before insert and if It
> exist then the postgres must do an update instead an insert.
PostgreSQL does not support MERGE at the moment, sorry.
--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 2nd Floor | jharris(at)enterprisedb(dot)com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ragnar | 2006-05-30 21:53:20 | Re: Split select completes, single select doesn't and |
| Previous Message | Jonathan Blitz | 2006-05-30 21:04:48 | Re: Adding and filling new column on big table |