Can't get upsert working. - Mailing list pgsql-sql

From Bert
Subject Can't get upsert working.
Date
Msg-id CAFCtE1=xUHzWQcpBQ7tSxFfQwJO-Pay2jFyfWHZ5dPDuAPhnEg@mail.gmail.com
Whole thread Raw
Responses Re: Can't get upsert working.
List pgsql-sql
<br clear="all" />Hello, <br /><br />Anyone here with upsert experience? <br /><br />I'm trying to run this query:<br
/><br/>WITH UPSERT AS<br />  (UPDATE oltp.ST_TRANSACTION<br />   SET (row1,<br />    row2,<br />    row3) =
(ET.row1,<br/>          ET.row2,<br />          ET.row3)<br />   FROM<br />     (SELECT *<br />      FROM
loadoltp.ST_TRANSACTION_INSERT<br/>      WHERE LOADTABLETIME = '2012-11-30 14:48:59.252960') AS ET returning *)<br
/>INSERTINTO oltp.ST_TRANSACTION<br />SELECT (ET.row1,<br />     ET.row2,<br />    ET.row3)<br />FROM<br />   (SELECT
*<br/>   FROM loadoltp.ST_TRANSACTION_INSERT<br />   WHERE LOADTABLETIME = '2012-11-30 14:48:59.252960') AS ET<br
/>WHEREET.tick_server_id NOT IN<br />    (SELECT ET.tick_server_id<br />      FROM upsert b)<br />  AND tra_id NOT
IN<br/>    (SELECT ET.tra_id<br />     FROM upsert b)<br /><br />But I always get this error message:<br />ERROR: 
column"row1" is of type integer but expression is of type record<br /> LINE 67: SELECT (ET.ROW1,<br /><br />Does anyone
hasan idea? <br /><br />wkr,<br />Bert<br clear="all" /><br />-- <br />Bert Desmet<br />0477/305361<br /> 

pgsql-sql by date:

Previous
From: Sebastian P. Luque
Date:
Subject: Re: \copy multiline
Next
From: Jasen Betts
Date:
Subject: Re: Can't get upsert working.