Re: Added tab completion for the missing options in copy statement

Поиск
Список
Период
Сортировка
От vignesh C
Тема Re: Added tab completion for the missing options in copy statement
Дата
Msg-id CALDaNm2RStfEuLEHLhrGxAVQqU=odbofOCKAxaHgPY15e8G7DQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Added tab completion for the missing options in copy statement  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Added tab completion for the missing options in copy statement  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Sat, Jul 18, 2020 at 4:36 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Sat, Jul 18, 2020 at 04:12:02PM +0530, vignesh C wrote:
> > Can we specify Insert/Update or delete with copy?
> > When I tried few scenarios I was getting the following error:
> > ERROR:  COPY query must have a RETURNING clause
> >
> > I might be missing some scenarios, just wanted to confirm if this is
> > kept intentionally.
>
> This error message says it all, this is supported for a DML that
> includes a RETURNING clause:
> =# create table aa (a int);
> CREATE TABLE
> =# copy (insert into aa values (generate_series(2,5)) returning a)
>      to '/tmp/data.txt';
> COPY 4
> =# \! cat /tmp/data.txt
> 2
> 3
> 4
> 5
>

Thanks Michael for the clarification, the patch looks fine to me.


Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: vignesh C
Дата:
Сообщение: Patch for nodeIncrementalSort comment correction.
Следующее
От: vignesh C
Дата:
Сообщение: Re: Add header support to text format and matching feature