From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: COPY CSV header line feature |
Date: | 2005-03-16 12:44:41 |
Message-ID: | 42382A39.1090706@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
ammended patch attached. sorry for the oversight. I agree with Tom's
remark - it's far too easy to miss this.
cheers
andrew
Alvaro Herrera wrote:
>On Tue, Mar 15, 2005 at 08:55:36PM -0600, Andrew Dunstan wrote:
>
>
>>Alvaro Herrera said:
>>
>>
>>>On Sun, Mar 13, 2005 at 06:32:20PM -0500, Andrew Dunstan wrote:
>>>
>>>
>>>
>>>>The attached patch implements the previously discussed header line
>>>>feature for CSV mode COPY. It is triggered by the keyword HEADER
>>>>(blame Bruce - he chose it ;-) ).
>>>>
>>>>
>>>I think you should add the new reserved keyword to the
>>>unreserved_keywords list or some other.
>>>
>>>
>>Please be more specific. I'll be happy to add in anything I've missed.
>>
>>
>
>The Postgres grammar classifies keywords in one of several lists, in
>order to make them available as names to users (column names, function
>names, etc). So each time you create a new keyword and add it to the
>keywords.c list, you have to add it to one of the lists on gram.y too.
>See gram.y line 7669 ff.
>
>I'd add a comment on this on gram.y:
>
>Index: gram.y
>===================================================================
>RCS file: /home/alvherre/cvs/pgsql/src/backend/parser/gram.y,v
>retrieving revision 2.484
>diff -c -w -b -B -c -r2.484 gram.y
>*** gram.y 14 Mar 2005 00:19:36 -0000 2.484
>--- gram.y 16 Mar 2005 03:12:48 -0000
>***************
>*** 327,333 ****
> /*
> * If you make any token changes, update the keyword table in
> * parser/keywords.c and add new keywords to the appropriate one of
>! * the reserved-or-not-so-reserved keyword lists, below.
> */
>
> /* ordinary key words in alphabetical order */
>--- 327,334 ----
> /*
> * If you make any token changes, update the keyword table in
> * parser/keywords.c and add new keywords to the appropriate one of
>! * the reserved-or-not-so-reserved keyword lists, below; search this
>! * file for "Name classification hierarchy."
> */
>
> /* ordinary key words in alphabetical order */
>
>
>
Attachment | Content-Type | Size |
---|---|---|
csv-header2.patch | text/x-patch | 9.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Christof Petig | 2005-03-16 14:12:56 | libecpg (8.0 and CVS) hits a gcc bug on powerpc and amd64 (crash) |
Previous Message | Satoshi Nagayasu | 2005-03-16 12:28:17 | read-only database |