From: wieck@debis.com
To: mjnf@uevora.pt
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Wierd stuff
Date: Fri, 3 Dec 1999 17:33:32 +0100 (MET)
Message-ID: <m11tveG-0003kGC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <3847F3ED.98D71567@neptuno.uevora.pt>
Mario Filipe wrote:
> > I'm developing a system with a large number of tables.
> >
> > One of the tables has (among others) the following fields:
> > Table = aluno
> > +----------------------------------+---------------------------------
> > | Field | Type
> > +----------------------------------+---------------------------------
> > | numero_aluno | int4
> > | freguesia_naturalidade | int2
> > | concelho_naturalidade | int2
> > | nacionalidade | int2
> >
> > another is like this:
> >
> > -- Table = concelho
> > +----------------------------------+---------------------------------
> > | Field | Type
> > +----------------------------------+---------------------------------
> > | codigo | int4
> > | nome | text
> >
> > The field "concelho_naturalidade" on the first table has values taken
> > from the "codigo" field from the second.
First of all, why aren't the two fields of the same data
type? Shouldn't cause your problem, but it's bad database
design anyway IMHO.
> > Now comes the problem:
> > [...]
>
> And now... even wierder (?):
> [...]
>
> this is the expected output... the first one isn't. So does anyone have
> a clue on what's going on?
IIRC, corrupted indices can cause this type of misbehaviour.
If you have any indices defined on the two tables, try to
drop and recreate them.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
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-sql@postgresql.org
Cc: wieck@debis.com, mjnf@uevora.pt
Subject: Re: [SQL] Wierd stuff
In-Reply-To: <m11tveG-0003kGC@orion.SAPserv.Hamburg.dsh.de>
References: <3847F3ED.98D71567@neptuno.uevora.pt> <m11tveG-0003kGC@orion.SAPserv.Hamburg.dsh.de>
* 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