Re: Postgres on QNX

From: "Tegge, Bernd" <tegge(at)repas-aeg(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Igor Kovalenko <Igor(dot)Kovalenko(at)motorola(dot)com>, pgsql-ports(at)postgresql(dot)org
Subject: Re: Postgres on QNX
Date: 2001-11-10 18:33:58
Message-ID: 5.1.0.14.0.20011110183659.030fdec0@dragon.dr.repas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

At 11:45 10.11.01 -0500, Tom Lane wrote:
> >> In particular, i have NUMERIC test failing with same 'ERROR: cannot
> >> create unique index. Table contains noon-unique values'. Also CREATE
> >> VIEW fails with 'cannot insert a duplicate key into unique index
> >> pg_rewrite_rulename_index'
>
>Hm. Is this with current Postgres sources (7.1 or later)?

That was 7.1.3, but I get the same result in the regression test with
the cvs from last week.

>At this point it seems that we must be dealing with either a compiler
>bug (which compiler are you using?) or some so-far-unrecognized
>portability mistake in the Postgres code. If it's the latter then
>I'd like to find and fix it. Can you dig into it with a debugger and
>try to determine where the code goes wrong? The CREATE VIEW case would
>probably be easier to analyze than the numeric index creation.

I have rebuild postgres with -g2 and Watcom-C. The error message is
generated in comparetup_index(at)tuplesort(dot)c when enforceUnique is set
and it's tuples compare identical. As far as I can see, it is
called from qsort_comparetup which is called by the QNX qsort library
function. It looks like QNX qsort does in fact call the comparison
function to compare a tuple with itself (tuple pointers a and b have
the same value).
Changing line 1873 (in 7.1.3, line 1885 in my last cvs version)
! if (state->enforceUnique && !equal_hasnull && tuple1 != tuple2)
elog(ERROR, "Cannot create unique index. Table contains non-uniq
makes the error go away.

Regards, Bernd Tegge

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2001-11-10 18:48:20 Re: Postgres on QNX
Previous Message Tom Lane 2001-11-10 16:45:32 Re: Postgres on QNX