From: | Mario Jorge Nunes Filipe <mjnf(at)neptuno(dot)sc(dot)uevora(dot)pt> |
---|---|
To: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] Wierd stuff |
Date: | 1999-12-03 17:23:04 |
Message-ID: | 3847FC78.802ED6A3@neptuno.uevora.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)uevora(dot)pt
http://neptuno.sc.uevora.pt/~mjnf
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-12-03 17:28:04 | Re: [SQL] Howto to force NULL rows at the bottom ? |
Previous Message | Mario Jorge Nunes Filipe | 1999-12-03 16:46:37 | Re: [SQL] Wierd stuff |