Re: Object Relational, Foreign Keys and Triggers

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: alex(at)neteconomist(dot)com
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Object Relational, Foreign Keys and Triggers
Date: 2005-01-25 08:23:31
Message-ID: 20050125082331.GC29308@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 24, 2005 at 07:22:32PM -0500, Alex Turner wrote:
> I am facing the classic pgsql ORDBMS problem:

<snip>

Why are you using MAX()? That won't work at all. Perhaps you need to
look up the documentation for nextval and currval. In particular, that
second query should be:

insert into entity_phone select currval('entity_id_seq'),'610 495 5000';

Also, I'm not sure if inheritance works quite the way you think in the
example you give, though other people may correct me on that.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nicolai Tufar 2005-01-25 09:29:45 Re: SCHEMA compatibility with Oracle/DB2/Firebird
Previous Message Stephan Szabo 2005-01-25 07:32:59 Re: on update / on delete performance of foreign keys