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

pgresStatus undefined in interfaces/libpgtcl/libpgtcl.a

From: Brook Milligan <brook(at)trillium(dot)NMSU(dot)Edu>
To: hackers(at)postgreSQL(dot)org
Subject: pgresStatus undefined in interfaces/libpgtcl/libpgtcl.a
Date: 1998-02-23 21:30:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Based on today's snapshot, the symbol _pgresStatus is still undefined
in interfaces/libpgtcl/libpgtcl.a (actually from pgtclCmds.o).  The
offending statement in pgtclCmds.c is:

	if (strcmp(opt, "-status") == 0)
		Tcl_AppendResult(interp, pgresStatus[PQresultStatus(result)], 0);
		return TCL_OK;

It seems like this symbol should refer to an array that is defined in
interfaces/libpq/fe-exec.c (the symbol is declared extern in
interfaces/libpq/libpq-fe.h which is included by pgtclCmds.c):

     /* keep this in same order as ExecStatusType in pgtclCmds.h */
     const char *pgresStatus[] = {

One solution is to place this segment of fe-exec.c into a distinct *.c
file that is included by both interfaces/libpq/fe-exec.c and
interfaces/libpgtcl/pgtclCmds.c.  Then the symbol would be included in
the libraries as intended.

However, the comment preceding the array definition suggests that
perhaps something should be taken from pgtclCmds.h and the whole thing
organized for sharing between the two directories.

Other solutions may be obvious to those more enlightened on matters of
the organization of this code.  As it stands, pgaccess is unusable
because of the undefined symbol.

Can anyone comment on the correct way to solve this problem?  I'll
make the patch if that would help.


pgsql-hackers by date

Next:From: Oliver ElphickDate: 1998-02-23 21:53:57
Subject: Re: [HACKERS] Here it is - view permissions
Previous:From: Brett McCormickDate: 1998-02-23 21:22:30
Subject: Re: pl/{perl,pgsql} (was Re: AW: [HACKERS] triggers, views and ru

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