Skip site navigation (1) Skip section navigation (2)

Weirdness with OIDs and JOIN ON?

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Weirdness with OIDs and JOIN ON?
Date: 2004-04-28 07:22:32
Message-ID: 408F5BB8.4060503@familyhealth.com.au (view raw or flat)
Thread:
Lists: pgsql-hackers
Why doesn't this work:

test=# select oid, relname, indisclustered from pg_index join pg_class 
on indexrelid=oid where indexrelid > 17205;
ERROR:  column "oid" does not exist

I'm _joining_ on the oid column.

If I qualify it, it works:

test=# select pg_class.oid, relname, indisclustered from pg_index join 
pg_class on indexrelid=oid where indexrelid > 17205;
   oid  |   relname    | indisclustered
-------+--------------+----------------
  17214 | child_b_key  | t
  17210 | parent_a_key | t
(2 rows)

I can't see that I've made an error in the first example - is it a 
Postgres bug?

Chris



Responses

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2004-04-28 07:38:44
Subject: Re: Nasty security bug with clustering
Previous:From: Christopher Kings-LynneDate: 2004-04-28 07:07:59
Subject: Re: bitwise and/or aggregate functions?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group