pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: floyds@4peakstech.com
To: Pgsql-Sql <pgsql-sql@postgresql.org>
Subject: empty arrays
Date: Mon, 30 Dec 2002 11:40:44 -0600
Message-ID: <NDBBKEGJICMIMJHJEBCOKENLFOAA.floyds@4peakstech.com> (raw)


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





view thread (3+ messages)  latest in thread

Message-ID: <NDBBKEGJICMIMJHJEBCOKENLFOAA.floyds@4peakstech.com>
Permalink:  ../NDBBKEGJICMIMJHJEBCOKENLFOAA.floyds@4peakstech.com/
Also on:    postgresql.org/message-id/NDBBKEGJICMIMJHJEBCOKENLFOAA.floyds@4peakstech.com

 · 

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: floyds@4peakstech.com
  Subject: Re: empty arrays
  In-Reply-To: <NDBBKEGJICMIMJHJEBCOKENLFOAA.floyds@4peakstech.com>

* 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