Received: from fileserver002.intecsystems.co.uk ([194.200.14.125]) by hub.org (8.10.1/8.10.1) with ESMTP id e93Dh6r53536 for ; Tue, 3 Oct 2000 09:43:06 -0400 (EDT) Received: by fileserver002.intecsystems.co.uk with Internet Mail Service (5.5.2650.21) id <4D5C9A4M>; Tue, 3 Oct 2000 14:44:09 +0100 Message-ID: <7F124BC48D56D411812500D0B747251406144A@fileserver002.intecsystems.co.uk> From: Michael Ansley To: "'Peter Mount'" Cc: "'pgsql-sql@postgresql.org'" Subject: RE: Object features of pg Date: Tue, 3 Oct 2000 14:44:08 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C02D40.0163A1FC" X-Archive-Number: 200010/22 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C02D40.0163A1FC Content-Type: text/plain; charset="iso-8859-1" Hi, Peter, I suspected as much of the querying, but I can't even get data into the tables. I tried this: insert into client values ('Michael'); insert into address values ('11 Windsor Close, 'RH16 4QR'); INSERT 18935 1 update client set address = 18935 where name = 'Michael'; ERROR: Attribute 'address' is of type 'address' but expression is of type 'int4 ' You will need to rewrite or cast the expression So that didn't work, and I tried casting the oid, but that didn't seem to work either. Any ideas? Cheers... >> -----Original Message----- >> From: Peter Mount [mailto:peter@retep.org.uk] >> Sent: 03 October 2000 14:32 >> To: Michael Ansley >> Cc: 'pgsql-sql@postgresql.org' >> Subject: Re: [SQL] Object features of pg >> >> >> 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@retep.org.uk http://www.retep.org.uk >> PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/ >> Java PDF Generator http://www.retep.org.uk/pdf/ >> >> ------_=_NextPart_001_01C02D40.0163A1FC Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [SQL] Object features of pg

Hi, Peter,

I suspected as much of the querying, but I can't even get= data into the tables.  I tried this:

insert into client values ('Michael');
insert into address values ('11 Windsor Close, 'RH16 4QR= ');
INSERT 18935 1
update client set address =3D 18935 where name =3D 'Mich= ael';
ERROR:  Attribute 'address' is of type 'address' bu= t expression is of type 'int4
'
        You will need= to rewrite or cast the expression

So that didn't work, and I tried casting the oid, but tha= t didn't seem to work either.  Any ideas?

Cheers...



>>   -----Original Message-----
>>   From: Peter Mount [mailto:peter@retep.org.uk]
>>   Sent: 03 October 2000 14:32
>>   To: Michael Ansley
>>   Cc: 'pgsql-sql@postgresql.org'
>>   Subject: Re: [SQL] Object features = of pg
>>  
>>  
>>   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 inf= ormation into the address
>>   field of client?
>>   > There appears to be very littl= e in the manual dealing
>>   with PGs object
>>   > features.  Any pointers t= o places in the manual, or
>>   direct instructions
>>   > would be gratefully accepted.<= /FONT>
>>  
>>   Something like:
>>  
>>   select id,name,a.address,postcode
>>   from client c, address a
>>   where c.address=3Da.oid;
>>  
>>   Probably neater ways of doing it...=
>>  
>>   Peter
>>  
>>   --
>>   Peter T Mount peter@retep.org.uk http://www.retep.org.uk=
>>   PostgreSQL JDBC Driver http://www.retep.org.uk= /postgres/
>>   Java PDF Generator http://www.retep.org.uk/pdf/=
>>  
>>  

------_=_NextPart_001_01C02D40.0163A1FC--