Re: COPY FROM WHEN condition

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: david(at)fetter(dot)org
Cc: nasbyj(at)amazon(dot)com, surafel3000(at)gmail(dot)com, cmt(at)burggraben(dot)net, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: COPY FROM WHEN condition
Date: 2018-11-03 02:53:05
Message-ID: CADkLM=cXsL20mMR2aXgxmhzn6Hi2SM7xGXMAqLU_2Mu_ubY_9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> > SELECT x.a, sum(x.b)
> > FROM ( COPY INLINE '/path/to/foo.txt' FORMAT CSV ) as x( a integer, b
> numeric, c text, d date, e json) )
>
> Apologies for bike-shedding, but wouldn't the following be a better
> fit with the current COPY?
>
> COPY t(a integer, b numeric, c text, d date, e json) FROM
> '/path/to/foo.txt' WITH (FORMAT CSV, INLINE)
>

+1 Very much a better fit.

>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-11-03 03:07:31 Re: pgbench -M option can be specified more than once
Previous Message Andres Freund 2018-11-03 01:28:40 Re: pgbench -M option can be specified more than once