Re: copy command and array of composite types? - Mailing list pgsql-sql

From Guy Fraser
Subject Re: copy command and array of composite types?
Date
Msg-id AE3FBF69-724C-4B61-A53F-7F56F5537773@incentre.net
Whole thread Raw
In response to copy command and array of composite types?  ("Jon Norman" <jnorman@alumni.utexas.net>)
List pgsql-sql

Try to export some data from the table using "copy from ..." to see what it looks like.

On 2008-Mar-25, at 12:19, Jon Norman wrote:

I'm using PostgreSQL 8.3.1.
 
I've created the following composite type:
 
CREATE TYPE expression_event_type AS (
event_id varchar(10),
expr_indices smallint[]
);
 
which is used with the following table definition:
 
CREATE TABLE boolean_expr_table(
expr_id smallint PRIMARY KEY,
expr_name varchar(100) NOT NULL,
expression varchar(256) NOT NULL,
event_indices expression_event_type[] NOT NULL,
true_cases smallint[] NOT NULL
);
 
Question: What is the correct way to load the event_indices column using the copy command and a external file?
 
I've tried: {(1,{1,2,3})} without success. 

pgsql-sql by date:

Previous
From: "Jon Norman"
Date:
Subject: copy command and array of composite types?
Next
From: "Shavonne Marietta Wijesinghe"
Date:
Subject: Export Access 97 to PostgreSQL