Skip site navigation (1) Skip section navigation (2)

ecpg test

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Nikola Milutinovic <Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: ecpg test
Date: 2004-01-13 01:31:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Nikola Milutinovic wrote:
> > Oh, glad you asked!  Compile/run interfaces/ecpg/test/test_thread.pgc.
> Just tried this:
> Legba:/# cd /home/r/root/build/postgresql-7.4.1/src/interfaces/ecpg/test
> Legba:/# gmake
> First it failed complaining on "bad object format in ../pgtypeslib".
> Aparently, the linker dislikes a space in "-L ../pgtypeslib". Deleting that
> space made the compile go through. The in failed on test3.cpg:
> ../preproc/ecpg -I./../include test3.pgc
> MM: birthinfo
> cc -std -O -ieee  -I./../include -I../../../../src/interfaces/libpq -I../../
> ../../src/include  -pthread  -c -o test3.o test3.c
> cc: Error: test3.pgc, line 71: In this statement, "ind_married" and "0" may
> not be compared with a relational operator.
>                 if (ind_married >= 0)
> --------------------^
> I've looked into the code. "ind_married" is defined as "int
> *ind_married=NULL". It really cannot be compared this way and I have a
> feeling it was not the intention.

Yes, that test is clearly wrong because ind_married is an int *.  I
think the test should be :

	*ind_married >= 0

and have applied the following patch to fix it.  I also added an include
required for malloc() on my system.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date

Next:From: Patrick SamsonDate: 2004-01-14 09:40:24
Subject: pltcl - cannot create 'normal' interpreter - Tcl_CreateSlave() fails - A solution
Previous:From: Kris JurkaDate: 2004-01-12 18:32:16
Subject: COPY allows parameters which corrupt output

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group