Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaa7f004

Browse files
committed
Desultorily enclose programlisting tags in CDATA, to get rid of some obnoxious
SGML-escaping.
1 parentb2971e2 commitaa7f004

File tree

8 files changed

+238
-209
lines changed

8 files changed

+238
-209
lines changed

‎doc/src/sgml/auto-explain.sgml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/auto-explain.sgml,v 1.1 2008/11/19 02:59:28 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/auto-explain.sgml,v 1.2 2008/12/07 23:46:39 alvherre Exp $ -->
22

33
<sect1 id="auto-explain">
44
<title>auto_explain</title>
@@ -150,18 +150,19 @@ explain.log_min_duration = '3s'
150150
This might produce log output such as:
151151
</para>
152152

153-
<programlisting>
153+
<programlisting><![CDATA[
154154
LOG: duration: 0.986 ms plan:
155155
Aggregate (cost=14.90..14.91 rows=1 width=0)
156-
-&gt; Hash Join (cost=3.91..14.70 rows=81 width=0)
156+
-> Hash Join (cost=3.91..14.70 rows=81 width=0)
157157
Hash Cond: (pg_class.oid = pg_index.indrelid)
158-
-&gt; Seq Scan on pg_class (cost=0.00..8.27 rows=227 width=4)
159-
-&gt; Hash (cost=2.90..2.90 rows=81 width=4)
160-
-&gt; Seq Scan on pg_index (cost=0.00..2.90 rows=81 width=4)
158+
-> Seq Scan on pg_class (cost=0.00..8.27 rows=227 width=4)
159+
-> Hash (cost=2.90..2.90 rows=81 width=4)
160+
-> Seq Scan on pg_index (cost=0.00..2.90 rows=81 width=4)
161161
Filter: indisunique
162162
STATEMENT: SELECT count(*)
163163
FROM pg_class, pg_index
164164
WHERE oid = indrelid AND indisunique;
165+
]]>
165166
</programlisting>
166167
</sect2>
167168

‎doc/src/sgml/ecpg.sgml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.86 2008/06/12 19:15:40 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.87 2008/12/07 23:46:39 alvherre Exp $ -->
22

33
<chapter id="ecpg">
44
<title><application>ECPG</application> - Embedded <acronym>SQL</acronym> in C</title>
@@ -717,16 +717,17 @@ EXEC SQL EXECUTE mystmt USING 42, 'foobar';
717717
</programlisting>
718718
If the statement you are executing returns values, then add an
719719
<literal>INTO</literal> clause:
720-
<programlisting>
720+
<programlisting><![CDATA[
721721
EXEC SQL BEGIN DECLARE SECTION;
722-
const char *stmt = "SELECT a, b, c FROM test1 WHERE a&gt; ?";
722+
const char *stmt = "SELECT a, b, c FROM test1 WHERE a> ?";
723723
int v1, v2;
724724
VARCHAR v3;
725725
EXEC SQL END DECLARE SECTION;
726726

727727
EXEC SQL PREPARE mystmt FROM :stmt;
728728
...
729729
EXEC SQL EXECUTE mystmt INTO v1, v2, v3 USING 37;
730+
]]>
730731
</programlisting>
731732
An <command>EXECUTE</command> command can have an
732733
<literal>INTO</literal> clause, a <literal>USING</literal> clause,
@@ -752,20 +753,21 @@ EXEC SQL DEALLOCATE PREPARE <replaceable>name</replaceable>;
752753
functions to do basic calculations with those types within C, i.e. without
753754
the help of the <productname>PostgreSQL</productname> server. See the
754755
following example:
755-
<programlisting>
756+
<programlisting><![CDATA[
756757
EXEC SQL BEGIN DECLARE SECTION;
757758
date date1;
758759
timestamp ts1, tsout;
759760
interval iv1;
760761
char *out;
761762
EXEC SQL END DECLARE SECTION;
762763

763-
PGTYPESdate_today(&amp;date1);
764+
PGTYPESdate_today(&date1);
764765
EXEC SQL SELECT started, duration INTO :ts1, :iv1 FROM datetbl WHERE d=:date1;
765-
PGTYPEStimestamp_add_interval(&amp;ts1, &amp;iv1, &amp;tsout);
766-
out = PGTYPEStimestamp_to_asc(&amp;tsout);
766+
PGTYPEStimestamp_add_interval(&ts1, &iv1, &tsout);
767+
out = PGTYPEStimestamp_to_asc(&tsout);
767768
printf("Started + duration: %s\n", out);
768769
free(out);
770+
]]>
769771
</programlisting>
770772
</para>
771773

@@ -3449,14 +3451,15 @@ int rsetnull(int t, char *ptr);
34493451

34503452
<para>
34513453
Here is an example of a call to this function:
3452-
<programlisting>
3454+
<programlisting><![CDATA[
34533455
$char c[] = "abc ";
34543456
$short s = 17;
34553457
$int i = -74874;
34563458

34573459
rsetnull(CCHARTYPE, (char *) c);
3458-
rsetnull(CSHORTTYPE, (char *) &amp;s);
3459-
rsetnull(CINTTYPE, (char *) &amp;i);
3460+
rsetnull(CSHORTTYPE, (char *) &s);
3461+
rsetnull(CINTTYPE, (char *) &i);
3462+
]]>
34603463
</programlisting>
34613464
</para>
34623465
</listitem>
@@ -3477,14 +3480,15 @@ int risnull(int t, char *ptr);
34773480
</para>
34783481
<para>
34793482
Here is an example of how to use this function:
3480-
<programlisting>
3483+
<programlisting><![CDATA[
34813484
$char c[] = "abc ";
34823485
$short s = 17;
34833486
$int i = -74874;
34843487

34853488
risnull(CCHARTYPE, (char *) c);
3486-
risnull(CSHORTTYPE, (char *) &amp;s);
3487-
risnull(CINTTYPE, (char *) &amp;i);
3489+
risnull(CSHORTTYPE, (char *) &s);
3490+
risnull(CINTTYPE, (char *) &i);
3491+
]]>
34883492
</programlisting>
34893493
</para>
34903494
</listitem>
@@ -4960,11 +4964,11 @@ EXEC SQL END DECLARE SECTION;
49604964
EXEC SQL SELECT res INTO :result FROM mytable WHERE index = :index;
49614965
</programlisting>
49624966
is translated into:
4963-
<programlisting>
4967+
<programlisting><![CDATA[
49644968
/* Processed by ecpg (2.6.0) */
49654969
/* These two include files are added by the preprocessor */
4966-
#include&lt;ecpgtype.h&gt;;
4967-
#include&lt;ecpglib.h&gt;;
4970+
#include<ecpgtype.h>;
4971+
#include<ecpglib.h>;
49684972

49694973
/* exec sql begin declare section */
49704974

@@ -4975,11 +4979,12 @@ EXEC SQL SELECT res INTO :result FROM mytable WHERE index = :index;
49754979
/* exec sql end declare section */
49764980
...
49774981
ECPGdo(__LINE__, NULL, "SELECT res FROM mytable WHERE index = ? ",
4978-
ECPGt_int,&amp;(index),1L,1L,sizeof(int),
4982+
ECPGt_int,&(index),1L,1L,sizeof(int),
49794983
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
4980-
ECPGt_int,&amp;(result),1L,1L,sizeof(int),
4984+
ECPGt_int,&(result),1L,1L,sizeof(int),
49814985
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
49824986
#line 147 "foo.pgc"
4987+
]]>
49834988
</programlisting>
49844989
(The indentation here is added for readability and not
49854990
something the preprocessor does.)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp