Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BBC662E003C for ; Tue, 25 Mar 2008 17:37:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 71376-06 for ; Tue, 25 Mar 2008 17:37:41 -0300 (ADT) X-Greylist: delayed 00:26:14.544426 by SQLgrey-1.7.5 Received: from bach.incentre.net (bach.incentre.net [198.161.96.4]) by postgresql.org (Postfix) with ESMTP id 96A9D2E003B for ; Tue, 25 Mar 2008 17:37:40 -0300 (ADT) Received: from sigurd.incentre.net (sigurd.incentre.net [206.75.213.195]) by bach.incentre.net (8.12.9p2/8.12.9) with ESMTP id m2PKBtOH025310 for ; Tue, 25 Mar 2008 14:11:55 -0600 (MDT) (envelope-from guy@incentre.net) Message-Id: From: Guy Fraser To: PGSQL SQL In-Reply-To: <004d01c88ea4$cc9e0d30$820b010a@normanm90> Content-Type: multipart/alternative; boundary=Apple-Mail-1-535475389 Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: copy command and array of composite types? X-Priority: 3 Date: Tue, 25 Mar 2008 14:12:21 -0600 References: <004d01c88ea4$cc9e0d30$820b010a@normanm90> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/169 X-Sequence-Number: 30497 --Apple-Mail-1-535475389 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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. --Apple-Mail-1-535475389 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable

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. 

= --Apple-Mail-1-535475389--