Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

copy command and array of composite types?


  • From: "Jon Norman" <jnorman(at)alumni(dot)utexas(dot)net>
  • To: <pgsql-sql(at)postgresql(dot)org>
  • Subject: copy command and array of composite types?
  • Date: Tue, 25 Mar 2008 13:19:41 -0500
  • Message-id: <004d01c88ea4$cc9e0d30$820b010a@normanm90> <text/plain>

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. 


Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group