Re: [HACKERS] proposal: psql statements \gstore \gstore_binary (instead COPY RAW)
От
Pavel Stehule
Тема
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary (instead COPY RAW)
Дата
Msg-id
CAFj8pRBchJEaTKMGvko5FqCUr9BhDPdBcsBF0GRyRZUBQxwx-Q@mail.gmail.com
Ответ на
Список
Дерево обсуждения
[HACKERS] proposal: psql statements \gstore \gstore_binary (instead COPY RAW) Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary (instead COPY RAW) Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary (instead COPY RAW) Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW) Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW) Andrew Dunstan <andrew@dunslane.net>
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW) Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW) Pavel Stehule <pavel.stehule@gmail.com>
2016-12-11 18:23 GMT+01:00 Pavel Stehule <pavel.stehule@gmail.com>:
Hi2016-12-09 18:39 GMT+01:00 Pavel Stehule <pavel.stehule@gmail.com>:What do you think about this proposal?\gstore_binary ~/image.pngSELECT image FROM accounts WHERE id = xxxUsage:Now we have a statement \g for execution query, \gset for exec and store result in memory and I propose \gstore for storing result in file and \gstore_binary for storing result in file with binary passing. The query result should be one row, one column.Now I propose functionally similar solution - reduced to only to psql consoleHiLong time I am pushing a COPY RAW - without success.here is a poc patchRegardsPavelUsage:
postgres=# set client_encoding to 'latin2';
SET
Time: 1,561 ms
postgres=# select a from foo
postgres-# \gbstore ~/doc.xml
Time: 1,749 mscontent of doc.xml
<?xml version="1.0" encoding="LATIN2"?><a>příliš žluťoučký kůň se napil žluté vody</a>
second update - + doc
the export import regress tests are little bit heavy - I'll write it for loading content file together.
Regards
Pavel
PavelRegards
В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата: