I would like to apply this to CVS HEAD and 8.0.X so PG client
applications link to the libpgport non-shared library before linking to
libpq so it doesn't pull libpgport symbols from libpq.

This should make PG client apps more immune to libpq/pgport changes in
each version.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.209
diff -c -c -r1.209 Makefile.global.in
*** src/Makefile.global.in      26 Jan 2005 19:23:59 -0000      1.209
--- src/Makefile.global.in      11 Mar 2005 21:21:15 -0000
***************
*** 306,312 ****
  libpq_builddir = $(top_builddir)/src/interfaces/libpq
  endif
  
! libpq = -L$(libpq_builddir) -lpq
  
  # If doing static linking, shared library dependency can't be
  # used so we specify pthread libs for every usage of libpq
--- 306,321 ----
  libpq_builddir = $(top_builddir)/src/interfaces/libpq
  endif
  
! # We need client applications to pull from libpgport rather than getting
! # the same symbols from libpq's copy of pgport.  This makes applications
! # bind to libpq symbols only based on the API and not pgport.
! # To do this we make sure pgport is linked to first, before libpq.
! # This does cause duplicate -lpgport's to appear on client link lines.
! ifdef PGXS
! libpq = -L$(libdir) -lpgport -L$(libpq_builddir) -lpq
! else
! libpq = -L$(top_builddir)/src/port -lpgport -L$(libpq_builddir) -lpq
! endif
  
  # If doing static linking, shared library dependency can't be
  # used so we specify pthread libs for every usage of libpq
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to