strange quoted csv behavior with COPY

From: "George Pavlov" <gpavlov(at)mynewplace(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: strange quoted csv behavior with COPY
Date: 2006-02-02 18:51:48
Message-ID: CCB89282FCE1024EA3DCE687A96A516404C366D8@ehost010-6.exch010.intermedia.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

what would you expect the following command to insert into column a:

copy foo (a,b) from stdin with csv;
"bar" , 3
\.

i was expecting to see 'bar', but instead i get 'bar ' (the spaces
between the double quote and the comma get inserted.

select length(a), * from foo;
length | a | b
--------+--------+---
6 | bar | 3

is this by design? what is the use of the quote in this context?

i am on 8.0.6.

george

Browse pgsql-sql by date

  From Date Subject
Next Message padmanabha konkodi 2006-02-03 05:27:51
Previous Message Achilleus Mantzios 2006-02-02 16:49:06 Re: Does PostgreSQL support job?