]> granicus.if.org Git - postgresql/blob - src/interfaces/ecpg/TODO
From: Michael Meskes <meskes@topsystem.de>
[postgresql] / src / interfaces / ecpg / TODO
1 This list is still from Linus. MM
2
3 The variables should be static.
4     
5 Preprocessor cannot do syntax checking on your SQL statements Whatever you
6 write is copied more or less exactly to the PostgreSQL and you will not be
7 able to locate your errors until run-time.
8     
9 No restriction to strings only The PQ interface, and most of all the PQexec
10 function, that is used by the ecpg relies on that the request is built up as
11 a string. In some cases, like when the data contains the null character,
12 this will be a serious problem.
13
14 There should be different error numbers for the different errors instead of
15 just -1 for them all.
16     
17 Missing library functions to_date et al.
18     
19 Oracle has array operations that enhances speed. When implementing it in
20 ecpg it is done for compatibility reasons only. For them to improve speed
21 would require a lot more insight in the postgres internal mechanisms than I
22 possess.
23     
24 Oracle has indicator variables that tell if a value is null or if it is
25 empty. This largely simplifies array operations and provides for a way to
26 hack around some design flaws in the handling of VARCHAR2 (like that an
27 empty string isn't distinguishable from a null value). I am not sure if this
28 is an Oracle extension or part of the ANSI standard.
29     
30 As well as complex types like records and arrays, typedefs would be a good
31 thing to take care of.
32     
33 To set up a database you need a few scripts with table definitions and other
34 configuration parameters. If you have these scripts for an old database you
35 would like to just apply them to get a postgres database that works in the
36 same way. The functionality could be accomplished with some conversion
37 scripts. Speed will never be accomplished in this way. To do this you need a
38 bigger insight in the database construction and the use of the database than
39 could be realised in a script.
40
41 Now comes my list (MM):
42
43 The return code is alway -1 in case of an error. You cannot see which error
44 occured by examining the return code.
45
46 The cursor is opened when the declare statement is issued.
47
48 ecpg does not understand enum datatypes.
49
50 There is no exec sql prepare statement.
51
52 The complete structure definition has to be listed inside the declare
53 section for ecpg to be able to understand it.
54
55 Each variable has to be defined on a line on its own.
56
57 There is no way yet to fill a complete array with one call except arrays of
58 [unsigned] char which are considered strings.
59
60 ecpg cannot use pointer variables except [unsigned] char *
61
62 List all commands as sqlcommand, not just S_SYMBOL