From: David Stanaway <david@netventures.com.au>
To: pgsql-sql@postgresql.org
Subject: indexing arrays in pgaccess's query interface is failing
Date: Tue, 3 Jul 2001 19:05:05 +1000
Message-ID: <E15HMZC-0004Wc-00@runt.in.netventures.com.au> (raw)
Hi there, I am having some difficulties with using arrays in pgaccess
relating to arrays.
Here is an example schema:
CREATE TABLE arraykeys (
akID int,
akName varchar(12),
PRIMARY KEY(akID)
);
CREATE TABLE items (
itID serial,
itProperties bool[],
PRIMARY KEY(itID)
);
--.. And some Data
INSERT INTO arraykeys VALUES (1,'Active');
INSERT INTO arraykeys VALUES (2,'Overdue');
INSERT INTO arraykeys VALUES (3,'Local');
INSERT INTO items (itProperties) VALUES ( '{1,0,1}');
INSERT INTO items (itProperties) VALUES ( '{0,1,1}');
--.. And now the query that I am having problems with.
SELECT itID, itProperties[akID], akName
FROM items, arraykeys;
In the readline client psql, the above select statement works perfectly
scratch-# FROM items, arraykeys;
itid | itproperties | akname
------+--------------+---------
1 | t | Active
1 | f | Overdue
1 | t | Local
2 | f | Active
2 | t | Overdue
2 | t | Local
(6 rows)
However
In pgaccess,
when I try to execute the same query in query builder,
I get the tcl error dialogue:
Error: invalid command name "akID"
Is there an alternate way indexing arrays in queries that I should be
using?
Or is pgaccess just not suitable for this class of queries!
--
Best Regards
David Stanaway
========================.---------------------------------------------
Technology Manager - Australia's Premier Internet Broadcasters
david@NetVentures.com.au Office +612 9357 1699
========================'---------------------------------------------
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-interfaces@postgresql.org
Cc: david@netventures.com.au, pgsql-sql@postgresql.org
Subject: Re: indexing arrays in pgaccess's query interface is failing
In-Reply-To: <E15HMZC-0004Wc-00@runt.in.netventures.com.au>
* 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