Nested tables

From: Ferruccio Zamuner <solo3(at)mail(dot)chierinet(dot)it>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Nested tables
Date: 1998-07-24 16:29:08
Message-ID: yam7509.442.155657056@mail.chierinet.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I'm relatively new to Postgres (V6.3.1), and I've come in trouble the
following problem;
I've defined the following:

CREATE TABLE foo (
x int2
);

CREATE TABLE bar (
y foo,
z int
);

I read on some Postgres mailing digest that I had to put the OID of instance
of foo into y field of bar.

So I tried.

The problem is that when I submit the following query:

SELECT foo.x, bar.z WHERE foo.oid=bar.y;

trying to catch int fields either from bar and from its instance of foo,
Postgres replies that bar.y (of type foo) and foo.oid (of type oid) cannot be
compared.
I've also tried to cast them in many ways but the answer never changes!

Any help would be greatly appreciated (I've completely missed the right way or
just
some detail?)

Gianluca

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Tong 1998-07-24 16:29:42 Re: [DOCS] Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]
Previous Message The Hermit Hacker 1998-07-24 16:16:12 Re: [GENERAL] How about this LOGO?