Re: foreign Key problem

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: foreign Key problem
Date: 2002-06-21 07:29:05
Message-ID: D85C66DA59BA044EB96AB9683819CF61015103@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> -----Original Message-----
> From: Stephan Szabo [mailto:sszabo(at)megazone23(dot)bigpanda(dot)com]
> Sent: 20 June 2002 23:14
> To: Dave Page
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] foreign Key problem
>
>
> On Thu, 20 Jun 2002, Dave Page wrote:
>
> > Any ideas gratefully received!
>
> Wierd. Is there any inheritance or other such in the schema
> (in which case you need to use ONLY on the selects to see if
> the rows exist)? I'm not sure what else would make it miss
> the data, but if you can send a dump or example that
> illustrates, I can take a look at what it's doing.
>

The only inheritance in the DB is another table that inherits sys_users.
Actually, come to think of it most of the records in sys_users would
have come from there. I can't send a full dump as it's data that comes
under the UK Data Protection Act, but the table that inherits sys_users
looks like:

-- Table: hr_staff
CREATE TABLE hr_staff (
hr_payroll_no varchar(8),
hr_title varchar(128),
hr_department varchar(128),
hr_office varchar(128),
hr_telephone varchar(16),
hr_mobile varchar(16),
hr_image varchar(128),
hr_hol_basic int4,
hr_hol_adjust int4,
hr_hol_unit varchar(1) DEFAULT 'D'
) INHERITS(sys_users) WITH OIDS;

I'll see if I can get a test example to work (==fail) with non-sensitive
data as soon as England have beaten Brazil... :-)

Regards, Dave.

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2002-06-21 09:04:59 Re: foreign Key problem
Previous Message Martijn van Oosterhout 2002-06-21 07:22:14 Re: Idea for the statistics collector