Re: Object features of pg

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: Michael Ansley <Michael(dot)Ansley(at)intec-telecom-systems(dot)com>
Cc: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Object features of pg
Date: 2000-10-03 13:32:23
Message-ID: Pine.LNX.4.21.0010031431010.420-100000@maidast.demon.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 3 Oct 2000, Michael Ansley wrote:

> I've done the following:
>
> create table address (address varchar(50), postcode varchar(9));
> create table client(id integer, name varchar(30), address address);
>
> Now, how the hell do I get information into the address field of client?
> There appears to be very little in the manual dealing with PGs object
> features. Any pointers to places in the manual, or direct instructions
> would be gratefully accepted.

Something like:

select id,name,a.address,postcode
from client c, address a
where c.address=a.oid;

Probably neater ways of doing it...

Peter

--
Peter T Mount peter(at)retep(dot)org(dot)uk http://www.retep.org.uk
PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/
Java PDF Generator http://www.retep.org.uk/pdf/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Keith Wong 2000-10-03 13:41:52 Re: trigger examples
Previous Message Michael Ansley 2000-10-03 13:14:39 Object features of pg