Commit Graph

850 Commits

Author SHA1 Message Date
Tom Lane 58f481c4ff Tweak libpq so that if a backend ERROR message arrives while libpq
thinks the connection is idle, the error message is displayed as if
it were a NOTICE.  This seems better than dropping the message on
the floor ... particularly if the message is the backend telling us
why it's about to close the connection.  The previous behavior was
Backend message type 0x45 arrived while idle
pqReadData() -- backend closed the channel unexpectedly.
which is not real helpful.
2000-02-24 04:50:51 +00:00
Michael Meskes 9f74608f47 *** empty log message *** 2000-02-23 19:26:05 +00:00
Michael Meskes 991b9740ac *** empty log message *** 2000-02-22 19:57:12 +00:00
Jan Wieck da9501bddb Avoid race conditions in detection of EINPROGRESS during connect().
Jan
2000-02-21 12:26:19 +00:00
Tatsuo Ishii 4fec86f1f6 Fix nasty bug in setting client_encoding 2000-02-19 05:04:54 +00:00
Michael Meskes bc8a39beef *** empty log message *** 2000-02-18 16:02:49 +00:00
Michael Meskes ab0c8c691e *** empty log message *** 2000-02-18 14:34:12 +00:00
Michael Meskes e3befe4a66 *** empty log message *** 2000-02-18 08:49:07 +00:00
Michael Meskes b3b35e98b6 *** empty log message *** 2000-02-17 19:48:58 +00:00
Bruce Momjian 0d9a0ed6d1 Package: postgresql
Version: 6.5.3-11
Severity: important

'char' is not a signed type by default on powerpc; therefore a character
can
never be equal to EOF (-1).  A patch is attached.

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
2000-02-16 23:07:31 +00:00
Michael Meskes 35ba9de276 *** empty log message *** 2000-02-16 16:18:29 +00:00
Michael Meskes 5933f1857f *** empty log message *** 2000-02-16 11:52:25 +00:00
Tom Lane b1577a7c78 New cost model for planning, incorporating a penalty for random page
accesses versus sequential accesses, a (very crude) estimate of the
effects of caching on random page accesses, and cost to evaluate WHERE-
clause expressions.  Export critical parameters for this model as SET
variables.  Also, create SET variables for the planner's enable flags
(enable_seqscan, enable_indexscan, etc) so that these can be controlled
more conveniently than via PGOPTIONS.

Planner now estimates both startup cost (cost before retrieving
first tuple) and total cost of each path, so it can optimize queries
with LIMIT on a reasonable basis by interpolating between these costs.
Same facility is a win for EXISTS(...) subqueries and some other cases.

Redesign pathkey representation to achieve a major speedup in planning
(I saw as much as 5X on a 10-way join); also minor changes in planner
to reduce memory consumption by recycling discarded Path nodes and
not constructing unnecessary lists.

Minor cleanups to display more-plausible costs in some cases in
EXPLAIN output.

Initdb forced by change in interface to index cost estimation
functions.
2000-02-15 20:49:31 +00:00
Michael Meskes 30f16e72a4 *** empty log message *** 2000-02-15 19:23:20 +00:00
Michael Meskes 72786e04fd *** empty log message *** 2000-02-15 12:15:57 +00:00
Bruce Momjian f4ca323d21 I suspect that you are not the person to send this to, but I wasn't sure
where else to mail it. I am the maintainer of unixODBC, and we have a
set of code in our project that started life as the Postgres windows
ODBC driver, which has been ported back to unix. Anyway I have just
fixed a memory leak in the driver, and I cant see any mention of the fix
being done in the main Postgres code, so I thougth I would let you know.

Its in the statement.c module, after the COMMIT statement has been
executed in SC_Execute, the code was

Nick Gorham
2000-02-14 12:33:19 +00:00
Michael Meskes 08b999f1bd *** empty log message *** 2000-02-14 10:00:06 +00:00
Peter Eisentraut 9ceb5d8a7b Fixed psql double quoting of SQL ids
Fixed libpq printing functions
2000-02-07 23:10:11 +00:00
Tatsuo Ishii d4e62e5ded Change function name PQclientencoding to PQclientEncoding since
it seems more suitable for the naming convention in libpq.

New function PQsetClientEncoding added. It makes possible to change
the client encoding on the fly without setting PGCLIENTENCODING.
2000-02-05 12:33:22 +00:00
Jan Wieck 74d53d7838 Made prototypes for yyerror() consistent with Bruce's last changes
Jan
2000-02-04 18:45:23 +00:00
Byron Nikolaidis 44035918bb Added numeric and int8 types.
Bug fix for LongVarBinary -- begin transaction
2000-01-30 21:14:25 +00:00
Peter Eisentraut 2b84cbb60f A few minor psql enhancements
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
2000-01-29 16:58:54 +00:00
Michael Meskes b53955f38a *** empty log message *** 2000-01-27 19:01:35 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Bruce Momjian da5aba105f Remove Ops parameter from STATRELID cache lookup, for Tom Lane and
optimizer.
2000-01-24 02:12:58 +00:00
Peter Eisentraut 49581f9848 updated install file
updated date/time types doc
fixed small psql bug
removed libpq code that lower-cased db names
make notice when long identifier is truncated
2000-01-23 01:27:39 +00:00
Tom Lane b6fdd14765 ecpg shouldn't depend on parser/gramparse.h. Also, eliminate some
compiler warnings caused by lack of extern declarations in extern.h.
I believe the remaining gcc warnings here would go away if the ecpg
grammar could be tweaked so it doesn't use REJECT ...
2000-01-20 05:23:26 +00:00
Tom Lane d242b64ba2 Tweak includes to avoid compiler warning on HPUX. 2000-01-20 04:11:52 +00:00
Peter Eisentraut 533d516629 Removed MBFLAGS from makefiles since it's now done in include/config.h. 2000-01-19 02:59:03 +00:00
Tatsuo Ishii 8ff9f85bd5 Fix for multibyte support. Since some function declarations
moved to miscadmin.h, we have to include it now.
2000-01-19 01:33:16 +00:00
Bruce Momjian 0cb6bc70ce Hi!
Here is a patch to bring both libpq and psql to a state where it compiles on
win32 (native) again. A lot of things have changed, and I have not been able
to keep up with them all, so it has been broken for quite a while.
After this patch, at least it compiles. It also talks "basic talk" to the
server, but I have not yet tested all things. Sending queries, and using
e.g. \d or \dt works fine. The rest will have to be tested further.
It also bumps the version on libpq.dll to 7.0.

Everything should be enclosed in #ifdef WIN32, unless I have missed
something. Except for one or maybe two places where I have moved a #include
that should not be used on win32 from the "global area" into a "#ifndef
WIN32 area".


//Magnus
2000-01-18 19:05:31 +00:00
Michael Meskes c80ba6a1b5 *** empty log message *** 2000-01-18 13:03:49 +00:00
Bruce Momjian 10d7287ab9 Libpq non-blocking mode, from Alfred Perlstein 2000-01-18 06:09:24 +00:00
Tom Lane 2fd4e7762c Modify libpq's pqexpbuffer to eliminate length restriction on how much
data can be formatted per call.  This requires relying on vsnprintf().
On machines that haven't got vsnprintf, link in the version from
backend/port/.
2000-01-17 02:59:46 +00:00
Tom Lane d00391e7ac Sigh, I'm an idiot ... I broke the async startup logic a couple days ago,
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.
2000-01-16 21:18:52 +00:00
Tatsuo Ishii 8fc386a2d8 Eliminate using putenv(). 2000-01-15 05:37:21 +00:00
Tom Lane 2af360ed1c Clean up some problems in new asynchronous-connection logic
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.
2000-01-14 05:33:15 +00:00
Bruce Momjian 6456b17bc1 Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions. 2000-01-10 16:13:23 +00:00
Bruce Momjian 3f03f74f36 Update int28out and out8out and _in_ functions to handle trailing zeros
properly.
2000-01-10 15:41:34 +00:00
Bruce Momjian 69d4299e3e This patch removes the initialization of ri in loop in
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-08 22:58:03 +00:00
Michael Meskes 33d71e3037 *** empty log message *** 2000-01-07 08:01:18 +00:00
Bruce Momjian b78769fda2 Fix it's and its to be correct. 2000-01-05 18:23:54 +00:00
Tom Lane bc036a063d Put back erroneously-removed definition of 'defines' variable. 1999-12-26 21:31:35 +00:00
Michael Meskes bd5ea42a8d *** empty log message *** 1999-12-23 12:33:19 +00:00
Bruce Momjian b57b0e0445 The first fix is to allow an input file with a relative path and without
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-21 17:42:16 +00:00
Tom Lane 80dc7e207a Clean up some minor gcc warnings. I'm not touching the
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-20 01:31:26 +00:00
Michael Meskes 50a5b4ab41 *** empty log message *** 1999-12-16 06:53:12 +00:00
Bruce Momjian 7585deb087 I have done the QNX4 port with the current source tree. The number of
backend/Makefiles to be patched could significantly be reduced since
they
have been adopted to the QNX4 needs.

Andreas Kardos
1999-12-16 01:25:23 +00:00
Bruce Momjian 9805abb0fb This patch solves a couple of memory leaks in ecpglib.c. The patch is
ok for both the
development tree (CVS) and for 6.5.3.

 Stephen Birch
1999-12-14 22:03:48 +00:00
Bruce Momjian 97dec77fab Rename several destroy* functions/tags to drop*. 1999-12-10 03:56:14 +00:00
Michael Meskes 7cf0f634d5 *** empty log message *** 1999-12-08 09:52:29 +00:00
Michael Meskes 54847b25d4 *** empty log message *** 1999-12-07 10:29:18 +00:00
Bruce Momjian 9eb69977fe This *should* fix the large object segfault problem. Note linewrap may
be interfering with last line of patch.

Vince.
1999-12-05 19:29:37 +00:00
Bruce Momjian 573553296b Replace examples .H to .h. 1999-12-03 18:28:32 +00:00
Bruce Momjian 5ada36c1e4 Rename libpq++.H to libpq++.h. 1999-12-03 17:35:05 +00:00
Tom Lane 9de156f116 Type 'socklen_t' might be the right way to declare getsockopt()'s last
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-12-02 00:26:15 +00:00
Bruce Momjian 3ab5b1f1e6 This patch (against the current CVS sources) adds to libpq the functions
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-30 03:08:19 +00:00
Bruce Momjian d264b53d2f Rename readonly to onlyread in odbc. Use varargs properly. 1999-11-30 02:44:09 +00:00
Bruce Momjian 63d7df4003 Small patch which fixes the ODBC driver so it doesn't segfault if:
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-29 23:42:03 +00:00
Bruce Momjian 54ffd4677a ecpg ECPGFree fix from Rene Hogendoorn. 1999-11-23 19:47:14 +00:00
Bruce Momjian 85bb91a319 Fix _cplusplus test in both trees. 1999-11-23 18:49:55 +00:00
Michael Meskes 36b0f67335 *** empty log message *** 1999-11-23 10:32:16 +00:00
Michael Meskes e30c2d67ef *** empty log message *** 1999-11-22 12:48:48 +00:00
Bruce Momjian 2a24ec6f16 In the spirit of TODO item
* 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-11 00:10:14 +00:00
Tom Lane 3b004b8e2e environment variable set by MULTIBYTE startup code should be
stored in malloc'd space, not in a static variable.  Otherwise environment
variable list is corrupted if libpq is dynamically unlinked...
1999-11-05 06:43:45 +00:00
Michael Meskes a2c834f709 *** empty log message *** 1999-11-02 19:03:34 +00:00
Michael Meskes 7ff8a18030 *** empty log message *** 1999-11-02 12:11:53 +00:00
Michael Meskes 969093b785 *** empty log message *** 1999-10-29 19:39:31 +00:00
Michael Meskes d3571c755e *** empty log message *** 1999-10-27 14:36:09 +00:00
Bruce Momjian 724bf74693 These are two minor corrections to libpq's PQsetNoticeProcessor function.
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-26 04:49:00 +00:00
Tom Lane 51f62d505e Standardize on MAXPGPATH as the size of a file pathname buffer,
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-25 03:08:03 +00:00
Byron Nikolaidis c4c8e812b4 bug fix for large objects (free) 1999-10-25 01:11:44 +00:00
Tom Lane 2dd82a67e5 Remove gratuitous redefinitions of BLCKSZ. 1999-10-23 03:28:58 +00:00
Tom Lane 45c002460c Remove fixed-size literal buffer from ecpg's lexer (same
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-22 23:14:50 +00:00
Bruce Momjian abceb20a52 Remove libpq++ todo item. 1999-10-22 19:13:39 +00:00
Bruce Momjian 95d1f5fa6d This *should* fix the large binary object problem in libpq++ from the
TODO list.

Vince
1999-10-22 19:05:02 +00:00
Michael Meskes 6fb3c3f78f *** empty log message *** 1999-10-15 19:02:08 +00:00
Bruce Momjian c7dea3a6b7 Correctly return -1 on error to CmdTuples()
Vince.
1999-10-13 16:46:28 +00:00
Bruce Momjian c3ac9f07b7 Hi,
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-13 11:38:42 +00:00
Bruce Momjian 7ee7ee1398 BLOBs containing NUL characters (ASCII 0) can be written to the
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-13 02:26:37 +00:00
Bruce Momjian 3c44a132ea Update pgeasy for missing files. 1999-10-12 14:06:49 +00:00
Bruce Momjian 433c213533 Update pgeasy. 1999-10-11 18:51:10 +00:00
Bruce Momjian bf919ed20a cleanup of pgeasy. 1999-10-11 18:16:06 +00:00
Bruce Momjian 05309c3cd2 Update again. 1999-10-11 18:05:39 +00:00
Bruce Momjian ad869fcb88 pgeasy update. 1999-10-11 18:03:04 +00:00
Bruce Momjian 0e839dbbdd Update pgeasy. 1999-10-11 17:51:27 +00:00
Bruce Momjian 676404d5dc Add pginterface into main tree, called pgeasy. 1999-10-11 17:47:02 +00:00
Bruce Momjian 440c913d42 Define __alpha__ for __alpha. 1999-10-08 17:14:46 +00:00
Michael Meskes a4f59da146 *** empty log message *** 1999-10-08 11:05:05 +00:00
Bruce Momjian fbe9d1a430 Fix for "--" comment and no trailing newline, as seen in Perl. 1999-10-08 05:03:14 +00:00
Bruce Momjian ae61ef34bd Cleanup -is flag to -l for SSL. Another PERL variable name fix. Clean
up debugging options for postmaster and postgres programs.  postmaster
-d is no longer optional.  Documentation updates.
1999-10-08 04:28:57 +00:00
Bruce Momjian b1ec184d38 Use $(PERL) variable for perl compile. Now in Makefile.global. 1999-10-08 00:15:49 +00:00
Bruce Momjian 56ba75cb53 CmdTuples() returns an int showing the number of affected tuples after an
insert, update or delete.  It will return -1 on error, although I've yet
to an error situation to prove that out!


Vince
1999-10-06 03:00:16 +00:00
Bruce Momjian d0741fb42f As we now use lipq++.H which wasn't around when I first posted the
2 line GetIsNull diffs, we now need this too:

Patrick Welche
1999-10-04 15:17:06 +00:00
Bruce Momjian f282b4ff4c libpq++ cleanup from Vince Vielhaber 1999-09-28 12:59:29 +00:00
Bruce Momjian 5bb6bb8dd6 Addition of CmdTuples(). Wraps PQcmdTuples.
Vince Vielhaber
1999-09-28 04:49:22 +00:00
Bruce Momjian 9394d62c73 I have been working with user defined types and user defined c
functions.  One problem that I have encountered with the function
manager is that it does not allow the user to define type conversion
functions that convert between user types. For instance if mytype1,
mytype2, and mytype3 are three Postgresql user types, and if I wish to
define Postgresql conversion functions like

I run into problems, because the Postgresql dynamic loader would look
for a single link symbol, mytype3, for both pieces of object code.  If
I just change the name of one of the Postgresql functions (to make the
symbols distinct), the automatic type conversion that Postgresql uses,
for example, when matching operators to arguments no longer finds the
type conversion function.

The solution that I propose, and have implemented in the attatched
patch extends the CREATE FUNCTION syntax as follows. In the first case
above I use the link symbol mytype2_to_mytype3 for the link object
that implements the first conversion function, and define the
Postgresql operator with the following syntax

The patch includes changes to the parser to include the altered
syntax, changes to the ProcedureStmt node in nodes/parsenodes.h,
changes to commands/define.c to handle the extra information in the AS
clause, and changes to utils/fmgr/dfmgr.c that alter the way that the
dynamic loader figures out what link symbol to use.  I store the
string for the link symbol in the prosrc text attribute of the pg_proc
table which is currently unused in rows that reference dynamically
loaded
functions.


Bernie Frankpitt
1999-09-28 04:34:56 +00:00
Bruce Momjian 3f5a164387 Hello,
Two patches included:
- the first one enables the use of bool variables in fields which might
become NULL.
  Up to now the lib told you that NULL is not a bool variable, even if
you provide a indicator.

- the second patch checks whether a value is null and issues an error if
no indicator is provided.

Sidenote: IIRC, the variable should be left alone if the value is NULL.
ECPGlib sets it's value to 0 on NULL. Is this a violation of the
standard?

Regards
     Christof
1999-09-27 19:16:29 +00:00
Michael Meskes 66270c94e1 *** empty log message *** 1999-09-27 10:41:02 +00:00
Bruce Momjian e0e7daef6d Lots of patches coming in from me today :-)
When drawing up a very simple "text-drawing" of how the negotiation is done,
I realised I had done this last part (fallback) in a very stupid way. Patch
#4 fixes this, and does it in a much better way.

Included is also the simple text-drawing of how the negotiation is done.

//Magnus
1999-09-27 03:13:16 +00:00
Bruce Momjian 4b06f6f9c8 I found the following useful - just a way of using PQgetisnull from
libpq++.

Patrick Welche
1999-09-21 21:19:31 +00:00
Michael Meskes 231c5935a4 *** empty log message *** 1999-09-17 18:28:15 +00:00
Michael Meskes 68ee58ed43 *** empty log message *** 1999-09-17 09:48:25 +00:00
Peter Mount f2fa38ded5 jdbc2real rule was in there twice. One of them should have been jdbc1real 1999-09-15 21:56:16 +00:00
Peter Mount 8363e137aa Jens Glaser found that getPrimaryKeys() had a table called test hardwired
into it.
1999-09-15 21:12:34 +00:00
Peter Mount cd68ecfef6 Some late patches from Jens Glaser (jens@jens.de). These upgrade the protocol
to version 2, and fixes ResultSetMetaData.getColumnDisplaySize().
1999-09-15 20:40:02 +00:00
Michael Meskes 864e1e9d0e *** empty log message *** 1999-09-15 08:29:25 +00:00
Peter Mount 3f68139373 An abstract declaration for the close() method was missed out of the previous
commit to CVS.
1999-09-14 22:43:38 +00:00
Peter Mount 24c82830cf Patches for 6.5.2 1999-09-14 05:50:44 +00:00
Tom Lane 3ec5232363 Patch to cure O(N^2) behavior in libpq when reading a long
message under a kernel that only returns one packet per recv() call.  This
didn't use to matter much, but it starts to get annoying with multi-megabyte
EXPLAIN VERBOSE responses...
1999-09-13 03:00:19 +00:00
Tom Lane b65ab31910 Eliminate token length assumption in scanstr(). 1999-09-11 22:26:47 +00:00
Tom Lane ea582ad7e7 Irix linking fix from Yu Cao <yucao@falcon.kla-tencor.com> 1999-09-07 18:10:49 +00:00
Thomas G. Lockhart ae01c7f5bb Fix for perl5 on BSD/OS breaks most other platforms, so back it out.
istm that this would be a job for configure.
Most modern OSes actually use perl5 by default ;)
1999-09-03 13:46:33 +00:00
Byron Nikolaidis 283df996c6 driver v06-40-0007 1999-09-03 05:29:00 +00:00
Byron Nikolaidis 19f947e800 driver v06-40-0007 1999-09-03 04:41:45 +00:00
Tom Lane ab5cafa5d3 Update frontend libpq to remove limits on query lengths,
error/notice message lengths, and number of fields per tuple.  Add
pqexpbuffer.c/.h, a frontend version of backend's stringinfo module.
This is first step in applying Mike Ansley's long-query patches,
even though he didn't do any of these particular changes...
1999-08-31 01:37:37 +00:00
Tom Lane c9d040d85e Un-break code generated by ECPGRelease production. 1999-08-22 20:37:24 +00:00
Bruce Momjian c5d0a1bc42 Fix for perl5 on BSD/OS. 1999-08-16 20:12:12 +00:00
Tatsuo Ishii bab13a70ff Fix for Win32 making problem with MB enabled.
Patches created by Hiroki Kataoka.
1999-08-16 02:04:05 +00:00
Michael Meskes b2a2be4c5a *** empty log message *** 1999-08-02 04:59:18 +00:00
Michael Meskes 9f0ffa2241 *** empty log message *** 1999-07-19 12:37:48 +00:00
Bruce Momjian e259780b13 Enable WIN32 compilation of libpq. 1999-07-19 06:25:40 +00:00
Bruce Momjian bf98a4656b Win32 cleanup 1999-07-19 02:45:43 +00:00
Bruce Momjian e44c931801 Re-add getopt.h check, remove NT-specific tests for it. 1999-07-19 02:27:16 +00:00
Bruce Momjian c9acd2da12 Remove getopt configure check. 1999-07-19 01:18:05 +00:00
Bruce Momjian c981442772 Update ecpg compile. 1999-07-18 21:07:02 +00:00
Bruce Momjian cb08547646 Add getopt test. 1999-07-18 21:02:56 +00:00
Bruce Momjian d6f26e6451 Update for 6.6. 1999-07-18 18:06:42 +00:00
Bruce Momjian 07262a2dfb Update configure include checks. 1999-07-18 16:42:16 +00:00
Bruce Momjian 3406901a29 Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
Tom Lane 8ee07b506d Tired of seeing that 'unused variable' warning... 1999-07-16 23:15:46 +00:00
Bruce Momjian 4b2c2850bf Clean up #include in /include directory. Add scripts for checking includes. 1999-07-15 15:21:54 +00:00
Bruce Momjian ad4948862c Remove S*I comments from Stephan. 1999-07-13 21:17:45 +00:00
Bruce Momjian 540c114225 Redefine cpu's as __cpu__. Only for 6.6 branch. 1999-07-13 20:00:37 +00:00
Bruce Momjian 5a3fa95c39 Update stuff for 6.5.1 release. 1999-07-10 16:28:02 +00:00
Tom Lane 73efd3867d Fix gcc complaint about long being passed to sprintf %d. 1999-07-09 22:53:40 +00:00
Bruce Momjian 103cf75651 Re-apply range check patch after fixing LIMIT_H test and defines. 1999-07-09 17:40:31 +00:00
Bruce Momjian 3acb7d1634 Test Case:
----------
exec sql begin declare section;
   short s ;
   unsigned short us;
exec sql end   declare section;
exec sql create table test(s smallint, us smallint);
exec sql commit;
s = 1; us =32000;
exec sql insert into test values( :s, :us ) ;  <== error

Error Message: "i4toi2: '-600309759' causes int2 underflow"

Masaaki Sakaida
1999-07-08 03:32:57 +00:00
Bruce Momjian 0343024a5c Add CXXFLAGS += 1999-07-08 03:30:16 +00:00
Bruce Momjian eba41848aa Clarify maximum tuple and max attribute lengths. 1999-07-04 04:56:02 +00:00
Bruce Momjian 97dfff832c Fix to prevent too large tuple from being created. 1999-07-03 00:33:04 +00:00
Tom Lane fa179dde82 Make sure symlinks for sharedlib get removed by 'make clean'. 1999-06-30 23:57:31 +00:00
Michael Meskes 9b0e20574b *** empty log message *** 1999-06-29 09:25:25 +00:00
Peter Mount e70b4831d7 Some minor bug fixes 1999-06-27 11:05:38 +00:00
Michael Meskes 19630e0cbc *** empty log message *** 1999-06-25 10:42:06 +00:00
Michael Meskes d12561040c *** empty log message *** 1999-06-24 13:15:31 +00:00
Peter Mount dc88d74af3 Some fixes supplied by Jon Nielsen jonfn@image.dk 1999-06-23 05:56:20 +00:00
Thomas G. Lockhart 8c3a796328 Incorporate fixes from Date and Darwen, 1997.
Did not check the function declarations as carefully as the other parts,
 though all of the function names *do* match up with D&D.
1999-06-18 05:03:48 +00:00
Bruce Momjian 4c65382596 Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGN
for Irix.
1999-06-17 15:16:09 +00:00
Thomas G. Lockhart 0c1ec67447 Add CLI required header and examples from SQL3/SQL98
August 1994 draft standard.
Use the ecpg support libraries to write the CLI interface?
Date and Darwen claim that CLI is a more modern and flexible approach...
1999-06-17 14:19:17 +00:00
Michael Meskes c6a6597862 *** empty log message *** 1999-06-16 18:35:51 +00:00
Michael Meskes c70db13265 *** empty log message *** 1999-06-16 18:25:50 +00:00
Michael Meskes 70dfc8c11e *** empty log message *** 1999-06-10 19:11:33 +00:00
Bruce Momjian 8864ee0b6b > Here is a small patch that should only affect win32 building
> (native win32, not cygnus).
> It does the following:
> Patches two win32.mak files to DEFINE HAVE_VSNPRINTF and
> HAVE_STRDUP. This is required to build at all.
> Bumps the version number on libpq.dll from 6.4 to 6.5.
> Required for install programs to work.
> Adds defintions for BLCKSZ and MAXIMUM_ALIGN to "win32.h" in
> the client-side libpiq directory.
>
> All these files are only used when building on native win32,
> so it should be safe I think.
>
> Again, really sorry to throw this in so late, but I would
> hate to do the same thing as with 6.4 (which required 6.4.1
> to at all compile on Win32).
>
> Thanks,
>
>   //Magnus
1999-06-07 14:29:20 +00:00
Tom Lane e7253d893c Remove redeclarations of default parameter values from
PgDatabase::DisplayTuples and PgDatabase::PrintTuples.  This is incorrect
according to strict interpretation of the C++ spec, and some compilers
will reject it.  Also silence g++ warning about unused parameter.
1999-06-05 18:05:17 +00:00
Marc G. Fournier 840306af04 ecpg.patch (wrong makefile expansion in some cases)
the ecpg Makefiles use a variable DESTDIR which is never defined
        except by debian/rules makefile, in which case the ecpg makefiles
        expand wrong pathnames. If we want to support a DESTDIR root it
        must be done consistently in all the makefiles, not just in ecpg.

From: Massimo Dal Zotto <dz@cs.unitn.it>
1999-06-05 04:13:21 +00:00
Bruce Momjian 42a02c441a forgot to attach the patch. :(
Vince.
1999-06-01 02:43:37 +00:00
Bruce Momjian d2ab04ca73 commented out PgConnection& references for now. May be using them
later.

Vince.
1999-06-01 02:37:33 +00:00
Tom Lane 3257b0e592 egcs thinks omitting the return type in a function declaration
is poor coding style.  I agree.
1999-05-30 15:22:34 +00:00
Tom Lane d4d297af3c Replace static rcsid[] strings by IDENTIFICATION comments in
file headers, to conform to established Postgres coding style and avoid
warnings from gcc.
1999-05-30 15:17:58 +00:00
Bruce Momjian b344b513c7 Update pygresql version stamp. 1999-05-28 04:54:34 +00:00
Tom Lane f0ae1e8d10 When closure of the backend connection is detected during pqFlush,
do the right thing: look for a NOTICE message from the backend before we
close our side of the socket.  6.4 libpq did not reliably print the backend's
hara-kiri message, 'The Postmaster has informed me ...', because it only
did the right thing if connection closure was detected during a read
attempt instead of a write attempt.
1999-05-28 01:54:53 +00:00
Bruce Momjian 781a1eb99a I am not sure if libpq++ will compile with non g++ compilers,
but the Makefile does break non g++.

 <<mak.patch>>
Andreas
1999-05-27 14:28:40 +00:00
Bruce Momjian fe2bcf854c Fix for NT from Horak Daniel 1999-05-26 16:19:48 +00:00
Bruce Momjian fcff1cdf4e Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Michael Meskes 4b04b01aaa *** empty log message *** 1999-05-25 13:36:15 +00:00
Bruce Momjian b14c99d8d6 Here it is. Remove or rename the current interfaces/libpq++ and untar
this file in interfaces/

It will all need to be checked in.  I used the char *rcsid[] method for
cvs ids so it can be strings | grep'd to find version numbers.  The new
version for the library is 3.0.

Run configure from src/ to create the Makefile and it should be good to
go.

I did minimal documentation references in the README, I'll see if I can
get something to Tom Lockhart rather quickly.

Vince.
1999-05-23 01:04:07 +00:00
Bruce Momjian 85170aa9b6 Change perl Makefile test. 1999-05-21 19:03:48 +00:00
Michael Meskes a7b06f20c5 *** empty log message *** 1999-05-21 16:36:27 +00:00
Bruce Momjian 6d08b6a7b8 Remove 4096 string limited key on block size 1999-05-19 17:53:12 +00:00
Marc G. Fournier 9487ad8409 Bring python up to date ...
From: D'Arcy J.M. Cain <darcy@druid.net>
1999-05-19 14:46:54 +00:00
Peter Mount 2d7ec4785f Forgot the CHANGELOG 1999-05-18 23:22:08 +00:00
Peter Mount 4c63b257fd Internationalisation of error messages 1999-05-18 23:17:46 +00:00
Peter Mount d261a5ec86 Transactions in ImageViewer 1999-05-18 06:07:25 +00:00
Michael Meskes 21e03211cf *** empty log message *** 1999-05-18 05:20:17 +00:00
Peter Mount 20f0cfc322 Fixed Internationalization of error messages. 1999-05-17 22:58:19 +00:00
Peter Mount 3f59cc0831 Minor bug fixes. Replaced DateStyle support with ISO. 1999-05-17 22:43:30 +00:00
Bruce Momjian 1125c5e4c5 Add python 1999-05-17 06:27:07 +00:00
Bruce Momjian e55213a5a8 Re-add python. 1999-05-17 06:15:31 +00:00
Bruce Momjian 716b8e2dba Updates for 6.5. 1999-05-17 06:06:35 +00:00
Tom Lane bbf3748347 Change iostream to iostream.h, strstream to strstream.h
for compatibility with older C++ libraries.
1999-05-16 14:34:59 +00:00
Michael Meskes c8bd630af6 *** empty log message *** 1999-05-14 06:56:18 +00:00
Byron Nikolaidis f80642137c Update driver to 6-40-0006 1999-05-13 03:33:00 +00:00
Tom Lane a36a7a16eb Fix bogus assumption that MAXALIGN is at least sizeof(pointer). 1999-05-12 04:38:24 +00:00
Bruce Momjian 0d5c832363 Allow perl install as non-root, from Geoff Keating 1999-05-10 17:01:25 +00:00
Bruce Momjian 94bd4e3da7 Update to PyGreSQL 2.3. 1999-05-10 16:10:51 +00:00
Bruce Momjian 86dacdb74c libpq++ uses fe_setauthsvc which is deprecated and results in an error
on connection. This patch changes it to use PQconnectdb rather than
{fe_setauthsvc,PQsetdb}. This still isn't the complete solution, as
there
is no provision for user,password in class PgEnv, but it does get rid of
the error message. Tested with gcc version egcs-2.91.60 19981201
(egcs-1.1.1 release) under NetBSD-1.3K/i386.

Cheers,

Patrick Welche
1999-05-10 15:27:19 +00:00
Bruce Momjian 4853495e03 Change error messages to oids come out as %u and not %d. Change has no
real affect now.
1999-05-10 00:46:32 +00:00
Michael Meskes e18c912acf *** empty log message *** 1999-05-07 18:03:37 +00:00
Bruce Momjian 210055ad61 here are some patches for 6.5.0 which I already submitted but have never
been applied. The patches are in the .tar.gz attachment at the end:

varchar-array.patch     this patch adds support for arrays of bpchar() and
                        varchar(), which where always missing from postgres.

                        These datatypes can be used to replace the _char4,
                        _char8, etc., which were dropped some time ago.

block-size.patch        this patch fixes many errors in the parser and other
                        program which happen with very large query statements
                        (> 8K) when using a page size larger than 8192.

                        This patch is needed if you want to submit queries
                        larger than 8K. Postgres supports tuples up to 32K
                        but you can't insert them because you can't submit
                        queries larger than 8K. My patch fixes this problem.

                        The patch also replaces all the occurrences of `8192'
                        and `1<<13' in the sources with the proper constants
                        defined in include files. You should now never find
                        8192 hardwired in C code, just to make code clearer.


--
Massimo Dal Zotto
1999-05-03 19:10:48 +00:00
Michael Meskes dd6b1aaa25 *** empty log message *** 1999-04-26 05:28:48 +00:00
Tom Lane fad6f2925c Clean up gcc warning in MULTIBYTE code. 1999-04-25 18:16:47 +00:00
Michael Meskes ad5a54d170 *** empty log message *** 1999-04-16 12:26:49 +00:00
Michael Meskes 29e2916827 *** empty log message *** 1999-04-14 18:51:37 +00:00
Michael Meskes df6e504437 *** empty log message *** 1999-04-13 12:36:38 +00:00
Peter Mount ded46bd522 Implement UpdateCount 1999-04-11 18:03:00 +00:00
Tom Lane 2de404e173 Use MAXALIGN value found by configure instead of a
hardwired assumption.
1999-04-04 20:10:12 +00:00
Tatsuo Ishii c2d59497df change comparison char* and NULL to char* and '\0'. This should be
more portable way.
1999-03-29 08:19:36 +00:00
Michael Meskes d471f8073a *** empty log message *** 1999-03-24 20:05:15 +00:00