This is a discussion on COPY FROM with CSV header within the pgsql Hackers forums, part of the PostgreSQL category; --> Instead of ignoring the first line of a COPY FROM ... WITH CSV HEADER, what about allowing the first ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Instead of ignoring the first line of a COPY FROM ... WITH CSV HEADER, what about allowing the first line to be used as a list of field names? This means you wouldn't have to include field order in the COPY command if the names matched field names in the table. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| ||||
| Jim C. Nasby wrote: >Instead of ignoring the first line of a COPY FROM ... WITH CSV HEADER, >what about allowing the first line to be used as a list of field names? >This means you wouldn't have to include field order in the COPY command >if the names matched field names in the table. > > It was debated ... could be dangerous, and you'd need extra syntax, since we couldn't make it the default. cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| Thread Tools | |
| Display Modes | |
|
|