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 23:56:55
Message-ID: Pine.LNX.4.21.0010040056070.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:

> 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?

Hmmm, try:

update client set address = 18935::oid where name = 'Michael';

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 Josh Berkus 2000-10-04 00:33:15 Re: OID Perfomance - Object-Relational databases
Previous Message Tom Lane 2000-10-03 23:37:44 Re: pesky select query