Re: raw output from copy

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
Subject: Re: raw output from copy
Date: 2016-12-05 13:45:41
Message-ID: CAFj8pRDptPJAiP4kqaHXd_f1dx9ht5F9mwPgDxd8+2yYO=sSSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2016-12-05 14:19 GMT+01:00 Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>:

> Sorry for my late response.
>
> I've briefly checked a series of discussion in the past.
> I understood the target/purpose of this patch is provision of a fast
> interface
> to import/export a particular cell of a relation, by skip of text<->binary
> transformation. Its typical use case are XML and JSON data types. Right?
>

There are more goals:

1. user friendly import of text or binary data - import text data (with
psql) from file is possible - but you have to load a content to psql
variable. For binary data you should to use workaround based on LO and
transformation from LO to bytea.

2. user friendly export text or binary data - now, the binary data can be
exported only via transformation to LO. The XML has very interesting
features when is passing from/to client binary. This feature is impossible
in psql now.

>
> If so, how about the idea to use fast-path invocation protocol to call
> functions
> to import/export these document types?
> It allows to accept binary form of the data stream, with minimum overheads.
>

Sorry, I don't see a sense - for Fast API I have to write a application -
and then I can write a application with support of binary passing.

>
> It seems to me extend of COPY statement for this optimization is a bit
> overkill
> solution. Do we find out an alternative solution that we can build on
> the existing
> infrastructure?
>

The advantage and sense of COPY RAW was reusing existing interface. The
question was: How I can export/import binary data simply from psql console?

Regards

Pavel

>
> Best regards,
>
> 2016-12-05 14:16 GMT+09:00 Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>:
> >
> >
> > On Tue, Nov 22, 2016 at 10:48 PM, Haribabu Kommi <
> kommi(dot)haribabu(at)gmail(dot)com>
> > wrote:
> >>
> >> Hi,
> >>
> >> This is a gentle reminder.
> >>
> >> you assigned as reviewer to the current patch in the 11-2016 commitfest.
> >> But you haven't shared your review yet. Please share your review about
> >> the patch. This will help us in smoother operation of commitfest.
> >>
> >> Please Ignore if you already shared your review.
> >
> >
> > Patch is not applying properly to HEAD.
> > Moved to next CF with "waiting on author" status.
> >
> >
> > Regards,
> > Hari Babu
> > Fujitsu Australia
>
>
>
> --
> KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-12-05 13:59:25 Re: commitfest 2016-11 status summary
Previous Message Kohei KaiGai 2016-12-05 13:19:32 Re: raw output from copy