Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2147D475921 for ; Mon, 30 Dec 2002 12:40:32 -0500 (EST) Received: from mail.troycable.net (unknown [66.21.97.117]) by postgresql.org (Postfix) with ESMTP id 89AC64758DC for ; Mon, 30 Dec 2002 12:40:31 -0500 (EST) Received: from fig ([65.82.122.144]) by mail.troycable.net (8.12.6/8.12.3) with SMTP id gBUHhJOd058349 for ; Mon, 30 Dec 2002 11:43:19 -0600 (CST) (envelope-from floyds@4peakstech.com) From: To: "Pgsql-Sql" Subject: empty arrays Date: Mon, 30 Dec 2002 11:40:44 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/8 X-Sequence-Number: 10873 using: psql (PostgreSQL) 7.2.1 why does an empty array return an array of length 1 rather than array of length 0? one would think that the results below would have returned { } instead of {0}. simple test using psql: # create table test_table ( test_column integer[] ); CREATE # insert into test_table (test_column) values ( '{ }' ); INSERT 43475 1 # select * from test_table; test_column ------------ {0} (1 row) i want to be able to store a zero-length array field in the database. how do i specify this with sql? Regards, Floyd Shackelford 4 Peaks Technology Group, Inc. VOICE: 334.735.9428 FAX: 916.404.7125 EMAIL: FloydS@4PeaksTech.com ICQ #: 161371538 Shackelford Motto: ACTA NON VERBA - Actions, not words Alabama StateMotto: AUDEMUS JURA NOSTRA DEFENDERE - We Dare Defend Our Rights