How to remove quotes from COPY TO result?

From: Michael Rowan <mike(dot)rowan(at)internode(dot)on(dot)net>
To: postgresql novice <pgsql-novice(at)postgresql(dot)org>
Subject: How to remove quotes from COPY TO result?
Date: 2010-07-18 04:45:58
Message-ID: E10B9D5E-90CF-49D3-9C48-36CD9DD59F68@internode.on.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

PostgreSQL 8.4.1

I have a table "abbreviation" created as follows:

id serial NOT NULL,
full_name character varying(16),
short_name character varying(16),

I import some data from a tab delimited text file like so:

1 "STREET" "ST"
2 "ROAD" "RD"

using COPY abbreviation FROM <<myfile>>

The data is imported but I want the character columns to be stripped of the enclosing double-quotes and they are not. What do I have to do?

TIA

Michael Rowan
mike(dot)rowan(at)internode(dot)on(dot)net

11 Kingscote Street
ALBERTON
South Australia 5014

tel 618 8240 3993

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Joe Conway 2010-07-18 06:44:13 Re: How to remove quotes from COPY TO result?
Previous Message Steve Crawford 2010-07-16 15:47:59 Re: Need help doing a CSV import