agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: surafel3000@gmail.com
Cc: cmt@burggraben.net
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: COPY FROM WHEN condition
Date: Thu, 11 Oct 2018 17:35:05 +0200
Message-ID: <20181011153505.GL6157@fetter.org> (raw)
In-Reply-To: <CADkLM=dmvGSpZ+h_CzFoGeuzH7mZT3TLttx-ikc+UYw_e6L2jg@mail.gmail.com>
References: <CALAY4q_DdpWDuB5-Zyi-oTtO2uSk8pmy+dupiRe3AvAc++1imA@mail.gmail.com>
	<20181011085925.5zopu7jvxzs5c4xq@squirrel.exwg.net>
	<CALAY4q__47MCCgspPVETAeSpJYfaYGpwH2diDGp5KjfSxTma4A@mail.gmail.com>
	<CADkLM=dmvGSpZ+h_CzFoGeuzH7mZT3TLttx-ikc+UYw_e6L2jg@mail.gmail.com>

On Thu, Oct 11, 2018 at 05:12:48AM -0400, Corey Huinker wrote:
> On Thu, Oct 11, 2018 at 5:04 AM Surafel Temesgen <surafel3000@gmail.com>
> wrote:
> 
> >
> >
> > On Thu, Oct 11, 2018 at 12:00 PM Christoph Moench-Tegeder <
> > cmt@burggraben.net> wrote:
> >
> >> You can:
> >>   COPY ( query ) TO 'filename';
> >>
> > it is for COPY FROM
> >
> > regards
> > Surafel
> >
> 
> It didn't get far, but you may want to take a look at a rejected patch for
> copy_srf() (set returning function)
> https://www.postgresql.org/message-id/CADkLM%3DdoeiWQX4AGtDNG4PsWfSXz3ai7kY%3DPZm3sUhsUeev9Bg%40mail...
> https://commitfest.postgresql.org/12/869/
> 
> Having a set returning function gives you the full expressiveness of SQL,
> at the cost of an extra materialization step.

I wonder whether something JIT-like could elide this. A very
interesting subset of such WHEN clauses could be pretty
straight-forward to implement in a pretty efficient way.

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate




view thread (90+ messages)  latest in thread

Message-ID: <20181011153505.GL6157@fetter.org>
Permalink:  ../20181011153505.GL6157@fetter.org/
Also on:    postgresql.org/message-id/20181011153505.GL6157@fetter.org

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: david@fetter.org, corey.huinker@gmail.com, surafel3000@gmail.com, cmt@burggraben.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: COPY FROM WHEN condition
  In-Reply-To: <20181011153505.GL6157@fetter.org>

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

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