<HTML dir=ltr><HEAD><TITLE>Re: [postgis-devel] lwpostgis.sql.inc.c?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText80165 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>.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.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Regina</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> postgis-devel-bounces@postgis.refractions.net on behalf of Paul Ramsey<BR><B>Sent:</B> Mon 7/21/2008 2:07 PM<BR><B>To:</B> PostGIS Development Discussion<BR><B>Subject:</B> Re: [postgis-devel] lwpostgis.sql.inc.c?<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>lwpostgis.sql.in.in ? :)<BR><BR>On Mon, Jul 21, 2008 at 9:52 AM, Mark Cave-Ayland<BR><mark.cave-ayland@siriusit.co.uk> wrote:<BR>> Obe, Regina wrote:<BR>>><BR>>> Why does the trunk lwgeom/lwpostgis.sql.in.c  not called<BR>>> lwpostgis.sql.in<BR>>><BR>>> Its screwing up the color coding on my editor.  In the branch versions<BR>>> it was named lwpostgis.sql.in<BR>>><BR>>> I see we did split things out into sqlmm.sql.in etc, but that doesn't<BR>>> seem to explain this choice of naming.<BR>>><BR>>> Thanks,<BR>>> Regina<BR>><BR>><BR>> Hi Regina,<BR>><BR>> The reason for this is that the PostgreSQL PGXS build system takes an input<BR>> file called <foo>.sql.in, runs it through sed to substitute the path to the<BR>> actual module, and stores the result as <foo>.sql. This file is then copied<BR>> to the correct contrib/ directory as part of "make install".<BR>><BR>> In order to allow PostGIS to generate the correct SQL for multiple versions<BR>> of PostgreSQL, we also need to run the output file through the C<BR>> preprocessor beforehand. So the overall process now looks like this:<BR>><BR>><BR>> i) lwpostgis.sql.in.c is run through the C pre-processor CPP to produce<BR>> lwpostgis.sql.in<BR>><BR>> ii) lwpostgis.sql.in is run through sed by the PostgreSQL PGXS build system<BR>> to produce the final lwpostgis.sql<BR>><BR>><BR>> Note that I used .c to make it obvious that the file is run through CPP<BR>> (plus it uses various macro subsitutions with respect to function types such<BR>> as IMMUTABLE, VOLATILE etc.) rather than being pure SQL. I can't say that<BR>> I've ever run in syntax highlighting problems, but I suspect even an SQL<BR>> syntax highlighter would fail due to the macros involved.<BR>><BR>><BR>> HTH,<BR>><BR>> Mark.<BR>><BR>> --<BR>> Mark Cave-Ayland<BR>> Sirius Corporation - The Open Source Experts<BR>> <A href="http://www.siriusit.co.uk/">http://www.siriusit.co.uk</A><BR>> T: +44 870 608 0063<BR>> _______________________________________________<BR>> postgis-devel mailing list<BR>> postgis-devel@postgis.refractions.net<BR>> <A href="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>><BR>_______________________________________________<BR>postgis-devel mailing list<BR>postgis-devel@postgis.refractions.net<BR><A href="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR></FONT></P></DIV></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
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.
</STRONG></P></BODY></HTML>

<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>