[postgis-devel] lwpostgis.sql.inc.c?

Obe, Regina robe.dnd at cityofboston.gov
Mon Jul 21 18:41:48 PDT 2008

.in.in has kind of a nice ring to it.  I suppose if it is being passed thru a c processor it should have the C as Mark mentioned.  I'll just have to change the rules on my syntax colorer to map .sql.in.c to .sql or manually switch my mode when I hit this file.


From: postgis-devel-bounces at postgis.refractions.net on behalf of Paul Ramsey
Sent: Mon 7/21/2008 2:07 PM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] lwpostgis.sql.inc.c?

lwpostgis.sql.in.in ? :)

On Mon, Jul 21, 2008 at 9:52 AM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> Obe, Regina wrote:
>> Why does the trunk lwgeom/lwpostgis.sql.in.c  not called
>> lwpostgis.sql.in
>> Its screwing up the color coding on my editor.  In the branch versions
>> it was named lwpostgis.sql.in
>> I see we did split things out into sqlmm.sql.in etc, but that doesn't
>> seem to explain this choice of naming.
>> Thanks,
>> Regina
> Hi Regina,
> The reason for this is that the PostgreSQL PGXS build system takes an input
> file called <foo>.sql.in, runs it through sed to substitute the path to the
> actual module, and stores the result as <foo>.sql. This file is then copied
> to the correct contrib/ directory as part of "make install".
> In order to allow PostGIS to generate the correct SQL for multiple versions
> of PostgreSQL, we also need to run the output file through the C
> preprocessor beforehand. So the overall process now looks like this:
> i) lwpostgis.sql.in.c is run through the C pre-processor CPP to produce
> lwpostgis.sql.in
> ii) lwpostgis.sql.in is run through sed by the PostgreSQL PGXS build system
> to produce the final lwpostgis.sql
> Note that I used .c to make it obvious that the file is run through CPP
> (plus it uses various macro subsitutions with respect to function types such
> as IMMUTABLE, VOLATILE etc.) rather than being pure SQL. I can't say that
> I've ever run in syntax highlighting problems, but I suspect even an SQL
> syntax highlighter would fail due to the macros involved.
> HTH,
> Mark.
> --
> Mark Cave-Ayland
> Sirius Corporation - The Open Source Experts
> http://www.siriusit.co.uk <http://www.siriusit.co.uk/> 
> T: +44 870 608 0063
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
postgis-devel mailing list
postgis-devel at postgis.refractions.net

The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080721/635b2b66/attachment.html>

More information about the postgis-devel mailing list