pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guy Fraser <guy@incentre.net>
To: PGSQL SQL <pgsql-sql@postgresql.org>
Subject: Re: copy command and array of composite types?
Date: Tue, 25 Mar 2008 14:12:21 -0600
Message-ID: <AE3FBF69-724C-4B61-A53F-7F56F5537773@incentre.net> (raw)
In-Reply-To: <004d01c88ea4$cc9e0d30$820b010a@normanm90>
References: <004d01c88ea4$cc9e0d30$820b010a@normanm90>


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.

view thread (2+ messages)

Message-ID: <AE3FBF69-724C-4B61-A53F-7F56F5537773@incentre.net>
Permalink:  ../AE3FBF69-724C-4B61-A53F-7F56F5537773@incentre.net/
Also on:    postgresql.org/message-id/AE3FBF69-724C-4B61-A53F-7F56F5537773@incentre.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: guy@incentre.net
  Subject: Re: copy command and array of composite types?
  In-Reply-To: <AE3FBF69-724C-4B61-A53F-7F56F5537773@incentre.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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