pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem with pg_index.
2+ messages / 2 participants
[nested] [flat]
* Problem with pg_index.
@ 2001-06-01 13:52 David BOURIAUD <david.bouriaud@ac-rouen.fr>
0 siblings, 1 reply; 2+ messages in thread
From: David BOURIAUD @ 2001-06-01 13:52 UTC (permalink / raw)
To: pgsql-sql
Hi the list !
I'm new to this list.
I've tried to write a sql query to get all the fields of a table and to
have mentionned is a field can be null or not, and if a field is a key
or not.
Before showing the query I send, let me tell you that I'm running
postgre v7.1.2 on a SuSE Linux 6.4 box, and that everything works fine
but this query.
Here it is :
select
pg_class.oid,
pg_attribute.attname,
pg_attribute.attbyval,
pg_attribute.attnotnull
from
pg_class,
pg_attribute,
pg_index
where
relname='essai2'
and pg_attribute.attrelid=pg_class.oid
and pg_attribute.attnum >0
and pg_index.indrelid=pg_class.oid
and pg_index.indkey[0] = pg_attribute.attnum
This query doesn't work, the back-end answers Error : Invalid Command
name "0"...
What now ? I've checked out the online doc, and the archives of this
list (that's where I got pg_index.indkey[0] from), but nothing seems to
work, since pg_index.indkey seems to be an int2vector, and I found no
integrated function to check if a value is in this vector... Thanks for
your ideas and//or help.
--
David BOURIAUD
----------------------------------------------------------
In a world without walls or fences, what use do we have
for windows or gates ?
----------------------------------------------------------
ICQ#102562021
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Problem with pg_index.
@ 2001-06-01 14:20 Tom Lane <tgl@sss.pgh.pa.us>
parent: David BOURIAUD <david.bouriaud@ac-rouen.fr>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2001-06-01 14:20 UTC (permalink / raw)
To: David BOURIAUD <david.bouriaud@ac-rouen.fr>; +Cc: pgsql-sql
David BOURIAUD <david.bouriaud@ac-rouen.fr> writes:
> This query doesn't work, the back-end answers Error : Invalid Command
> name "0"...
I don't think so: there is no such error string anywhere in the PG
sources. (Also, when I try the query, it seems to work fine.)
However, I find the following possibly relevant match in the PGAccess FAQ:
<b>8. I am receiving the following error: <tt>message invalid command
name "namespace" while executing "namespace eval Mainlib</tt> ..."</b>
<blockquote>That means 100% that you have an older version of Tcl/Tk that
don't recognize namespaces command. Please upgrade to Tcl/Tk 8.0.x minimum</blockquote>
Are you using Tcl? If so, I'd bet the problem is on the client side.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-06-01 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-01 13:52 Problem with pg_index. David BOURIAUD <david.bouriaud@ac-rouen.fr>
2001-06-01 14:20 ` Tom Lane <tgl@sss.pgh.pa.us>
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