This is a discussion on No quoting in copy CSV mode within the pgsql Novice forums, part of the PostgreSQL category; --> I have a file that is tab-delimited text that I am trying to load via psql \copy (postgresql 8.1). ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a file that is tab-delimited text that I am trying to load via psql \copy (postgresql 8.1). It contains quotes (and every other character I have tried) as well as escapes. I therefore would like to use the escape parameter to COPY, but have no quoting characters be recognized. However, it seems that there is no way to turn off quoting in CSV mode. Any workarounds that folks see? Thanks, Sean ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| ||||
| Sean Davis wrote: > I have a file that is tab-delimited text that I am trying to load via psql > \copy (postgresql 8.1). It contains quotes (and every other character I > have tried) as well as escapes. I therefore would like to use the escape > parameter to COPY, but have no quoting characters be recognized. However, > it seems that there is no way to turn off quoting in CSV mode. Any > workarounds that folks see? You use two double-quotes to represent a single double quote in the data. -- Bruce Momjian http://candle.pha.pa.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |