Search Postgresql Archives

Re: why generated columsn cannot be used in COPY TO?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 6, 2023 at 4:59 PM Rob Sargent <robjsargent@xxxxxxxxx> wrote:
What would be copied?  The formula?

Of course not. That's DDL, not DML IMHO.
 
Seems to me one is using “the fast option” so adding the column which can be regenerated is overhead.

Regenerated by whom?  COPY TO to is output to the outside world.
Nothing says it will come back to PostgreSQL later. COPY is not only for backups.
I use COPY to "stream" rows out for processing, combines the best of SELECT
and the incremental nature of CURSOR, for the best latency and throughput.

All that said, that's a work-around like Andreas showed.
I agree with Tom that ignoring them in the default list makes sense,
but that if explicitly asked for, they should be copied out. My $0.02.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux