From: Tom Lane <tgl@sss.pgh.pa.us>
To: Howard Cole <howardnews@selestial.com>
Cc: 'PgSql General' <pgsql-general@postgresql.org>
Subject: Re: Query Help
Date: Fri, 19 Jan 2007 13:52:39 -0500
Message-ID: <17899.1169232759@sss.pgh.pa.us> (raw)
In-Reply-To: <45B0FA5A.3010106@selestial.com>
References: <45B0FA5A.3010106@selestial.com>
Howard Cole <howardnews@selestial.com> writes:
> If I try the following query:
> delete from operator where operator_id=283;
> I get the following error message:
> ERROR: could not open relation with OID 438427
> SQL state: XX000
> Context: SQL statement "UPDATE ONLY "public"."timesheet_booking" SET
> "operator_id" = NULL WHERE "operator_id" = $1"
It looks like you have a stale plan for that ON DELETE SET NULL
constraint. Was there perhaps an index on operator_id that you removed?
Postgres is not very good about flushing cached plans when you change
table schemas (something I hope will be fixed in 8.3).
If that is the problem, starting a fresh session would be enough to take
care of it.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, howardnews@selestial.com
Subject: Re: Query Help
In-Reply-To: <17899.1169232759@sss.pgh.pa.us>
References: <45B0FA5A.3010106@selestial.com> <17899.1169232759@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox