empty arrays - Mailing list pgsql-sql

From
Subject empty arrays
Date
Msg-id NDBBKEGJICMIMJHJEBCOKENLFOAA.floyds@4peakstech.com
Whole thread Raw
Responses Re: empty arrays
Re: empty arrays
List pgsql-sql
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




pgsql-sql by date:

Previous
From: "Senthil"
Date:
Subject: Doubts porting from Oracle to postgresql
Next
From: mdavies@ilstu.edu (Mark Davies)
Date:
Subject: Slow self-join on a 100 million record table