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

Commit06b8c8a

Browse files
committed
From: Michael Meskes <meskes@usa.net>docs improvement for ecpg..
1 parentbf395e8 commit06b8c8a

File tree

1 file changed

+35
-49
lines changed

1 file changed

+35
-49
lines changed

‎doc/src/sgml/ecpg.sgml

Lines changed: 35 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,12 @@ queries. It takes care of all the tedious moving of information to and
4545
from variables in your <Acronym>C</Acronym> program. Many <Acronym>RDBMS</Acronym> packages
4646
support this embedded language.
4747

48-
<Para>
49-
There is an ANSI-standard describing how the embedded language should
50-
work. Most embedded <Acronym>SQL</Acronym> preprocessors I have seen and heard of make
51-
extensions so it is difficult to obtain portability between them
52-
anyway. I have not read the standard but I hope that my implementation
53-
does not deviate too much and that it would be possible to port programs
54-
with embedded <Acronym>SQL</Acronym> written for other <Acronym>RDBMS</Acronym> packages
55-
to <ProductName>Postgres</ProductName> and thus
56-
promoting the spirit of free software.
48+
<Para> There is an ANSI-standard describing how the embedded language should
49+
work. <Application>ecpg</Application> was designed to meet this standard as much as possible. So it is
50+
possible to port programs with embedded <Acronym>SQL</Acronym> written for
51+
other <Acronym>RDBMS</Acronym> packages to
52+
<ProductName>Postgres</ProductName> and thus promoting the spirit of free
53+
software.
5754

5855
<Sect1>
5956
<Title>The Concept</Title>
@@ -431,25 +428,6 @@ you are not interested in how it really works, skip this section.
431428
This version the preprocessor has some flaws:
432429

433430
<VariableList>
434-
<VarListEntry>
435-
<Term>Preprocessor output</Term>
436-
<ListItem>
437-
<Para>
438-
The variables should be static.
439-
</Para>
440-
</ListItem>
441-
</VarListEntry>
442-
443-
<VarListEntry>
444-
<Term>Preprocessor cannot do syntax checking on your <Acronym>SQL</Acronym> statements</Term>
445-
<ListItem>
446-
<Para>
447-
Whatever you write is copied more or less exactly to the <ProductName>Postgres</ProductName> and
448-
you will not be able to locate your errors until run-time.
449-
</Para>
450-
</ListItem>
451-
</VarListEntry>
452-
453431
<VarListEntry>
454432
<Term>no restriction to strings only</Term>
455433
<ListItem>
@@ -485,51 +463,59 @@ to_date et al.
485463
<Term>records</Term>
486464
<ListItem>
487465
<Para>
488-
Possibility to define records or structures in the declare section
489-
in a way that the record can be filled from one row in the database.
466+
Records or structures have to be defined in the declare section.
490467

491-
<Para>
492-
This is a simpler way to handle an entire row at a time.
493-
</Para>
494468
</ListItem>
495469
</VarListEntry>
496470

497471
<VarListEntry>
498-
<Term>array operations</Term>
472+
<Term>missing statements</Term>
499473
<ListItem>
500474
<Para>
501-
Oracle has array operations that enhances speed. When implementing it in
502-
<Application>ecpg</Application> it is done for compatibility reasons only. For them to
503-
improve speed would require a lot more insight in the <ProductName>Postgres</ProductName> internal
504-
mechanisms than I possess.
475+
The following statements are not implemented thus far:
476+
<VariableList>
477+
<VarListEntry>
478+
<Term> exec sql type</Term>
479+
</VarListEntry>
480+
<VarListEntry>
481+
<Term> exec sql prepare</Term>
482+
</VarListEntry>
483+
<VarListEntry>
484+
<Term> exec sql allocate</Term>
485+
</VarListEntry>
486+
<VarListEntry>
487+
<Term> exec sql free</Term>
488+
</VarListEntry>
489+
<VarListEntry>
490+
<Term> exec sql whenever sqlwarning</Term>
491+
</VarListEntry>
492+
<VarListEntry>
493+
<Term> SQLSTATE</Term>
494+
</VarListEntry>
495+
</VariableList>
505496
</Para>
506497
</ListItem>
507498
</VarListEntry>
508499

509500
<VarListEntry>
510-
<Term>indicator variables</Term>
501+
<Term>message �no data found�</Term>
511502
<ListItem>
512503
<Para>
513-
Oracle has indicator variables that tell if a value is <Type>null</Type> or if
514-
it is empty. This largely simplifies array operations and provides for a
515-
way to hack around some design flaws in the handling of <Type>VARCHAR2</Type>
516-
(like that an empty string isn't distinguishable from a
517-
<Type>null</Type> value). I am not sure if this is an Oracle extension or part
518-
of the ANSI standard.
504+
The error message for "no data" in an exec sql insert select from statement
505+
has to be 100.
519506
</Para>
520507
</ListItem>
521508
</VarListEntry>
522509

523510
<VarListEntry>
524-
<Term>typedefs</Term>
511+
<Term>sqlwanr[6]</Term>
525512
<ListItem>
526513
<Para>
527-
As well as complex types like records and arrays, typedefs would be
528-
a good thing to take care of.
514+
sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified in a SET
515+
DESCRIPTOR statement will be ignored.
529516
</Para>
530517
</ListItem>
531518
</VarListEntry>
532-
533519
<VarListEntry>
534520
<Term>conversion of scripts</Term>
535521
<ListItem>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp