pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedcopy command and array of composite types?
2+ messages / 2 participants
[nested] [flat]
* copy command and array of composite types?
@ 2008-03-25 18:19 Jon Norman <jnorman@alumni.utexas.net>
0 siblings, 1 reply; 2+ messages in thread
From: Jon Norman @ 2008-03-25 18:19 UTC (permalink / raw)
To: pgsql-sql
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: copy command and array of composite types?
@ 2008-03-25 20:12 Guy Fraser <guy@incentre.net>
parent: Jon Norman <jnorman@alumni.utexas.net>
0 siblings, 0 replies; 2+ messages in thread
From: Guy Fraser @ 2008-03-25 20:12 UTC (permalink / raw)
To: 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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2008-03-25 20:12 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-03-25 18:19 copy command and array of composite types? Jon Norman <jnorman@alumni.utexas.net>
2008-03-25 20:12 ` Guy Fraser <guy@incentre.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox