Re: How to remove quotes from COPY TO result?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: How to remove quotes from COPY TO result?
Дата
Msg-id 201008101500.o7AF00Z07566@momjian.us
обсуждение исходный текст
Ответ на Re: How to remove quotes from COPY TO result?  (Joseph Conway <mail@joeconway.com>)
Список pgsql-novice
Joseph Conway wrote:
> On 8/10/10 2:58 AM, Michael Wood wrote:
> > On 10 August 2010 00:53, Bruce Momjian <bruce@momjian.us> wrote:
> >> Joe Conway wrote:
> >>> COPY abbreviation FROM 'filename' WITH DELIMITER '\t' CSV;
> >>> select * from abbreviation;
> >>>  id | full_name | short_name
> >>> ----+-----------+------------
> >>>   1 | STREET    | ST
> >>>   2 | ROAD      | RD
> >>> (2 rows)
> >>
> >> How were the double-quotes removed?
> >
> > Doesn't the "WITH ... CSV" handle that automatically?
>
> Yes
>
> > The documentation implies to me that quotes would be stripped,
> > although it talks more about writing CSV files than reading them.  I
> > haven't tried it, though.
>
> It works -- I tried it myself before I posted ;-)

Oh, I see the CSV now.  I was confused.  Sorry.  I was not aware you
could change the delimiter in CSV.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

В списке pgsql-novice по дате отправления:

Предыдущее
От: Joseph Conway
Дата:
Сообщение: Re: How to remove quotes from COPY TO result?
Следующее
От: Chris Campbell
Дата:
Сообщение: Listing Schemas - Revisited