old testlo example code - Mailing list pgsql-docs

From Josh Kupershmidt
Subject old testlo example code
Date
Msg-id CAK3UJRFL8OD9Me-vPaE=ELPZ5-hFmk_Psa-cF00YfQJ7GNua-w@mail.gmail.com
Whole thread Raw
Responses Re: old testlo example code  (Magnus Hagander <magnus@hagander.net>)
List pgsql-docs
This documentation page:
  http://www.postgresql.org/docs/current/static/lo-examplesect.html

contains a hardcoded copy of ./src/test/examples/testlo.c, and it
seems like this version hasn't been updated along with its source. The
version from the docs no longer compiles for me, at least not when I
drop it into the place of the current ./src/test/examples/testlo.c.
That's easy enough to fix, though I have a historical question about
this code.

Building the unmodified code in ./src/test/examples, I see:

  testlo.c:35: warning: ‘importFile’ defined but not used
  testlo.c:151: warning: ‘exportFile’ defined but not used
  ...
  testlo64.c:35: warning: ‘importFile’ defined but not used
  testlo64.c:173: warning: ‘exportFile’ defined but not used

since the calls to those functions are commented out in favor of
lo_import() and lo_export(). I'm wondering if there is some reason to
leave those importFile() and exportFile() definitions in this example
code if they're not used? The code has apparently been like this (at
least for testlo.c, and I guess testlo64.c just copy-pasted from its
older sibling) since the first commit, d31084e9.

Josh


pgsql-docs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Unclear CHARACTER specification
Next
From: Magnus Hagander
Date:
Subject: Re: old testlo example code