Received: from neptuno.uevora.pt (neptuno.sc.uevora.pt [193.136.216.24]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA79100 for ; Fri, 3 Dec 1999 11:47:54 -0500 (EST) (envelope-from mjnf@neptuno.sc.uevora.pt) Received: from neptuno.uevora.pt (really [127.0.0.1]) by neptuno.uevora.pt via smail with esmtp (ident mjnf using rfc1413) id (Debian Smail3.2.0.102) for ; Fri, 3 Dec 1999 17:23:04 +0000 (WET) Sender: mjnf Message-ID: <3847FC78.802ED6A3@neptuno.uevora.pt> Date: Fri, 03 Dec 1999 17:23:04 +0000 From: Mario Jorge Nunes Filipe Reply-To: mjnf@uevora.pt Organization: Universidade de Evora X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13 i686) X-Accept-Language: pt,en MIME-Version: 1.0 To: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Wierd stuff References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jan Wieck wrote: > > 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. Uhmmm! I could try a reasonable reason here but i can't find one... It will be fixed! > > > 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. I'll try this one out. Thanks -- Mario Filipe mjnf@uevora.pt http://neptuno.sc.uevora.pt/~mjnf