Create or replace row in table

From: "Charles Holleran " <scorpdaddy(at)hotmail(dot)com>
To: "pgsql-novice(at)postgresql(dot)org " <pgsql-novice(at)postgresql(dot)org>
Subject: Create or replace row in table
Date: 2010-09-02 01:37:44
Message-ID: BAY126-DS15221FA4E1828549ADF497CE8C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Please pardon the total nubie question.

There is a nice syntax for functions, "CREATE OR REPLACE FUNCTION xyz ..."

What is the best syntax to create or replace a row in a table?

Specifically: Update row in table t if row exists in table t else insert row in table t with source rows from temporary table s of same type as t.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Mladen Gogala 2010-09-02 03:53:52 Re: Create or replace row in table
Previous Message Chris Browne 2010-09-01 22:19:51 Re: Installing temporal "period" data type and support functions