Re: COPY enhancements

From: Pierre Frédéric Caillaud <lists(at)peufeu(dot)com>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Emmanuel Cecchet" <manu(at)asterdata(dot)com>, "Josh Berkus" <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY enhancements
Date: 2009-09-11 15:32:40
Message-ID: op.uz3msqm9cke6l8@soyouz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I was thinking something like:
>
> COPY tablename [ ( column [, ...] ) ] FROM { 'filename' | STDIN }
> [WITH] [option [, ...]]
>
> Where:
>
> option := ColId [Sconst] | FORCE NOT NULL (column [,...])
>
> I don't see any reasonable way to sandwhich the FORCE NOT NULL syntax
> into a keyword/value notation.

Postgres has a hstore data type which seems well suited for passing
key/value option pairs...
Why another syntax to remember, another parser to code, when almost
everything is already there ?

Think about plpgsql code which generates some SQL COPY command string,
then this is parsed and executed... wouldn't it be a lot simpler to just
manipulate parameters in a hstore ?...

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-09-11 15:33:38 Re: COPY enhancements
Previous Message Tom Lane 2009-09-11 15:29:22 Re: RfD: more powerful "any" types