pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Nicolas Paris <niparisco@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: New Copy Formats - avro/orc/parquet
Date: Sun, 11 Feb 2018 17:48:13 -0500
Message-ID: <18464.1518389293@sss.pgh.pa.us> (raw)
In-Reply-To: <20180211211235.5x3jywe5z3lkgcsr@alap3.anarazel.de>
References: <20180210151304.fonjztsynewldfba@gmail.com>
	<20180211211235.5x3jywe5z3lkgcsr@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> So, I think making COPY extensible would be quite beneficial. I'm
> however quite doubtful that we want to add core code to handle all of
> the above. I think we should make the COPY input/output formatting
> extensible by extensions.

+1.  I can't see carrying code for these formats in-core, but I've
no objection to making it possible for someone else to maintain them.

> I imagine we'd have callbacks for
> - start copy in / out
> - output row, with a an array of values/nulls
> - parse row, with a input buffer as argument, returning values / nulls arrays
> - finish copy in / out

Also something to allow absorbing format-specific options, if the
precedent of CSV is anything to go by.  (Any such patch should manage
to turn COPY-CSV into an extension, at least so far as copy.c is
concerned, even if we don't package it as one.)

			regards, tom lane




view thread (20+ messages)  latest in thread

Message-ID: <18464.1518389293@sss.pgh.pa.us>
Permalink:  ../18464.1518389293@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18464.1518389293@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, niparisco@gmail.com
  Subject: Re: New Copy Formats - avro/orc/parquet
  In-Reply-To: <18464.1518389293@sss.pgh.pa.us>
  References: <20180210151304.fonjztsynewldfba@gmail.com> <20180211211235.5x3jywe5z3lkgcsr@alap3.anarazel.de> <18464.1518389293@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox