aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
Commit message (Collapse)AuthorAge
* Sigh, I'm an idiot ... I broke the async startup logic a couple days ago,Tom Lane2000-01-16
| | | | | | | by creating a race condition. It wasn't waiting for select() to say write-ready immediately after connect, which meant that you might get an unhelpful 'broken pipe' error message if connect failed, rather than the intended error message.
* Eliminate using putenv().Tatsuo Ishii2000-01-15
|
* Clean up some problems in new asynchronous-connection logicTom Lane2000-01-14
| | | | | | in libpq --- mostly, poor response to error conditions. You now actually get to see the postmaster's 'The Data Base System is starting up' message, which you didn't before. I suspect the SSL code is still broken though.
* Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions.Bruce Momjian2000-01-10
|
* Update int28out and out8out and _in_ functions to handle trailing zerosBruce Momjian2000-01-10
| | | | properly.
* This patch removes the initialization of ri in loop inBruce Momjian2000-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* *** empty log message ***Michael Meskes2000-01-07
|
* Fix it's and its to be correct.Bruce Momjian2000-01-05
|
* Put back erroneously-removed definition of 'defines' variable.Tom Lane1999-12-26
|
* *** empty log message ***Michael Meskes1999-12-23
|
* The first fix is to allow an input file with a relative path and withoutBruce Momjian1999-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Clean up some minor gcc warnings. I'm not touching theTom Lane1999-12-20
| | | | | major one, though, which is the truly ugly stores into libpq private storage. Can't you find a better way to do this?
* *** empty log message ***Michael Meskes1999-12-16
|
* I have done the QNX4 port with the current source tree. The number ofBruce Momjian1999-12-16
| | | | | | | | backend/Makefiles to be patched could significantly be reduced since they have been adopted to the QNX4 needs. Andreas Kardos
* This patch solves a couple of memory leaks in ecpglib.c. The patch isBruce Momjian1999-12-14
| | | | | | | ok for both the development tree (CVS) and for 6.5.3. Stephen Birch
* Rename several destroy* functions/tags to drop*.Bruce Momjian1999-12-10
|
* *** empty log message ***Michael Meskes1999-12-08
|
* *** empty log message ***Michael Meskes1999-12-07
|
* This *should* fix the large object segfault problem. Note linewrap mayBruce Momjian1999-12-05
| | | | | | be interfering with last line of patch. Vince.
* Replace examples .H to .h.Bruce Momjian1999-12-03
|
* Rename libpq++.H to libpq++.h.Bruce Momjian1999-12-03
|
* Type 'socklen_t' might be the right way to declare getsockopt()'s lastTom Lane1999-12-02
| | | | | | | 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...
* This patch (against the current CVS sources) adds to libpq the functionsBruce Momjian1999-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Rename readonly to onlyread in odbc. Use varargs properly.Bruce Momjian1999-11-30
|
* Small patch which fixes the ODBC driver so it doesn't segfault if:Bruce Momjian1999-11-29
| | | | | | | | | | | | | | | | | | 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
* ecpg ECPGFree fix from Rene Hogendoorn.Bruce Momjian1999-11-23
|
* Fix _cplusplus test in both trees.Bruce Momjian1999-11-23
|
* *** empty log message ***Michael Meskes1999-11-23
|
* *** empty log message ***Michael Meskes1999-11-22
|
* In the spirit of TODO itemBruce Momjian1999-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* environment variable set by MULTIBYTE startup code should beTom Lane1999-11-05
| | | | | stored in malloc'd space, not in a static variable. Otherwise environment variable list is corrupted if libpq is dynamically unlinked...
* *** empty log message ***Michael Meskes1999-11-02
|
* *** empty log message ***Michael Meskes1999-11-02
|
* *** empty log message ***Michael Meskes1999-10-29
|
* *** empty log message ***Michael Meskes1999-10-27
|
* These are two minor corrections to libpq's PQsetNoticeProcessor function.Bruce Momjian1999-10-26
| | | | | | | | | | | | 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
* Standardize on MAXPGPATH as the size of a file pathname buffer,Tom Lane1999-10-25
| | | | | | | 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.
* bug fix for large objects (free)Byron Nikolaidis1999-10-25
|
* Remove gratuitous redefinitions of BLCKSZ.Tom Lane1999-10-23
|
* Remove fixed-size literal buffer from ecpg's lexer (sameTom Lane1999-10-22
| | | | | | | | 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...
* Remove libpq++ todo item.Bruce Momjian1999-10-22
|
* This *should* fix the large binary object problem in libpq++ from theBruce Momjian1999-10-22
| | | | | | TODO list. Vince
* *** empty log message ***Michael Meskes1999-10-15
|
* Correctly return -1 on error to CmdTuples()Bruce Momjian1999-10-13
| | | | Vince.
* Hi,Bruce Momjian1999-10-13
| | | | | | | | | | | | 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
* BLOBs containing NUL characters (ASCII 0) can be written to theBruce Momjian1999-10-13
| | | | | | | | | | | | | | | | | | | | | 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>
* Update pgeasy for missing files.Bruce Momjian1999-10-12
|
* Update pgeasy.Bruce Momjian1999-10-11
|
* cleanup of pgeasy.Bruce Momjian1999-10-11
|
* Update again.Bruce Momjian1999-10-11
|