Re: generic copy options - Mailing list pgsql-hackers

From Tom Lane
Subject Re: generic copy options
Date
Msg-id 27188.1253387455@sss.pgh.pa.us
Whole thread Raw
In response to Re: generic copy options  (Emmanuel Cecchet <manu@asterdata.com>)
Responses Re: generic copy options
List pgsql-hackers
Emmanuel Cecchet <manu@asterdata.com> writes:
> [ latest patch version ]

Do we have consensus on the syntax for this patch?  In particular,
what about the question of adding CSV_ to all the CSV-specific option
names?  Emmanuel argued that this is necessary to avoid confusion if
we someday introduce other copy formats that have similar options.
However, I think you could easily turn that argument around.  Any one
COPY command will surely use just one format, and it seems to me that
forcing different formats to use different names for equivalent options
won't simplify life for anybody.  So I'm inclined to think we should
not have the CSV_ prefixes.  (I seem to recall that we had exactly
this discussion when the options were introduced the first time, and
settled on not using format-specific option names.)

One other minor point is that the patch introduces an empty-list
syntax for individual option values, but then treats it the same
as specifying nothing:

> +             | '(' ')'                                { $$ = NULL; }
> +             | /* EMPTY */                            { $$ = NULL; }

I'm not convinced this is a a good idea, and in any case I don't see
it documented.  I'm inclined to omit the '(' ')' syntax.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: WIP: generalized index constraints
Next
From: Tom Lane
Date:
Subject: Re: WIP: generalized index constraints