Re: RETURNING syntax for COPY

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: "Jonathan S(dot) Katz" <jonathan(dot)katz(at)excoventures(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Karol Trzcionka <karlikt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RETURNING syntax for COPY
Date: 2013-05-08 19:38:10
Message-ID: 518AA9A2.4030204@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 05/08/2013 03:23 PM, Jim Nasby wrote:
>> WITH new_data AS (
>> COPY FROM ...
>> RETURNING id, field_to_check
>> )
>

Why is this better than this, which you can do today?

WITH new_data AS (
INSERT into ... FROM foreign_table_with_file_fdw RETURNING ...
)

The whole reason I abandoned trying to do this sort of thing with COPY
was that I realized the FDW would provide what I wanted.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Kelly 2013-05-08 19:44:40 Re: RETURNING syntax for COPY
Previous Message Jim Nasby 2013-05-08 19:32:02 Re: about index inheritance