Received: from cyberus.ca (mail.cyberus.ca [209.195.95.1]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA75904; Sun, 14 Nov 1999 16:03:05 -0500 (EST) (envelope-from chaoticinc@cyberus.ca) Received: from Cyberus.cyberus.ca (ip64.ts17-3.mn.dialup.ottawa.cyberus.ca [209.195.65.64]) by cyberus.ca (8.9.3/8.9.3/Cyberus Online Inc.) with SMTP id QAA27861; Sun, 14 Nov 1999 16:03:04 -0500 (EST) Date: Sun, 14 Nov 1999 16:03:04 -0500 (EST) Message-Id: <199911142103.QAA27861@cyberus.ca> X-Sender: chaoticinc@mail.cyberus.ca X-Mailer: Windows Eudora Light Version 1.5.2 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: pgsql-sql@postgreSQL.org, pgsql-bugs@postgreSQL.org From: Chaotic Inceptions Subject: Arrays of composites, bug or usage? Hello, I have a question on array usage. I created an array with the following commands: CREATE TABLE file ( path varchar(255); description varchar(255); ); CREATE TYPE file_array ( INPUT = array_in, OUTPUT = array_out INTERNALLENGTH = VARIABLE, ELEMENT = file ); CREATE TABLE media ( media_type char, media_list file_array ); First of all, is the above legal and if not, is there a way to do it? Is this an array of composite types or is that something else? When I attempt to insert values into the array with the following command, INSERT INTO media (media_type,media_list) VALUES ('C', '{""/usr/doc/list1","This is the description"", ""/usr/doc/list2","Another description""}'); the INSERT succeeds, but a subsequent select reveals the following: SELECT * FROM media; media_type|media_list ----------+---------- C |{0,0} (1 row) Is this a problem with levels of indirection in that I am looking at a pointer or something? Have I completed the insert incorrectly or is the parser unable to handle this? I would be happy to document this for everyone once I understand it. Jason Kania chaoticinc@cyberus.ca