Re: COPY enhancements - Mailing list pgsql-hackers

From Pierre Frédéric Caillaud
Subject Re: COPY enhancements
Date
Msg-id op.uz3msqm9cke6l8@soyouz
Whole thread Raw
In response to Re: COPY enhancements  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: COPY enhancements
List 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 ?...



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RfD: more powerful "any" types
Next
From: Robert Haas
Date:
Subject: Re: COPY enhancements