summaryrefslogtreecommitdiff
path: root/src/interfaces
AgeCommit message (Collapse)Author
2000-01-10Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions.Bruce Momjian
2000-01-10Update int28out and out8out and _in_ functions to handle trailing zerosBruce Momjian
properly.
2000-01-08This patch removes the initialization of ri in loop inBruce Momjian
quote_postgres(...) in ecpglib.c. The code in CVS reads: quote_postgres(char *arg, int lineno) { char *res = (char *) ecpg_alloc(2 * strlen(arg) + 3, lineno); int i, ri = 0; if (!res) return (res); res[ri++] = '\''; for (i = 0, ri=0; arg[i]; i++, ri++) { switch (arg[i]) { case '\'': res[ri++] = '\''; break; case '\\': res[ri++] = '\\'; break; default: ; } The problem here is that ri is reset to 0, thus overwriting the initial quote. Stephen Birch
2000-01-07*** empty log message ***Michael Meskes
2000-01-05Fix it's and its to be correct.Bruce Momjian
1999-12-26Put back erroneously-removed definition of 'defines' variable.Tom Lane
1999-12-23*** empty log message ***Michael Meskes
1999-12-21The first fix is to allow an input file with a relative path and withoutBruce Momjian
a ".pgc " extension. The second patch fixes a coredump when there is more than one input file (in that case, cur and types were not set to NULL before processing the second f ile) The patch below modifies the accepted grammar of ecpg to accept FETCH [direction] [amount] cursor name i.e. the IN|FROM clause becomes optional (as in Oracle and Informix). This removes the incompatibility mentioned in section "Porting From Other RDBMS Packages" p169, PostgreSQL Programmer's Guide. The grammar is modified in such a way as to avoid shift/reduce conflicts. It does not accept the statement "EXEC SQL FETCH;" anymore, as the old grammar did (this seems to be a bug of the old grammar anyway). This patch cleans up the handling of space characters in the scanner; some patte rns require \n to be in {space}, some do not. A second fix is the handling of cpp continuati on lines; the old pattern did not match these. The parser is patched to fix an off-by-one error in the #line directives. The pa rser is also enhanced to report the correct location of errors in declarations in the "E XEC SQL DECLARE SECTION". Finally, some right recursions in the parser were replaced by left-recursions. This patch adds preprocessor directives to ecpg; in particular EXEC SQL IFDEF, EXEC SQL IFNDEF, EXEC SQL ELSE, EXEC SQL ELIF and EXEC SQL ENDIF "EXEC SQL IFDEF" is used with defines made with "EXEC SQL DEFINE" and defines, specified on the command line with -D. Defines, specified on the command line are persistent across multiple input files. Defines can be nested up to a maximum level of 128 (see patch). There is a fair amount of error checking to make sure directives are matched properly. I need preprocessor directives for porting code, that is written for an Informix database, to a PostgreSQL database, while maintaining compatibility with the original code. I decided not to extend the already large ecpg grammar. Everything is done in the scanner by adding some states, e.g. to skip all input except newlines and directives. The preprocessor commands are compatible with Informix. Oracle uses a cpp replacement. Rene Hogendoorn
1999-12-20Clean up some minor gcc warnings. I'm not touching theTom Lane
major one, though, which is the truly ugly stores into libpq private storage. Can't you find a better way to do this?
1999-12-16*** empty log message ***Michael Meskes
1999-12-16I have done the QNX4 port with the current source tree. The number ofBruce Momjian
backend/Makefiles to be patched could significantly be reduced since they have been adopted to the QNX4 needs. Andreas Kardos
1999-12-14This patch solves a couple of memory leaks in ecpglib.c. The patch isBruce Momjian
ok for both the development tree (CVS) and for 6.5.3. Stephen Birch
1999-12-10Rename several destroy* functions/tags to drop*.Bruce Momjian
1999-12-08*** empty log message ***Michael Meskes
1999-12-07*** empty log message ***Michael Meskes
1999-12-05This *should* fix the large object segfault problem. Note linewrap mayBruce Momjian
be interfering with last line of patch. Vince.
1999-12-03Replace examples .H to .h.Bruce Momjian
1999-12-03Rename libpq++.H to libpq++.h.Bruce Momjian
1999-12-02Type 'socklen_t' might be the right way to declare getsockopt()'s lastTom Lane
parameter in some flavor of Unix, but Linux, HPUX, and SunOS all say it's int. For now I'm just going to make it int so that I can compile. If the other way is actually necessary on some Unix somewhere, I guess we will need a configure test...
1999-11-30This patch (against the current CVS sources) adds to libpq the functionsBruce Momjian
PQconnectStart PQconnectPoll PQresetStart PQresetPoll PQsetenvStart PQsetenvPoll PQsetenvAbort and brings into the published interface PQsetenv. The first four are asynchronous analogues of PQconnectdb and PQreset - they allow an application to connect to the DB without blocking on remote I/O. The PQsetenv functions perform an environment negotiation with the server. Internal to libpq, pqReadReady and pqWriteReady have been made available across the library (they were previously static functions inside fe-misc.c). A lot of internal rearrangement has been necessary to support these changes. The API documentation has been updated also. Caveats: o The Windows code does not default to using non-blocking sockets, since I have no documentation: Define WIN32_NON_BLOCKING_CONNECTIONS to do that. o The SSL code still blocks. Ewan Mellor.
1999-11-30Rename readonly to onlyread in odbc. Use varargs properly.Bruce Momjian
1999-11-29Small patch which fixes the ODBC driver so it doesn't segfault if:Bruce Momjian
You have CommLog and Debug enabled You encounter in error in any operation (SQLConnect/SQLExec). Previously, the extra logging didn't check for NULL pointers when trying to print some of the strings- the socket error message could frequently be NULL by design (if there was no socket error) and Solaris does not handle NULLS passed to things like printf ("%s\n",string); gracefully. This basically duplicates the functionality found in Linux where passing a null pointer to printf prints "(NULL)". No very elegant, but the logging is for debug only anyway. Dirk Niggemann
1999-11-23ecpg ECPGFree fix from Rene Hogendoorn.Bruce Momjian
1999-11-23Fix _cplusplus test in both trees.Bruce Momjian
1999-11-23*** empty log message ***Michael Meskes
1999-11-22*** empty log message ***Michael Meskes
1999-11-11In the spirit of TODO itemBruce Momjian
* Add use of 'const' for varibles in source tree (which is misspelled, btw.) I went through the front-end libpq code and did so. This affects in particular the various accessor functions (such as PQdb() and PQgetvalue()) as well as, by necessity, the internal helpers they use. I have been really thorough in that regard, perhaps some people will find it annoying that things like char * foo = PQgetvalue(res, 0, 0) will generate a warning. On the other hand it _should_ generate one. This is no real compatibility break, although a few clients will have to be fixed to suppress warnings. (Which again would be in the spirit of the above TODO.) In addition I replaced some int's by size_t's and removed some warnings (and generated some new ones -- grmpf!). Also I rewrote PQoidStatus (so it actually honors the const!) and supplied a new function PQoidValue that returns a proper Oid type. This is only front-end stuff, none of the communicaton stuff was touched. The psql patch also adds some new consts to honor the new libpq situation, as well as fixes a fatal condition that resulted when using the -V (--version) option and there is no database listening. So, to summarize, the psql you should definitely put in (with or without the libpq). If you think I went too far with the const-mania in libpq, let me know and I'll make adjustments. If you approve it, I will also update the docs. -Peter -- Peter Eisentraut Sernanders vaeg 10:115
1999-11-05environment variable set by MULTIBYTE startup code should beTom Lane
stored in malloc'd space, not in a static variable. Otherwise environment variable list is corrupted if libpq is dynamically unlinked...
1999-11-02*** empty log message ***Michael Meskes
1999-11-02*** empty log message ***Michael Meskes
1999-10-29*** empty log message ***Michael Meskes
1999-10-27*** empty log message ***Michael Meskes
1999-10-26These are two minor corrections to libpq's PQsetNoticeProcessor function.Bruce Momjian
One, it now returns the previous hook. That way people don't have to dig around in libpq-int.h for that information anymore. It previously returned void, so there should be no incompatibilities. Second, you cannot set the callback to NULL anymore. (Of course you can still call it with NULL just to get the current hook.) The way libpq uses the callback pointer, having a NULL there wasn't very healthy. Peter Eisentraut
1999-10-25Standardize on MAXPGPATH as the size of a file pathname buffer,Tom Lane
eliminating some wildly inconsistent coding in various parts of the system. I set MAXPGPATH = 1024 in config.h.in. If anyone is really convinced that there ought to be a configure-time test to set the value, go right ahead ... but I think it's a waste of time.
1999-10-25bug fix for large objects (free)Byron Nikolaidis
1999-10-23Remove gratuitous redefinitions of BLCKSZ.Tom Lane
1999-10-22Remove fixed-size literal buffer from ecpg's lexer (sameTom Lane
fix recently applied to backend's lexer). I see that YY_USES_REJECT still gets defined for this lexer, which means it's going to have trouble parsing really long tokens. Not sure if it's worth doing anything about that or not; I don't have the interest right now to understand why ecpg's additions to the syntax cause this problem...
1999-10-22Remove libpq++ todo item.Bruce Momjian
1999-10-22This *should* fix the large binary object problem in libpq++ from theBruce Momjian
TODO list. Vince
1999-10-15*** empty log message ***Michael Meskes
1999-10-13Correctly return -1 on error to CmdTuples()Bruce Momjian
Vince.
1999-10-13Hi,Bruce Momjian
I have changed a bit the makefiles for the win32 port - the *.def files (created when building shared libraries) are now clean from Makefile.shlib. I have also removed "-g" from CFLAGS in the "cygwin32" template - it can be enabled when running configure. Dan
1999-10-13BLOBs containing NUL characters (ASCII 0) can be written to theBruce Momjian
database, but they get truncated at the first NUL by lo_read when they are read back. The reason for this is that lo_read in Pg.xs is using the default: OUTPUT: RETVAL buf which uses C's strlen() to work out the length of the scalar. The code ought to read something more like: OUTPUT: RETVAL buf sv_setpvn((SV*)ST(2), buf, RETVAL); I am not sure if this needs to be done on both lo_read methods in this file, but I changed both and have not since had any problems with truncated BLOBs. Douglas Thomson <dougt@mugc.cc.monash.edu.au>
1999-10-12Update pgeasy for missing files.Bruce Momjian
1999-10-11Update pgeasy.Bruce Momjian
1999-10-11cleanup of pgeasy.Bruce Momjian
1999-10-11Update again.Bruce Momjian
1999-10-11pgeasy update.Bruce Momjian
1999-10-11Update pgeasy.Bruce Momjian
1999-10-11Add pginterface into main tree, called pgeasy.Bruce Momjian