Commit Graph

2702 Commits

Author SHA1 Message Date
Tom Lane
4351f8823d Fix portability bugs: char values passed to <ctype.h> functions must
be cast to unsigned char.  We have learned this the hard way before.
2004-01-04 04:17:01 +00:00
Michael Meskes
21b3c0e0ec Added missing whitespaces to array argument parsing. 2003-12-29 13:53:04 +00:00
Tom Lane
d167fb1015 Fix sanity-check code that mistakenly assumed error and notice messages
could never exceed 30K.  Per report from Andreas Pflug.
2003-12-28 17:43:57 +00:00
Tom Lane
36c9a01acf Avoid infinite loop if connection is lost during PQexecStart() or
PQexecFinish().  Per report from Andreas Pflug.
2003-12-28 17:29:41 +00:00
Michael Meskes
03caf7649b Fixed segfault in parsing of EXEC SQL SELECT * FROM foo() AS TBL( c int, i int); 2003-12-24 22:04:09 +00:00
Bruce Momjian
0ea4f9c859 Back out:
>  Attached is a patch that addressed all the discussed issues
>  that did not break backward compatability, including the
>  ability to output ISO-8601 compliant intervals by setting
>  datestyle to iso8601basic.
2003-12-21 04:34:36 +00:00
Tom Lane
fb8ac3fcb6 Dept. of third thoughts: in fact, libpq should support SCM_CREDS challenge
even when HAVE_GETPEEREID is defined, else it will be unable to connect to
pre-7.4 backends that are using IDENT authentication.
2003-12-20 18:45:49 +00:00
Tom Lane
b8f2980209 Fix broken IDENT support for FreeBSD (appears to have been broken by
ill-considered conditional logic in getpeereid patch of 3-Dec-2002).
Per bug #1021.
2003-12-20 18:24:52 +00:00
Bruce Momjian
54c8e821b8 In my mind there were two categories of open issues
a) ones that are 100% backward (such as the comment about
     outputting this format)
and
  b) ones that aren't (such as deprecating the current
     postgresql shorthand of
         '1Y1M'::interval = 1 year 1 minute
     in favor of the ISO-8601
         'P1Y1M'::interval = 1 year 1 month.

Attached is a patch that addressed all the discussed issues that
did not break backward compatability, including the ability to
output ISO-8601 compliant intervals by setting datestyle to
iso8601basic.

Interval values can now be written as  ISO 8601 time intervals, using
the "Format with time-unit designators". This format always starts with
the character 'P', followed  by a string of values followed
by single character time-unit designators. A 'T' separates the date and
time parts of the interval.

Ron Mayer
2003-12-20 15:32:55 +00:00
Bruce Momjian
85f51dea1c Supress ecpg thread test if configure didn't enable threads. Fix
tools/thread to run even if configure didn't enable threads because this
test is used before enabling threads for the OS.
2003-12-19 23:29:15 +00:00
Bruce Momjian
580cae7567 Prevent service dbname from defaulting to service name, per bug report
from Michael Fuhr
2003-12-19 21:50:54 +00:00
Tom Lane
e0cd175212 Fix memory leak with SSL connections due to missing X509_free() calls.
Per Neil Conway.
2003-12-18 22:49:26 +00:00
Peter Eisentraut
ed8e5143c2 Forgot to change one compatlib.h. 2003-12-18 20:25:58 +00:00
Peter Eisentraut
ad8c09c29c Move Informix compatibility include files out of the way. compatlib.h
was integrated into ecpg_informix.h, the other ones go into their own
subdirectory that is automatically considered by the embedded preprocessor
when in Informix mode.
2003-12-18 18:55:09 +00:00
Dave Cramer
b4ed1edb57 patch for new OID74Test 2003-12-18 04:17:17 +00:00
Dave Cramer
b9deede241 fixed up OID74 test to conform with other tests, by Kris Jurka 2003-12-18 04:08:30 +00:00
Dave Cramer
bb58eed004 patch by Kris Jurka to use the correct protocol based upon server information 2003-12-18 03:27:15 +00:00
Dave Cramer
9dddd242dd revoked patch from Kris Jurka to fix multiarguments, and changed test to create
a temp table
2003-12-17 15:45:05 +00:00
Dave Cramer
e4955c2ec3 patch from Kris Jurka to fix large object 7.1 compatible protocol issues
modified test case from Alexey Yudichev to be part of the testsuite
2003-12-17 15:38:42 +00:00
Michael Meskes
95eea2d89c - Added just another patch by Dave that fixes a reversed order in
variable listing for output variables in cursor definitions
- Fixed incorrect if call in long=>numeric conversion.
2003-12-17 15:23:45 +00:00
Dave Cramer
845109e606 added polish translation submitted by Piotr Maj 2003-12-17 13:25:14 +00:00
Dave Cramer
7ac2f11c14 add missing SQLState by Patrick Higgins 2003-12-12 18:36:20 +00:00
Dave Cramer
605c1e6df0 cancel row updates sets values to null by Kris Jurka 2003-12-12 18:34:14 +00:00
Dave Cramer
06ec9044b5 patch to indicate why test cases failed from Oliver Jowett 2003-12-12 18:30:27 +00:00
Dave Cramer
8727029969 patch to fix returning he information schema as a system object by Kris Jurka 2003-12-12 18:27:51 +00:00
Dave Cramer
777acbb345 fix casting pooled connections to PGStatement problem patch by JariP 2003-12-12 18:05:34 +00:00
Dave Cramer
ef6a80431f patch to build under jdk1.1 from Richard Scranton 2003-12-12 17:58:34 +00:00
Dave Cramer
4bb71ef519 binary stream patch by Kris Jurka fixes empty stream failure 2003-12-12 00:26:20 +00:00
Dave Cramer
f9d3ed65c4 metadata encoding patch from Kris Jurka 2003-12-12 00:21:36 +00:00
Dave Cramer
742ca2e057 build number set to 300 to avoid conflict with 7.4 builds
threadsafe patch from Karl von Randow applied
2003-12-11 18:10:40 +00:00
Dave Cramer
fc1dc0cd33 patch to deal with unique foreign keys in 7.4 from Kris Jurka 2003-12-11 15:50:20 +00:00
Dave Cramer
6ae740dbd8 tch to make sure PSQLState is Serializable and a test case to prove it 2003-12-11 15:13:34 +00:00
Dave Cramer
e77708d9be patch to make sure PSQLState is Serializable and a test case to prove it 2003-12-11 15:11:43 +00:00
Dave Cramer
67173060e6 incremented build to 211 2003-12-10 18:30:44 +00:00
Michael Meskes
3819afa759 Added patch by Dave Cramer for array handling in ecpglib. 2003-12-03 08:49:17 +00:00
Joe Conway
b8f40ced2f Make PQescapeBytea and byteaout consistent with each other, and
octal escape all octets outside the range 0x20 to 0x7e. This fixes
the problem pointed out by Sergey Yatskevich here:
http://archives.postgresql.org/pgsql-bugs/2003-11/msg00140.php
2003-11-30 20:55:09 +00:00
Bruce Momjian
32abf0e781 Bump all version numbers and version stamps mentioned in RELEASE_CHANGES. 2003-11-30 06:09:54 +00:00
Bruce Momjian
38887379a2 Reorder win32/bcc makefile mentions of thread.c for sanity. 2003-11-30 06:01:15 +00:00
Bruce Momjian
edfccd3d32 Add thread.c to Borland CC build. 2003-11-30 05:54:33 +00:00
PostgreSQL Daemon
55b113257c make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
PostgreSQL Daemon
969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Peter Eisentraut
9a8b7c0f69 Cast field-length variables used in printf to int, because sometimes
they might be of a wider type.
2003-11-26 15:55:01 +00:00
Peter Eisentraut
8878cc4cd7 Rename USE_THREADS to ENABLE_THREAD_SAFETY to avoid name clash with Perl.
Fixes compilation failure with --enable-thread-safety --with-perl and Perl
5.6.1.
2003-11-24 13:16:22 +00:00
Michael Meskes
5032f83082 Fixed typo in create schema parsing. 2003-11-19 13:18:13 +00:00
Peter Eisentraut
7397819f78 Translation updates 2003-11-14 23:59:12 +00:00
Michael Meskes
135ecf8d96 Re-added forgotten cache. 2003-11-10 20:28:30 +00:00
Tom Lane
45fe4042df Restore compatibility with Tcl 8.0.* --- from ljb. 2003-11-08 20:34:36 +00:00
Michael Meskes
87758314ca Made sure an internal array is not treated as a user defined one. 2003-11-08 19:46:27 +00:00
Dave Cramer
622736aa4a Added missing methods 2003-11-05 11:57:53 +00:00
Dave Cramer
b720fa96fb patch for rs.previous and test case as well as patch for allowing server and port to be specified in test cases 2003-11-03 15:28:26 +00:00
Dave Cramer
efea5da4fa accept url and fk action fix from Kris Jurka 2003-11-03 15:22:07 +00:00
Michael Meskes
90e53f0c16 Fixed potentially uninitialized memory bug in compatlib. 2003-11-03 14:44:28 +00:00
Peter Eisentraut
1af403e42d Complete options help and put it in less random order. 2003-11-02 12:55:24 +00:00
Tom Lane
bcf4d35699 Minor cleanup of PQunescapeBytea(). Avoid unportable assumptions about
behavior of malloc and realloc when request size is 0.  Fix escape
sequence recognizer so that only valid 3-digit octal sequences are
treated as escape sequences ... isdigit() is not a correct test.
2003-10-31 17:43:10 +00:00
Michael Meskes
e6152300f1 If EOF is found inside a string/comment/etc. stop parsing. 2003-10-31 14:10:41 +00:00
Tom Lane
ede9b68e03 Use Tcl ByteArray objects to avoid unwanted character set translation
in libpgtcl's lo_read/lo_write commands.  Also, deal correctly with
failure return from lo_read().  ljb and Tom Lane.
2003-10-31 00:18:55 +00:00
Dave Cramer
f4b4d7ce60 use the result set to set the fetchsize 2003-10-30 12:18:56 +00:00
Michael Meskes
f590a5ea72 Applied patch by Dave Cramer to fix several bugs in compatlib. 2003-10-30 10:19:30 +00:00
Dave Cramer
7ecb6ede28 Patches from Oliver Jowett to fix CursorFetchTest, 7.4 now does not automatically delete cursors 2003-10-29 02:39:10 +00:00
Tom Lane
979b537522 Include -lkrb5 when needed for shlibs depending on libpq. Per report
from Johan Henselmans.
2003-10-28 21:55:58 +00:00
Michael Meskes
0262337ad3 Fixed bug with indicators when storage for the string is dynamically allocated. 2003-10-26 09:50:47 +00:00
Peter Eisentraut
002e7b3789 Translation updates 2003-10-25 18:03:21 +00:00
Bruce Momjian
6db0a6b035 Remove socket credentials defines not referenced. 2003-10-25 03:48:47 +00:00
Tom Lane
0634c01e3a Add missing semicolon, per Johann Uhrmann.
Avoids warnings from newer bisons.
2003-10-22 16:43:42 +00:00
Tom Lane
7eb67fc98b Cope with platforms that offer LONGLONG_MIN in place of the C99-spec
LLONG_MIN.  One example is AIX, per report from Andreas.
2003-10-21 15:34:34 +00:00
Michael Meskes
3b72087bf6 Install dummy sqlda.h file since this is needed for compatibility. 2003-10-20 12:54:29 +00:00
Tom Lane
9dfdbef345 Adjust libpq to avoid deadlock when both client and server want to send
data, and both have filled the transmission buffers.  One scenario where
this can happen was illustrated here:
http://archives.postgresql.org/pgsql-hackers/2003-04/msg00979.php
2003-10-19 21:36:41 +00:00
Michael Meskes
d5353acbc3 Check for both Informix modes when parsing include files. 2003-10-19 13:22:33 +00:00
Tom Lane
f2f7107024 Must free the pgParameterStatus chain in freePGconn(). My fault,
well spotted by Neil Conway.
2003-10-18 05:02:06 +00:00
Peter Eisentraut
578774d5f5 Translation update 2003-10-15 09:45:34 +00:00
Peter Eisentraut
dee5b779fa New translation 2003-10-15 09:39:04 +00:00
Peter Eisentraut
037468eff2 New translation 2003-10-12 19:16:36 +00:00
Michael Meskes
84b35a7f76 Added missing "commit" in test case. 2003-10-12 15:19:46 +00:00
Peter Eisentraut
108f371769 Translation updates 2003-10-10 08:01:44 +00:00
Jan Wieck
f8d90fcc0a Protected access to variable m_preparedCount via synchronized
function to prevent multiple threads using automatic cursors on
the same connection from stomping over each others cursor.

Jan
2003-10-09 01:17:07 +00:00
Michael Meskes
163f0b2d48 Removed my debug printf() call from numeric.c 2003-10-08 08:28:57 +00:00
Michael Meskes
cfd992ecba Fixed floating point exception in long=>numeric conversion. 2003-10-07 18:36:46 +00:00
Peter Eisentraut
06e6aa236c Add missing include file. 2003-10-07 08:07:56 +00:00
Michael Meskes
3cda980298 Fixed error handling in Informix compat str to date conversion. 2003-10-07 05:46:56 +00:00
Peter Eisentraut
f98cbb76a0 Translation updates 2003-10-06 17:37:39 +00:00
Peter Eisentraut
a0ab31dcc6 New Slovene translations 2003-10-06 16:31:16 +00:00
Michael Meskes
aeb1f6478e - Fixed constant listing in execute using clause.
- Fixed typo in ecpg for Informix dec_t type.
- Fixed precision handling in Informix compat funxtions.
2003-10-06 06:44:55 +00:00
Peter Eisentraut
5e3aaf5402 Translation updates 2003-10-06 06:20:11 +00:00
Peter Eisentraut
eceff4cc55 Translation updates 2003-10-05 21:52:37 +00:00
Michael Meskes
8e6b74e4fd Fixed bug in day of week processing. 2003-10-05 11:12:00 +00:00
Tom Lane
fa09ee6026 Document the always-true-but-previously-undocumented fact that PQfnumber()
will downcase the supplied field name unless it is double-quoted.  Also,
upgrade the routine's handling of double quotes to match the backend,
in particular support doubled double quotes within quoted identifiers.
Per pgsql-interfaces discussion a couple weeks ago.
2003-10-04 21:05:21 +00:00
Peter Eisentraut
0a14ffe5b5 Translation updates 2003-10-04 18:13:16 +00:00
Peter Eisentraut
75e76e1cf5 Translation updates 2003-10-04 01:07:05 +00:00
Peter Eisentraut
4cb67993a7 Format help message internally consistent. 2003-10-04 01:06:38 +00:00
Peter Eisentraut
beb935148a New translation 2003-10-03 22:39:34 +00:00
Tom Lane
251033186f Cause PQescapeString to stop processing at a null character, rather
than generating an invalid output string.  Per observation and patch
from Igor Shevchenko.  Further code cleanup and documentation by
Tom Lane.
2003-10-03 18:26:14 +00:00
Tom Lane
3b4c142030 Remove assorted compilation failures introduced by latest ecpg changes.
Also remove -g, which has no business in CPPFLAGS in the first place,
let alone being hardwired there by a sub-Makefile.
2003-10-03 17:04:48 +00:00
Michael Meskes
1bd5e054ed Hide Informix datatypes. They are not seen by our built process anymore. 2003-10-03 10:07:28 +00:00
Tom Lane
b4966453f6 Do not return from PQrequestCancel until postmaster has finished
processing the request; this ensures that the request won't be taken
to cancel a subsequently-issued query.  Race condition originally
noted by Oliver Jowett in the context of JDBC, but libpq has it too.
2003-10-02 19:52:44 +00:00
Tom Lane
bf2f5d9463 Don't use 0 as a spelling of NULL. 2003-10-02 14:47:44 +00:00
Peter Eisentraut
55fbc98b3f Adjust the new Norwegian translation for some of the easier message
changes between 7.3 and 7.4, for example quoting and function names.
2003-09-29 16:41:33 +00:00
Peter Eisentraut
f4d5d620f2 Make message fit guidelines. 2003-09-29 16:38:04 +00:00
Peter Eisentraut
a776bd9b69 New Norwegian translation by Trond Endrestøl, actually made for 7.3, but
this should help people get started in 7.4 as well.
2003-09-29 10:57:06 +00:00
Tom Lane
e0736689a3 Got the link order wrong :-( 2003-09-27 20:38:19 +00:00
Tom Lane
cd75f94daf Adjust Darwin build to use the default 'two level namespace' linking
method.  Fix a number of places where shared libraries were linked without
mentioning all the libraries they depend on; the Darwin and AIX ports
are known to require this, and it doesn't seem to hurt any other supported
platforms.  (Hence, remove code in pl/tcl makefile that tried to avoid
mentioning other libs if not needed.)
2003-09-27 19:35:32 +00:00
Bruce Momjian
227dd9b427 Rename thread compile flag. Move thread test program to tools/thread,
and improve tests.
2003-09-27 15:32:48 +00:00
Michael Meskes
e11136e4a5 Fixed segfault after error in parsing precision argument. 2003-09-26 15:16:29 +00:00
Bruce Momjian
266664fcd2 Fix creation of temporary sequences in ecpg, per report from Edmund Bacon. 2003-09-24 19:05:32 +00:00
Michael Meskes
5a5f0a6168 - Changed struct definition handling so "struct foo {}" always gets defined. 2003-09-23 12:56:35 +00:00
Barry Lind
2ec8ee0c0c Fix to properly handle timezone offsets that are partial hours. If the offset
was a partial hour and less than gmt (i.e. -02:30) the code would corrupt the
minutes part.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-09-23 06:13:52 +00:00
Barry Lind
618d56d09a A fix for jdbc regression test submitted yesterday by Kim Ho at Redhat
Modified Files:
 	ResultSetTest.java
2003-09-23 06:11:06 +00:00
Michael Meskes
22c0b1f0f4 - Fixed order mismatch in processing "using" arguments.
- Fixed some minor things in test cases.
- Use defines for Informix error codes.
2003-09-22 13:19:39 +00:00
Barry Lind
8839b85ed8 Additional jdbc regression tests submitted by Oliver Jowett. Some tests are
currently commented out, pending fixes for the bugs these tests uncovered.

 Modified Files:
 	jdbc/org/postgresql/test/jdbc2/Jdbc2TestSuite.java
 	jdbc/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java
 Added Files:
 	jdbc/org/postgresql/test/jdbc2/CursorFetchTest.java
2003-09-22 05:38:01 +00:00
Barry Lind
66d00417c9 Applied jdbc patch from Kim Ho at RedHat to improve boolean support, as well
as some additional regression tests for this an other recent changes.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/test/jdbc2/DateTest.java
 	jdbc/org/postgresql/test/jdbc2/ResultSetTest.java
 	jdbc/org/postgresql/test/jdbc2/TimeTest.java
 	jdbc/org/postgresql/test/jdbc2/TimestampTest.java
2003-09-22 04:55:00 +00:00
Peter Eisentraut
278a13fe47 Translation updates 2003-09-22 00:27:01 +00:00
Peter Eisentraut
6f57d63cb4 Message wording improvements 2003-09-22 00:23:35 +00:00
Tom Lane
11b274f00f Fix some ill-considered ifdefs, per report from Hans-JÏrgen SchÎnig. 2003-09-21 17:42:22 +00:00
Michael Meskes
3438065eed - Renamed my own strndup() function because of a name clash. 2003-09-20 09:10:50 +00:00
Michael Meskes
f604b39c2f - Applied some bug fixing patches by Dave Cramer <dave@fastcrypt.com>.
- Added protecting defines to include files.
2003-09-20 09:10:09 +00:00
Michael Meskes
580e08a98b One small typo in preprocessor. 2003-09-19 14:13:16 +00:00
Michael Meskes
df974272ec Removed superfluous return statement in get_data. 2003-09-19 14:06:21 +00:00
Michael Meskes
723a9bde33 - Accept output variables for FETCH in DECLARE statement.
- Synced parser.
- Allowed C variables to carry the name of prepared statements.
- Added Informix handling of datatype converion errors.
2003-09-18 13:12:23 +00:00
Barry Lind
215d965f0e Applied patch from Oliver Jowett to clean up some instances where the wrong
type was being reported for PREPAREs.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java
2003-09-18 04:14:27 +00:00
Barry Lind
7da6afef26 Small jdbc patch from Kim Ho at RedHat to fix some boolean problems
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
2003-09-18 04:09:02 +00:00
Barry Lind
47cb1c3f94 A minor fix to jdbc regression tests
Modified Files:
 	jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataPropertiesTest.java
2003-09-18 03:58:16 +00:00
Barry Lind
e8839c2b6c Applied patch to jdbc from Kim Ho at RedHat, fixing improper handling of empty queries under the V3 protocol
Modified Files:
 	jdbc/org/postgresql/core/QueryExecutor.java
2003-09-17 08:21:36 +00:00
Barry Lind
c020d67bc6 Applied patch for jdbc from Kim Ho at RedHat to more correctly deal with boolean values
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
2003-09-17 07:00:24 +00:00
Barry Lind
292048f186 Fixed jdbc to correctly report that constraints are supported
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
2003-09-17 06:42:47 +00:00
Barry Lind
33815bf657 Applied patch from Fernando Nasser of RedHat to fix some error messages
that would not get correctly looked up in the translation files for jdbc

 Modified Files:
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
2003-09-17 05:14:52 +00:00
Barry Lind
0671b65b81 Applied patch from Kim Ho at redhat to improve boolean and bit handling
in the jdbc driver

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3Statement.java
2003-09-17 05:07:38 +00:00
Tom Lane
fc73264005 I don't care whether it's informix-compatible or not: #defining a word
like 'date' in a public header file is a damn fool idea.
2003-09-16 04:32:28 +00:00
Peter Eisentraut
7ce5f25b5b Translation updates 2003-09-15 20:42:40 +00:00
Barry Lind
509a9cd3f9 More SQLState updates from Kim Ho at Redhat.
Also a patch from Kris Jurka to correctly report SQLState support.

 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/fastpath/Fastpath.java
 	jdbc/org/postgresql/geometric/PGbox.java
 	jdbc/org/postgresql/geometric/PGcircle.java
 	jdbc/org/postgresql/geometric/PGline.java
 	jdbc/org/postgresql/geometric/PGlseg.java
 	jdbc/org/postgresql/geometric/PGpath.java
 	jdbc/org/postgresql/geometric/PGpoint.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/Array.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3DatabaseMetaData.java
 	jdbc/org/postgresql/util/PGmoney.java
 	jdbc/org/postgresql/util/PSQLState.java
2003-09-13 04:02:16 +00:00
Michael Meskes
573f4500a3 Some uppercase type definitions were left. 2003-09-10 18:03:08 +00:00
Barry Lind
62b53accd4 Clean up some unused import warnings in the example jdbc code 2003-09-09 11:24:04 +00:00
Barry Lind
5cdf771d8a Additional SQLState work for JDBC - thanks to Kim Ho at Redhat for input on this
Modified Files:
 	jdbc/build.xml jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/util/PSQLState.java
2003-09-09 10:49:16 +00:00
Michael Meskes
fcdf0e22fc - Added Dave patch for Informix handling of numeric/int conversion.
- Changed all new datatypes to lowercase.
- Fixed rounding bug in numerical types.
2003-09-09 10:46:42 +00:00
Barry Lind
05dddf40c2 Opps, can't forget the new file. This is part of the last commit to apply
the redhat patch for SQLState support.

 Added Files:
 	PSQLState.java
2003-09-08 17:45:35 +00:00
Barry Lind
0378a269f3 This set of changes applies a patch from KHO at redhat to add some SQLState
support to the jdbc driver.
That patch needed some work: it assumed the sqlcode in a server message was
fixed in its position, the patch lost the ability to pass exceptions, and the
patch missed a couple of places where server errors where being received.
In addition to fixing the above, I also added full support for the V3 protocol
error message syntax, I reversed the order of arguments in the PSQLException
constructor to more closely follow the constructors for SQLException, I changed
the new constructors that take PSQLState to take Object for additional
parameters as the old ones did.
Still todo are to add SQLState values to all existing exceptions thrown in the
driver and add support for parsing the V3 protocol format for notices.

 Modified Files:
 	jdbc/build.xml jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/core/Encoding.java
 	jdbc/org/postgresql/core/PGStream.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/fastpath/Fastpath.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/util/MessageTranslator.java
 	jdbc/org/postgresql/util/PSQLException.java
2003-09-08 17:30:22 +00:00
Bruce Momjian
4b407f6c3c Changes for MinGW/WIN32:
o allow configure to see include/port/win32 include files
        o add matching Win32 accept() prototype
        o allow pg_id to compile with native Win32 API
        o fix invalide mbvalidate() function calls (existing bug)
        o allow /scripts to compile with native Win32 API
        o add win32.c to Win32 compiles (already in *.mak files)
2003-09-07 03:43:57 +00:00
Bruce Momjian
2dc9437160 Enable Win32 to compile libpq again, and enable SSL compiles on that
platform.

Andreas Pflug
2003-09-05 02:08:36 +00:00
Bruce Momjian
1709fde56a Improve prototype casting for thread calls. 2003-09-05 01:53:41 +00:00
Peter Eisentraut
30b4abf5d0 Remove outdated CLI things. 2003-09-02 21:45:37 +00:00
Peter Eisentraut
5f65345a57 Do not pass server_encoding to the client.
libpq, talking to an old server, should assume SQL_ASCII as the default
client encoding, because that is what the server will actually use (not
the server encoding).
2003-09-01 23:04:49 +00:00
Michael Meskes
05f4b03b23 Fixed two bugs in pgtypes library. 2003-09-01 12:37:40 +00:00
Peter Eisentraut
f2c2943aae Share PG_DIAG_* macros between client and server and use them internally. 2003-08-27 00:33:34 +00:00
Michael Meskes
47a4e2ed1c Fixed connect statement with username in variable. 2003-08-26 16:09:02 +00:00
Barry Lind
06bbd98a15 Attempt to fix setMaxFieldSize() logic that was checked in yesterday.
I think this should fix the problem, but since I don't have a reproducable test
case, I can't be sure.  This problem is reported by Kim Ho of redhat, who will
test this fix.  This also includes a test case for the original functionality.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/test/jdbc2/ResultSetTest.java
2003-08-26 06:50:39 +00:00
Michael Meskes
4b02f3c4eb Synced parser and fixed a bug in error output to log file. 2003-08-25 13:44:00 +00:00
Barry Lind
2495365df1 Applied patches from Oliver Jowett to fix the following bugs:
- adds a finalizer method to AbstractJdbc1Statement to clean up in the case of
   poor user code which fails to close the statement object
 - fix ant build file to correctly detect dependencies across jdbc1/jdbc2/jdbc3
 - fix a coupld of server prepared statement bugs and added regression test for
   them
Applied patch from Kim Ho:
 - adds support for get/setMaxFieldSize().
Also fixed build.xml to provide a better error message in the event that an
older version of the driver exists in the classpath when trying to build.
2003-08-24 22:10:09 +00:00
Peter Eisentraut
903fe8fc6f Translation updates 2003-08-24 21:18:53 +00:00
Peter Eisentraut
c3664c0c00 Add macros for error result fields to libpq. 2003-08-24 18:36:38 +00:00
Peter Eisentraut
588970c399 Correct uninstall target. 2003-08-23 04:21:59 +00:00
Peter Eisentraut
ef38ca9b3d Translation updates 2003-08-20 21:10:01 +00:00
Barry Lind
dcfa89537a Updated the blob regression test to actually use the getBlob/getClob methods
and test them, in addition to testing the underlying LargeObject API methods.

 Modified Files:
 	jdbc/build.xml jdbc/org/postgresql/test/jdbc2/BlobTest.java
2003-08-15 18:45:11 +00:00
Barry Lind
5cad6813fb Fixed improper message length for the connection termination message 'X' when
using the V3 protocol.

 Modified Files:
 	jdbc1/AbstractJdbc1Connection.java
2003-08-15 18:36:58 +00:00
Tom Lane
c01641f8ae libpq failed to cope with COPY FROM STDIN if the command was issued
via extended query protocol, because it sends Sync right after Execute
without realizing that the command to be executed is COPY.  There seems
to be no reasonable way for it to realize that, either, so the best fix
seems to be to make the backend ignore Sync during copy-in mode.  Bit of
a wart on the protocol, but little alternative.  Also, libpq must send
another Sync after terminating the COPY, if the command was issued via
Execute.
2003-08-13 18:56:21 +00:00
Tom Lane
0be731ad44 Add PQexecPrepared() and PQsendQueryPrepared() functions, to allow
libpq users to perform Bind/Execute of previously prepared statements.
Per yesterday's discussion, this offers enough performance improvement
to justify bending the 'no new features during beta' rule.
2003-08-13 16:29:03 +00:00
Tom Lane
90ade5b775 Cope with NoData message from backend. Needed for case where
PQexecParams is used with a statement that doesn't return data.
2003-08-12 21:34:44 +00:00
Barry Lind
e3d97d7da2 Applied patch from Oliver Jowett to clean up the jdbc regression test build
Modified Files:
 	jdbc/build.xml
 	jdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java
2003-08-11 23:42:04 +00:00
Barry Lind
c9fa2871f6 Applied patch from Oliver Jowett to better handle invalid input for getArray
(no longer throw an index out of range exception)

 Modified Files:
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
2003-08-11 21:33:50 +00:00
Barry Lind
1f96440d66 Applied patch from Oliver Jowett to clean up some aditional warning messages
from ant.

 Modified Files:
 	jdbc/build.xml
2003-08-11 21:27:52 +00:00
Barry Lind
17108e6c4f Applied patch from Oliver Jewett to fix a deprecation in newer versions of ant
Modified Files:
 	jdbc/build.xml
2003-08-11 21:25:01 +00:00
Barry Lind
c82bfea125 Applied patch from Oliver Jewett to clean up the testing README file
Modified Files:
 	jdbc/org/postgresql/test/README
2003-08-11 21:20:50 +00:00
Barry Lind
1ca4e700de Applied patch by Oliver Jowett to clean up some exception handling
Modified Files:
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/util/PSQLException.java
2003-08-11 21:18:47 +00:00
Barry Lind
d7c609f7c4 Applied patch from Oliver Jowett to improve a buffer sizing.
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-08-11 21:12:00 +00:00
Barry Lind
fcbf1f1fdd Applied patch from Kim Ho to fix a regression against a 7.4 server. The result
of transaction isolation level changed from uppercase to lower case between 7.3 and 7.4.  In testing, a regression was also fixed in this area when talking to
a 7.2 server due to changes in how notice messages are processed in the current
code.

 Modified Files:
 	jdbc/build.xml jdbc/org/postgresql/core/BaseStatement.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
2003-08-11 20:54:55 +00:00
Peter Eisentraut
7078441af0 Translation updates 2003-08-11 15:19:58 +00:00
Bruce Momjian
46785776c4 Another pgindent run with updated typedefs. 2003-08-08 21:42:59 +00:00
Bruce Momjian
6a991845a3 sprompt not needed in libpq. 2003-08-08 16:32:45 +00:00
Peter Eisentraut
fbf1fd2650 Fix null checking of type decimal datums without indicator in Informix
mode.

from Dave Cramer
2003-08-08 13:17:58 +00:00
Peter Eisentraut
e39bc695d6 Be a little bit more careful about using sqlstate, in case libpq returned
NULL for it.
2003-08-08 13:16:20 +00:00
Peter Eisentraut
0bf70870db Translation updates by Dennis Björklund 2003-08-08 11:03:29 +00:00
Peter Eisentraut
acbef53d1f Remove postgres_ext.h inclusion -- not necessary. 2003-08-08 10:43:54 +00:00
Bruce Momjian
63c4d156e0 Move simple_prompt()/sprompt.c into /port. 2003-08-08 04:52:22 +00:00
Bruce Momjian
522b4937b3 Makefile cleanup. 2003-08-08 03:22:24 +00:00
Bruce Momjian
48af71423d Cleanup. 2003-08-08 03:18:40 +00:00
Bruce Momjian
86b07104dd Makefile cleanup. 2003-08-08 03:03:54 +00:00
Bruce Momjian
ba0d38fd89 More thread.c cleanup. 2003-08-08 03:00:31 +00:00
Bruce Momjian
30c63f460a More threading cleanups. 2003-08-08 02:55:08 +00:00
Bruce Momjian
e4cbb982b0 threads.c -> thread.c, be consistent. 2003-08-08 02:46:40 +00:00
Bruce Momjian
e060701f51 Clean up function header. 2003-08-07 23:43:32 +00:00
Bruce Momjian
d8295603c8 Make table column type TEXT. 2003-08-07 16:37:31 +00:00
Bruce Momjian
697f9f09ed Add iteration option to thread test program. 2003-08-07 16:14:03 +00:00
Bruce Momjian
00c11039d4 Update ecpg thread testing program to be more automated. 2003-08-07 05:12:00 +00:00
Bruce Momjian
042221db83 Include postgres_ext.h instead of postgres_fe.h. This allows ecpg
output C files to proper compile again.
2003-08-07 04:44:26 +00:00
Bruce Momjian
df5a58811b Add -lm for ecpg/pgtypeslib/Makefile link so -lm isn't required for ecpg
compiles.
2003-08-07 04:03:18 +00:00
Barry Lind
acf09c64b0 Sometimes the third time is the charm. Third try to fix the sql injection
vulnerability.  This fix completely removes the ability (hack) of being able
to bind a list of values in an in clause.  It was demonstrated that by allowing
that functionality you open up the possibility for certain types of
sql injection attacks.  The previous fix attempts all focused on preventing
the insertion of additional sql statements (the semi-colon problem:
xxx; any new sql statement here).  But that still left the ability to
change the where clause on the current statement or perform a subselect
which can circumvent applicaiton security logic and/or allow you to call
any stored function.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-08-07 04:03:13 +00:00
Tom Lane
a6672880e1 Fix compiler-detected problem for Alphas: it seems strlen returns
something wider than int on that platform.  Also, remove bogus
assumption that sizeof("INT_MAX") has something to do with the maximum
number of digits in an int.
2003-08-06 15:54:06 +00:00
Barry Lind
11e9dcc549 Applied patch from kho@redhat.com to fix a problem with trying to use a fetch
when a cursor wasn't being used.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
2003-08-06 05:53:13 +00:00
Bruce Momjian
149f01c4d4 Add ecpg thread testing file. 2003-08-06 02:19:51 +00:00
Tom Lane
39a9496d51 Fix some more problems with testing error returns from SSL. 2003-08-04 17:25:14 +00:00
Peter Eisentraut
fb19e2f41d Translation updates 2003-08-04 14:01:37 +00:00
Bruce Momjian
f3c3deb7d0 Update copyrights to 2003. 2003-08-04 02:40:20 +00:00
Bruce Momjian
089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Bruce Momjian
63354a0228 Remove extra paren in NOT_USED code, found by pgindent. 2003-08-04 00:26:49 +00:00
Tom Lane
57c08791d1 Code review for sslmode patch: eliminate memory leak, avoid giving a
completely useless error message in 'allow' case, don't retry connection
at the sendauth stage (by then the server will either let us in or not,
no point in wasting cycles on another try in the other SSL state).
2003-08-01 21:27:27 +00:00
Michael Meskes
25b10fc1e6 Missed two places to replace union member. 2003-08-01 18:19:03 +00:00
Tom Lane
6520c666c1 Fix a few of the more blatantly unportable constructs in this file. 2003-08-01 18:10:43 +00:00
Tom Lane
3a1ed8761f Fix inconsistent static-vs-not-static declarations. 2003-08-01 18:03:57 +00:00
Tom Lane
38a412ec39 Fix compile warning. 2003-08-01 16:46:06 +00:00
Peter Eisentraut
ec506c12cd Russian translation updates by Serguei Mokhov 2003-08-01 16:19:14 +00:00
Peter Eisentraut
7843a44839 Use only two-part shared library version numbers, for better portability
and consistency.
2003-08-01 16:18:04 +00:00
Peter Eisentraut
4f7df90db0 Make ecpg SQLSTATE-aware. Map existing SQLCODE assignments to SQLSTATEs,
rather than parsing the message.  Add some documentation about embedded
SQL.
2003-08-01 13:53:36 +00:00
Michael Meskes
0584370728 Added missing TO keyword. 2003-08-01 11:25:55 +00:00
Michael Meskes
7a9c074cba - Added some Informix error codes in Informix mode.
- Added just another pgtypeslib function.
2003-08-01 08:21:04 +00:00
Marc G. Fournier
4895635da4 clean python out of Makefile 2003-08-01 04:24:57 +00:00
Marc G. Fournier
13a0e910cd remove python module, as its moved to http://www.pygresql.org 2003-08-01 04:19:06 +00:00
Tom Lane
81b5c8a136 A visit from the message-style police ... 2003-07-28 00:09:16 +00:00
Bruce Momjian
9df48371c2 here are the patches for psql on Win32:
psql4win32.patch  - changes in the psql source code
  psql-ref.patch    - changes in the documentation psql-ref.sgml
                      (for new builtin variable WIN32_CONSOLE)

To apply them use "patch -p 1" in the root directory of the
postgres source directory.

These patches fix the following problems of psql on Win32
(all changes only have effect #ifdef WIN32):

  a) Problem:  Static library libpq.a did not work
     Solution: Added WSAStartup() in fe-connect.c

  b) Problem:  Secret Password was echoed by psql
     Solution: Password echoing disabled in sprompt.c

  c) Problem:  8bit characters were displayed/interpreted wrong in psql
               This is due to the fact that the Win32 "console" uses a
               different encoding than the rest of the Windows system
     Solution: Introduced a new psql variable WIN32_CONSOLE
               When set with "\set WIN32_console", the function OemToChar()
               is applied after reading input and CharToOem() before
               displaying Output

Christoph Dalitz
2003-07-27 03:32:26 +00:00
Bruce Momjian
397831e103 At long last I put together a patch to support 4 client SSL negotiation
modes (and replace the requiressl boolean). The four options were first
spelled out by Magnus Hagander <mha@sollentuna.net> on 2000-08-23 in email
to pgsql-hackers, archived here:

http://archives.postgresql.org/pgsql-hackers/2000-08/msg00639.php

My original less-flexible patch and the ensuing thread are archived at:

http://dbforums.com/t623845.html

Attached is a new patch, including documentation.

To sum up, there's a new client parameter "sslmode" and environment
variable "PGSSLMODE", with these options:

sslmode   description
-------   -----------
disable   Unencrypted non-SSL only
allow     Negotiate, prefer non-SSL
prefer    Negotiate, prefer SSL (default)
require   Require SSL

The only change to the server is a new pg_hba.conf line type,
"hostnossl", for specifying connections that are not allowed to use SSL
(for example, to prevent servers on a local network from accidentally
using SSL and wasting cycles). Thus the 3 pg_hba.conf line types are:

pg_hba.conf line types
----------------------
host       applies to either SSL or regular connections
hostssl    applies only to SSL connections
hostnossl  applies only to regular connections

These client and server options, the postgresql.conf ssl = false option,
and finally the possibility of compiling with no SSL support at all,
make quite a range of combinations to test. I threw together a test
script to try many of them out. It's in a separate tarball with its
config files, a patch to psql so it'll announce SSL connections even in
absence of a tty, and the test output. The test is especially informative
when run on the same tty the postmaster was started on, so the FATAL:
errors during negotiation are interleaved with the psql client output.

I saw Tom write that new submissions for 7.4 have to be in before midnight
local time, and since I'm on the east coast in the US, this just makes it
in before the bell. :)

Jon Jensen
2003-07-26 13:50:02 +00:00
Michael Meskes
6a0d6d0060 Added explicit casts for date/interval/timestamp. 2003-07-25 16:10:26 +00:00
Michael Meskes
4c4a667f4d Applied Peter's patch to use yyless instead of my string_unput function. 2003-07-25 05:42:27 +00:00
Michael Meskes
060229b9d7 Fixed mdy functions to use correct offset. 2003-07-24 08:41:07 +00:00
Barry Lind
a7a012d167 Fixes additional sql injection vulnerabilities reported by Oliver Jowett
and Dmitry Tkach.  Specifically the previous fix still allowed the statement termination character through in unquoted places in the sql statement, and the driver never correctly handled someone passing a value of \0 in a string which under the v2 protocol would end the statement causing the following text to possibly
be treated as a new sql statement
 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-24 00:30:39 +00:00
Tom Lane
df63503dc2 Have a go at fixing various outstanding portability issues in code that
was modified for IPv6.  Use a robust definition of struct sockaddr_storage,
do a proper configure test to see if ss_len exists, don't assume that
getnameinfo() will handle AF_UNIX sockets, don't trust getaddrinfo to
return the protocol we ask for, etc.  This incorporates several outstanding
patches from Kurt Roeckx, but I'm to blame for anything that doesn't
work ...
2003-07-23 23:30:41 +00:00
Peter Eisentraut
56b8a6f5d1 Czech translation updates from Karel Zak 2003-07-23 09:36:43 +00:00
Barry Lind
0a73f69cb4 Fix to prevent SQL injection attacks for code calling setObject(int,Object,int)
where Object is a user supplied String and the type is a numeric type
(i.e. INTEGER,LONG,etc).
Also applied a patch from Kim Ho that fixes compile problems under jdk1.2

 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-22 05:17:09 +00:00
Barry Lind
80bbd3281d Applied patch from dmitry@openratings.com to fix parsing of array values
Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc2/Array.java
2003-07-21 20:48:31 +00:00
Michael Meskes
45d8f61ff2 Added more compat stuff ot the parser. 2003-07-18 14:32:56 +00:00
Tom Lane
157e17e20d Add an upper limit to IS_VALID_JULIAN() to defend against overflow in
date2j().  This ensures we give reasonable errors instead of bizarre
behavior for input dates far in the future.
2003-07-17 22:28:42 +00:00
Michael Meskes
c15b66ef82 Allow blanks at the end of numerical values. 2003-07-17 11:27:55 +00:00
Michael Meskes
7d32551a81 Fixed some bugs in Informix compat functions. 2003-07-17 07:54:29 +00:00
Tom Lane
764f72dc82 Make EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE follow the SQL convention
for the sign of timezone offsets, ie, positive is east from UTC.  These
were previously out of step with other operations that accept or show
timezones, such as I/O of timestamptz values.
2003-07-17 00:55:37 +00:00
Michael Meskes
96be4b28a3 Applied patch to fix two compatibility functions. 2003-07-16 13:18:51 +00:00
Michael Meskes
42df5e311f Started to create different error codes for different backend messages. 2003-07-15 12:38:38 +00:00
Michael Meskes
6eb27d16b6 Missed one rule in syncinc preproc.y which resulted in reduce/reduce conflicts. 2003-07-14 12:18:25 +00:00
Michael Meskes
e895eb197d - Synced preproc.y with gram.y
- Init sqlca in ECPGprepare().
        - Added CLOSE DATABASE for Informix compatibility.
2003-07-14 10:16:45 +00:00
Michael Meskes
18936ef372 Argh! Missed one file. 2003-07-09 14:53:18 +00:00
Michael Meskes
abfa8ae54f Fixed some Informix compat functions so they handle NULL resp. indicators better. 2003-07-09 13:49:38 +00:00
Barry Lind
6896bfa86c Applied patch from Kim Ho @ redhat.com to make support for setObject() more
spec complient with regards to various data/time/timestamp objects

 Modified Files:
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-09 05:12:04 +00:00
Michael Meskes
f207718b0c More informix fixes. 2003-07-08 12:11:35 +00:00
Michael Meskes
fee6fd7f65 Fix segfault in connect in informix mode. 2003-07-08 07:13:48 +00:00
Michael Meskes
91d60637cf "char *" of course is not the same as "char []". So I had to fix the way ecpg treated the second one. 2003-07-07 12:15:33 +00:00
Tom Lane
841b4a2d55 tm2timestamp should return -1, not elog, on overflow. (In the backend
this is merely an API inconsistency, but in ecpg it's fatal.)  Also,
fix misconceived overflow test in HAVE_INT64_TIMESTAMP case.
2003-07-04 18:21:14 +00:00
Tom Lane
3abbce39d5 Fix missing code for HAVE_INT64_TIMESTAMP. 2003-07-04 18:15:10 +00:00
Tom Lane
efbbd107c7 Add #include <limits.h> (re-add lost change from Wednesday). 2003-07-04 16:28:03 +00:00
Michael Meskes
c7fddd3072 date, interval and timestamp data should be quoted. 2003-07-04 12:00:52 +00:00
Michael Meskes
23e4fc18a7 Fixed informix behaviour for select without into. 2003-07-04 11:30:48 +00:00
Michael Meskes
7b1885bf98 Fixed initialization bug and added postgres_fe.h to pgtypeslib. 2003-07-02 07:57:36 +00:00
Bruce Momjian
cc3002313f Fix ecpg typo --- change ;; to ;. 2003-07-01 19:58:23 +00:00
Michael Meskes
2bdd2e5dcf Use ISO dates in pgtypeslib by default.
Applied patch by Philip Yarra to fix some thread issues.
Added a new data type "decimal" which is mostly the same as our
	"numeric" but uses a fixed length array to store the digits. This is
	for compatibility with Informix and maybe others.
2003-07-01 12:40:52 +00:00
Dave Cramer
df08f5c003 patches by Kim Ho to fix
getByte, getSort if input has decimal or whitespace
setObject if object is a BIT
boolean not on list of SQLKeywords
2003-06-30 21:10:55 +00:00
Barry Lind
9af05a9d10 Patches applied:
1) Patch from Kris Jurka to fix IPv6 parsing of the jdbc URL
	2) Patch from Kris Jurka to fix an ArrayIndexOutOfBounds error
	   when calling moveToCurrentRow while currentRow is "beforeFirst"
	3) Patch from Kim Ho to fix add some bounds checking in setMaxRows(),
	   setQueryTimeout(), setFetchSize()

 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
2003-06-30 16:38:30 +00:00
Michael Meskes
cf883ea95c - Made sure Informix style decimal vars are initialized. They use a
fixed amount of digits and not an allocated one. So we have to work
  around. PostgreSQL numeric type remains the same.
- In INFORMIX_SE mode with autcommit set, make all cursors be "with
  hold". Is this really they way SE behaves?
2003-06-29 16:52:58 +00:00
Michael Meskes
9aeb1eff24 Just another sync. 2003-06-29 09:25:19 +00:00
Peter Eisentraut
df7618020b Merge PO file updates from 7.3 branch. 2003-06-28 22:31:01 +00:00
Tom Lane
ea20397b79 When using new protocol, PQexec can get out of a COPY IN or COPY OUT
state by itself, so do so.
2003-06-28 00:06:01 +00:00
Tom Lane
b3c0551eda Create real array comparison functions (that use the element datatype's
comparison functions), replacing the highly bogus bitwise array_eq.  Create
a btree index opclass for ANYARRAY --- it is now possible to create indexes
on array columns.
Arrange to cache the results of catalog lookups across multiple array
operations, instead of repeating the lookups on every call.
Add string_to_array and array_to_string functions.
Remove singleton_array, array_accum, array_assign, and array_subscript
functions, since these were for proof-of-concept and not intended to become
supported functions.
Minor adjustments to behavior in some corner cases with empty or
zero-dimensional arrays.

Joe Conway (with some editorializing by Tom Lane).
2003-06-27 00:33:26 +00:00
Michael Meskes
4505653e54 Added just another compatibility level for Informix. 2003-06-26 11:37:05 +00:00
Bruce Momjian
b143210639 Wrap LONG_LONG_MIN redfinition around HAVE_LONG_LONG_INT_64. 2003-06-26 01:45:04 +00:00
Bruce Momjian
095a0c83d5 Fix compile problem for missing LONG_LONG_MIN on BSD/OS. 2003-06-26 01:33:23 +00:00
Bruce Momjian
111d8e522b Back out array mega-patch.
Joe Conway
2003-06-25 21:30:34 +00:00
Michael Meskes
6f30d5665c The remaining files ... 2003-06-25 17:55:50 +00:00
Michael Meskes
8d8b9401b8 remove including of postgres_fe.h 2003-06-25 16:12:27 +00:00
Michael Meskes
54fae9c20a Some systems need another header file included. 2003-06-25 11:51:18 +00:00
Michael Meskes
fd3ca524eb Implemented Informix special way to treat NULLs, removed warnings, synced. 2003-06-25 10:44:21 +00:00
Bruce Momjian
d9ddbdaa95 > This change (I'm sure this will wrap poorly -- sorry):
> http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/libpq/pqcomm.h.diff?r1=1.85&r2=1.86
>
> modified SockAddr, but no corresponding change was made here
> (fe-auth.c:612):
>
>   case AUTH_REQ_KRB5:
> #ifdef KRB5
>   if (pg_krb5_sendauth(PQerrormsg, conn->sock, &conn->laddr.in,
>                        &conn->raddr.in,
>                        hostname) != STATUS_OK)
>
> It's not obvious to me what the change ought to be though.

This patch should hopefully fix both kerberos 4 and 5.

Kurt Roeckx
2003-06-25 01:19:47 +00:00
Bruce Momjian
92798de02e This is a bug in python interface module,
postgresql-7.3.3/src/interfaces/python/pg.py.

_quote() function fails due to integer overflow if input d is larger
than max integer.

In the case where the column type is "BIGINT", the input d may very well
be larger than max integer while its type, t, is labeled 'int'.
The conversion on line 19, return "%d" % int(d), will fail due to
"OverflowError: long int too large to convert to int".



Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

[1] create a table with a column type 'BIGINT'.
[2] use pg.DB.insert() to insert a value that is larger than max integer

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Just changing the conversion at line 19 of pg.py to long(d) instead of
int(d) should fix it. The following is a patch:

Chih-Hao Huang
2003-06-25 01:09:24 +00:00
Bruce Momjian
46bf651480 Array mega-patch.
Joe Conway
2003-06-24 23:14:49 +00:00
Bruce Momjian
975674a952 Add -L../ecpglib -lecpg for Cygwin compile. 2003-06-24 14:45:46 +00:00
Tom Lane
ab5c775116 Change pqInternalNotice to accept a format string and args instead of
just a preformatted message; per suggestion by Sean Chittenden.
2003-06-23 19:20:25 +00:00
Bruce Momjian
408625321c Remove crypt.h from fe-connect.c --- not needed, and caused problems on
Solaris with Open SSL version 0.9.7b
2003-06-23 17:03:19 +00:00
Michael Meskes
36fe7577f8 Added missing terminating '\0' char for data put into char *. 2003-06-22 11:00:48 +00:00
Tom Lane
21e0b7b8f2 Get rid of extraneous newline in PQendcopy error output (was causing
regression test diffs...).
2003-06-21 23:25:38 +00:00
Tom Lane
efc3a25bb0 Update libpq to make new features of FE/BE protocol available to
client applications.  Some editorial work on libpq.sgml, too.
2003-06-21 21:51:35 +00:00
Michael Meskes
94b59faeb7 Synced with backend. 2003-06-20 15:16:06 +00:00
Michael Meskes
2cbaaee6c3 Just another Informix compatibility change. They uses "free" for cursors as wellafter closing them. 2003-06-20 13:36:34 +00:00
Michael Meskes
cf5ec3d12b Sorry, missed a file. 2003-06-20 12:01:46 +00:00
Michael Meskes
abd310a3b1 Allow constants in using clauses. 2003-06-20 12:00:59 +00:00
Tom Lane
5fc9f3d574 We neglected to set conn->raddr.salen, leading to breakage of CANCEL
and probably other stuff.
2003-06-20 04:09:12 +00:00
Michael Meskes
8902aaaa6c Fixed fetch into char * and added missing prototype for an Informix function. 2003-06-19 09:52:11 +00:00
Peter Eisentraut
3d6fd2557c Add missing file to clean target. 2003-06-17 17:58:54 +00:00
Michael Meskes
8a2aa79fee Fixed several more parsing bugs. 2003-06-17 07:28:22 +00:00
Michael Meskes
76924b5d94 Fixed two small bugs. 2003-06-16 16:58:11 +00:00
Michael Meskes
a0f29e3afd Typo in version number. 2003-06-15 12:06:50 +00:00
Michael Meskes
86a8331935 Some minor changes for new version numbering. 2003-06-15 11:10:09 +00:00
Bruce Momjian
a64927f995 Ecpg cleanups for prototypes. 2003-06-15 04:56:45 +00:00
Bruce Momjian
4f70680177 Make ecpg thread safe.
Lee Kindness
2003-06-15 04:07:58 +00:00
Bruce Momjian
467839df26 Handle threading in two more gethostbyname calls. 2003-06-14 18:20:33 +00:00
Bruce Momjian
a16a031411 Make libpq thread-safe with configure --with-threads option.
Lee Kindness
2003-06-14 17:49:54 +00:00
Bruce Momjian
62b532b736 Add thread.c for libpq threading, and hook it into libpq/configure. 2003-06-14 14:35:42 +00:00
Michael Meskes
26188e8c17 - Enable FETCH without INTO.
- Compatibility functions for INFORMIX handling of DECLARE statement.
2003-06-13 10:50:58 +00:00
Bruce Momjian
41a10a13b1 Add thread-enable compile variables into libpq. 2003-06-12 17:31:50 +00:00
Michael Meskes
b4117d8b1b Install all header files. 2003-06-12 12:52:24 +00:00
Bruce Momjian
b14295cfe4 Attached is the complete diff against current CVS.
Compiles on BCC 5.5 and VC++ 6.0 (with warnings).

Karl Waclawek
2003-06-12 08:15:29 +00:00
Bruce Momjian
dc4ee8a833 Back out patch that got bundled into another patch. 2003-06-12 08:11:07 +00:00
Bruce Momjian
a647e30ba3 New patch with corrected README attached.
Also quickly added mention that it may be a qualified schema name.

Rod Taylor
2003-06-12 08:02:57 +00:00
Bruce Momjian
b4cea00a1f IPv6 cleanups.
Kurt Roeckx
Andrew Dunstan
2003-06-12 07:36:51 +00:00
Bruce Momjian
1cef8ea790 I succeeded by fixing up setup.py:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
--- setup.py~   Tue Mar 19 08:21:14 2002
+++ setup.py    Wed May 14 15:10:30 2003
@@ -30,8 +30,8 @@
        optional_libs=[ 'libpqdll', 'wsock32', 'advapi32' ]
        data_files = [ 'libpq.dll' ]
 else:
-       include_dirs=['/usr/include/pgsql']
-       library_dirs=['usr/lib/pgsql']
+       include_dirs=['../../include','../libpq','/usr/include/pgsql']
+       library_dirs=['../libpq','/usr/lib/pgsql']
        optional_libs=['pq']
        data_files = []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

George Young
2003-06-12 02:15:09 +00:00
Bruce Momjian
4e1f986098 I found the libpq function PGunescapeBytea a little slow. It was taking a
minute and a half to decode a 500Kb on a fairly fast machine. I think the
culprit is sscanf.

I attach a patch that replaces the function with one used to perform the same
task in pyPgSQL (a Python interface to PostgreSQL). This code was written by
Billy Allie, author of pyPgSQL. I've changed a few variable names to match
those in the original code and removed a bit of Pythonness.

Billy has kindly looked at the code and points out that it is slightly
stricter than the original implementation and if it encounters an invalid
bytea such as '\12C' it drops the unescape '\' and outputs '12C'.

The code is licensed by the author under a BSD license.

I've performed limited testing of the function by putting JPEGs into
PostgreSQL, extracting them using them using the new function and diffing
against the original files.

The new function is significantly faster on my machine with the JPEGs being
decoded in less than a second. I attach a modified libpq example program that
I used for my testing.

Ben Lamb.
2003-06-12 01:17:19 +00:00
Michael Meskes
1ca0b6d047 Make sure a variable is no longer referenced when it is removed.
Fixed counting bug in parsing "->" operator.
Removed that silly debugging function I accidently committed last night.
2003-06-11 06:39:13 +00:00
Michael Meskes
65058fcf2b Fixed some bugs. 2003-06-10 17:46:43 +00:00
Tom Lane
cdfb3d9981 freeaddrinfo2() does need two parameters after all, per comment by
Kurt Roeckx.  Add some documentation to try to prevent others from
repeating my mistake.
2003-06-09 17:59:19 +00:00
Tom Lane
6bdb7aa4db libpq can now talk to either 3.0 or 2.0 protocol servers. It first tries
protocol 3, then falls back to 2 if postmaster rejects the startup packet
with an old-format error message.  A side benefit of the rewrite is that
SSL-encrypted connections can now be made without blocking.  (I think,
anyway, but do not have a good way to test.)
2003-06-08 17:43:00 +00:00
Michael Meskes
45eebaf822 Fixed segfault in forward definition parsing. 2003-06-02 15:38:02 +00:00
Michael Meskes
776d530924 Create a real prototype function for describe. 2003-05-30 13:22:02 +00:00
Michael Meskes
a0fed291dc Sync and some minor cleanup/fixing work plus an EXEC SQL DESCRIBE prototype. 2003-05-30 08:39:01 +00:00
Barry Lind
4fb5b92769 one more change to correctly support the removeall of autocommit 2003-05-29 21:44:47 +00:00
Michael Meskes
196d0dd10b Changed variable parsing so struct[n].attr works. 2003-05-29 13:59:26 +00:00
Michael Meskes
bbe9902223 Parse forward definiton of structs. 2003-05-29 12:00:22 +00:00
Barry Lind
9e2a980f62 Applied patch from Fernando Nasser to fix up small type error 2003-05-29 04:52:44 +00:00
Barry Lind
ece84bf819 Applied patch from Fernando Nasser to improve buffer sizes to avoid unnecessary resizing. 2003-05-29 04:48:33 +00:00
Barry Lind
fb630cc49f clean up warnings produced by Eclipse 2003-05-29 04:39:51 +00:00
Barry Lind
35511088d3 Adding .cvsignore files for Eclipse IDE 2003-05-29 04:04:08 +00:00
Barry Lind
1b6e600bfe Up the build number to reflect the changes for V3 protocol support 2003-05-29 03:22:48 +00:00
Barry Lind
a9983ab414 Initial attempt to integrate in V3 protocol support. This is still a work in
progress, although all RTs pass using the V3 protocol on a 7.4 database and also pass using the V2 protocol on a 7.3 database.
SSL support is known not to work.

 Modified Files:
 	jdbc/org/postgresql/PGConnection.java
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/core/BaseConnection.java
 	jdbc/org/postgresql/core/Encoding.java
 	jdbc/org/postgresql/core/Field.java
 	jdbc/org/postgresql/core/PGStream.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/core/StartupPacket.java
 	jdbc/org/postgresql/fastpath/Fastpath.java
 	jdbc/org/postgresql/fastpath/FastpathArg.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/test/jdbc2/BlobTest.java
 	jdbc/org/postgresql/test/jdbc2/CallableStmtTest.java
 	jdbc/org/postgresql/test/jdbc2/MiscTest.java
 	jdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java
2003-05-29 03:21:32 +00:00
Tom Lane
fc8d970cbc Replace functional-index facility with expressional indexes. Any column
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.
2003-05-28 16:04:02 +00:00
Michael Meskes
e185583a37 Allow input from stdin and output to stdout. 2003-05-27 14:36:00 +00:00
Michael Meskes
677844560f Fixed incorrect output for some structs. 2003-05-27 11:31:52 +00:00
Tom Lane
5493ecc3a5 Adjust error-handling logic in libpq. For the first time, libpq copes
sanely with running out of memory for a query result.
2003-05-26 20:05:20 +00:00
Michael Meskes
813d9960d2 Forgot these. 2003-05-23 15:22:38 +00:00
Michael Meskes
d258fb91cf ecpg now accepts array elements as arguments. 2003-05-23 15:19:36 +00:00
Peter Eisentraut
6fabec242d Fix compilation on Cygwin. 2003-05-22 17:20:44 +00:00
Michael Meskes
dbd55d3a5b Fixed segfault when detecting undefined cursor. 2003-05-22 17:09:00 +00:00
Michael Meskes
d03a067ba0 ecpg now recognizes named structs/unions. So you don't have to list the whole definition everytime you declare a variable anymore. 2003-05-22 07:58:45 +00:00
Michael Meskes
dc554458ad Reversed my incorrect fix. 2003-05-20 11:05:27 +00:00
Michael Meskes
08d7e1c20e Fixed exec sql ifdef command. 2003-05-19 07:19:57 +00:00
Michael Meskes
3d41da50f7 Made variable type double work again. 2003-05-16 11:30:09 +00:00
Michael Meskes
7e684fad02 Fixed incorrect include and another typo. Sorry, the include did not create a warning/error/problem on my machine, so I didn't notice it. 2003-05-16 09:42:56 +00:00
Bruce Momjian
c42581eba3 Allow interfaces to compile under MingGW/Win32 by adding _P to symbols
in ecpg.
2003-05-16 04:59:24 +00:00
Tom Lane
32be7207aa Revert kerberos code breakage. 2003-05-16 04:58:03 +00:00
Bruce Momjian
12c9423832 Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win'
        add -lwsock32 on Win32
        make gethostname() be only used when kerberos4 is enabled
        use /port/getopt.c
        new /port/opendir.c routines
        disable GUC unix_socket_group on Win32
        convert some keywords.c symbols to KEYWORD_P to prevent conflict
        create new FCNTL_NONBLOCK macro to turn off socket blocking
        create new /include/port.h file that has /port prototypes, move
          out of c.h
        new /include/port/win32_include dir to hold missing include files
        work around ERROR being defined in Win32 includes
2003-05-15 16:35:30 +00:00
Michael Meskes
4e1ed3da9b - Added more compatibility functions.
- Accept CPP defines for type definitions.
	- Do not parse system include files automatically for Informix mode
2003-05-14 14:37:36 +00:00
Michael Meskes
72f311b86a Fixed order of include file search path. 2003-05-13 11:29:14 +00:00
Bruce Momjian
cb8b1299a3 Add Makefile rules for new crypt/rint() /port functions. Add include
for rint prototype.
2003-05-10 02:05:50 +00:00
Bruce Momjian
d85a0a6bef More cleanups now that we have crypt(). 2003-05-09 16:59:43 +00:00
Bruce Momjian
66e0a8cb39 Add crypt() to /port for Win32. 2003-05-09 16:52:11 +00:00
Bruce Momjian
0afe5417d7 Add rint() to /port, remove from qnx/. 2003-05-09 16:26:29 +00:00
Tom Lane
075a0078df I think we're done with protocol instability, so mark server and libpq
as speaking the one true 3.0 protocol.
2003-05-08 18:33:39 +00:00
Tom Lane
c0a8c3ac13 Update 3.0 protocol support to match recent agreements about how to
handle multiple 'formats' for data I/O.  Restructure CommandDest and
DestReceiver stuff one more time (it's finally starting to look a bit
clean though).  Code now matches latest 3.0 protocol document as far
as message formats go --- but there is no support for binary I/O yet.
2003-05-08 18:16:37 +00:00
Barry Lind
137b123fc7 Fixed bug with Warnings. Warnings are not added to the Statement instead of
the connection when appropriate.
This checkin also adds the type map for jdbc3, however currently it is
identical to the jdbc2 mapping.

 Modified Files:
 	jdbc/org/postgresql/core/BaseStatement.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3Connection.java
2003-05-07 03:03:30 +00:00
Tom Lane
755d191700 Add display of eventual result RowDescription (if any) to the output
of Describe on a prepared statement.  This was in the original 3.0
protocol proposal, but I took it out for reasons that seemed good at
the time.  Put it back per yesterday's pghackers discussion.
2003-05-06 21:51:42 +00:00
Michael Meskes
299fbb4b37 Added rfmtlong compatibility function. 2003-05-06 09:48:25 +00:00
Tom Lane
16503e6fa4 Extended query protocol: parse, bind, execute, describe FE/BE messages.
Only lightly tested as yet, since libpq doesn't know anything about 'em.
2003-05-05 00:44:56 +00:00
Barry Lind
5295fffc26 Patch to fix up LONGVARBINARY support submitted by Amit Gollapudi
(agollapudi@demandsolutions.com).
Also applied the RefCursor support patch by Nic Ferrier.  This patch allows
you too return a get a result set from a function that returns a refcursor.
For example:
call.registerOutParameter(1, Types.OTHER);
call.execute();
ResultSet rs = (ResultSet) call.getObject(1);

Modified Files:
 	jdbc/org/postgresql/core/BaseStatement.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1CallableStatement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1PreparedStatement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2PreparedStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Statement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Statement.java
 Added Files:
 	jdbc/org/postgresql/PGRefCursorResultSet.java
 	jdbc/org/postgresql/jdbc1/Jdbc1RefCursorResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2RefCursorResultSet.java
 	jdbc/org/postgresql/jdbc3/Jdbc3RefCursorResultSet.java
 	jdbc/org/postgresql/test/jdbc2/RefCursorTest.java
2003-05-03 20:40:45 +00:00
Michael Meskes
f7d836212a Fixed double definition of ecpg_compat_mode. 2003-05-02 14:43:25 +00:00
Michael Meskes
9e9d8d54e3 Added an option to force ecpg to also parse files includes via '#include' and some more Informix stuff. 2003-05-01 17:16:57 +00:00
Tom Lane
11def6906b Missed some corner cases (PGSERVICE mostly)... 2003-04-28 04:52:13 +00:00
Tom Lane
092133beb3 Okay, I've had it with PQsetdbLogin having slightly different defaults
than PQconnectdb.  Reimplement the former to use the same code as the
latter.  Fix documentation omissions while at it.
2003-04-28 04:29:12 +00:00
Tom Lane
4db9689d1a Add transaction status field to ReadyForQuery messages, and make room
for tableID/columnID in RowDescription.  (The latter isn't really
implemented yet though --- the backend always sends zeroes, and libpq
just throws away the data.)
2003-04-26 20:23:00 +00:00
Tom Lane
9cbaf72177 In the continuing saga of FE/BE protocol revisions, add reporting of
initial values and runtime changes in selected parameters.  This gets
rid of the need for an initial 'select pg_client_encoding()' query in
libpq, bringing us back to one message transmitted in each direction
for a standard connection startup.  To allow server version to be sent
using the same GUC mechanism that handles other parameters, invent the
concept of a never-settable GUC parameter: you can 'show server_version'
but it's not settable by any GUC input source.  Create 'lc_collate' and
'lc_ctype' never-settable parameters so that people can find out these
settings without need for pg_controldata.  (These side ideas were all
discussed some time ago in pgsql-hackers, but not yet implemented.)
2003-04-25 19:45:10 +00:00
Bruce Momjian
97e2446bf0 Add new versions DLL lists, from Karl Waclawek 2003-04-25 14:20:21 +00:00
Bruce Momjian
7b4aa31007 Fix typo in DLL list. 2003-04-25 14:18:59 +00:00
Bruce Momjian
db7e46a76d Use closesocket() for all socket/pipe closing, because Win32 requires
it, and map that to close() on Unix.
2003-04-25 01:24:00 +00:00
Tom Lane
f690920a75 Infrastructure for upgraded error reporting mechanism. elog.c is
rewritten and the protocol is changed, but most elog calls are still
elog calls.  Also, we need to contemplate mechanisms for controlling
all this functionality --- eg, how much stuff should appear in the
postmaster log?  And what API should libpq expose for it?
2003-04-24 21:16:45 +00:00
Bruce Momjian
5dc844b75c Add PQunescapeBytea() and PQfeeMem() to the Win32 DLL list.
Karl Waclawek
2003-04-24 15:09:27 +00:00
Bruce Momjian
52e49e298f Remove Win32 special rename/unlink from libpq. 2003-04-22 19:42:27 +00:00
Bruce Momjian
7fc30094c7 Add dirmod to libpq Makefile. 2003-04-22 02:21:34 +00:00
Tom Lane
5ed27e35f3 Another round of protocol changes. Backend-to-frontend messages now all
have length words.  COPY OUT reimplemented per new protocol: it doesn't
need \. anymore, thank goodness.  COPY BINARY to/from frontend works,
at least as far as the backend is concerned --- libpq's PQgetline API
is not up to snuff, and will have to be replaced with something that is
null-safe.  libpq uses message length words for performance improvement
(no cycles wasted rescanning long messages), but not yet for error
recovery.
2003-04-22 00:08:07 +00:00
Tom Lane
bd8d441775 Second round of FE/BE protocol changes. Frontend->backend messages now
have length counts, and COPY IN data is packetized into messages.
2003-04-19 00:02:30 +00:00
Bruce Momjian
4d4953fc41 Make Win32 tests to match existing Cygwin tests, where appropriate. 2003-04-18 01:03:42 +00:00
Tom Lane
cb7fb3ca95 First phase of FE/BE protocol modifications: new StartupPacket layout
with variable-width fields.  No more truncation of long user names.
Also, libpq can now send its environment-variable-driven SET commands
as part of the startup packet, saving round trips to server.
2003-04-17 22:26:02 +00:00
Barry Lind
0b88b63709 Applied patches from Kris Jurka fixing a string tokenizing problem and
fixing an order by problem for index metadata results.
Also includes removing some unused code as well as a fix to the toString
method on statement.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-04-17 04:37:07 +00:00
Tom Lane
1719fd55d3 Fix some problems exposed by building outside the source tree. 2003-04-16 05:23:55 +00:00
Tom Lane
49c3cf5fd1 path.c needs to be included in libpq; per Joe Conway. 2003-04-14 21:15:13 +00:00
Dave Cramer
810e0b982b exposed the addDataType method to the PGConnection, allows users to add datatypes 2003-04-14 10:39:51 +00:00
Barry Lind
51acf97235 Applied patch submitted by Nic Ferrier with some cleanups of his previous
patch to add cursor based queries.

 Modified Files:
 	jdbc/org/postgresql/core/BaseConnection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-04-13 04:10:07 +00:00
Tom Lane
5674460bb0 Fix error recovery for SSL_read/SSL_write calls. 2003-04-10 23:03:08 +00:00
Michael Meskes
76b45c9842 Informix fixes. 2003-04-10 13:06:57 +00:00
Tom Lane
6fb5115850 Get rid of inappropriate flags in CPPFLAGS override --- these break
non-gcc compilers, and they would never belong in CPPFLAGS anyway.
2003-04-08 17:09:51 +00:00
Michael Meskes
a50f285d8d Added some more informix compatibility functions. 2003-04-08 12:34:25 +00:00
Bruce Momjian
d46e643822 Add Win32 path handling for / vs. \ and drive letters. 2003-04-04 20:42:13 +00:00
Bruce Momjian
cdbd298b3a Add prototype for toupper/tolower(). 2003-04-03 05:25:41 +00:00
Tom Lane
1da6eb7fda Whack getaddrinfo() patch around until it works, more or less, on
machines without IPv6.  Or at least it works on HPUX 10.20 ...
2003-04-02 00:49:28 +00:00
Michael Meskes
7b85b730f5 More patches for informix compatibility. 2003-04-01 14:37:25 +00:00
Michael Meskes
5e37f16be0 Forgot two new files and one that was moved. 2003-03-30 13:26:09 +00:00
Michael Meskes
999f12982e Moved Informix stuff to its own compat library. Interval datetype is now fully functional. 2003-03-30 11:48:19 +00:00
Peter Eisentraut
82a91eb54e Simplify the socket handling code by supplying a replacement getaddrinfo()
function if the OS doesn't provide one.
2003-03-29 11:31:52 +00:00
Bruce Momjian
15b9e2c5ff Add <stdlib> to add calloc() prototype. 2003-03-27 17:25:34 +00:00
Michael Meskes
89508a8492 More changes to pgtypeslib and set optimization to -O1. 2003-03-27 14:29:17 +00:00
Dave Cramer
9e29b32e78 patch to notify listeners on error from Csaba Nagy 2003-03-25 02:46:23 +00:00
Bruce Momjian
f1792b932c Use PQfreemem() consistently, and document its use for Notify.
Keep PQfreeNotify() around for binary compatibility.
2003-03-25 02:44:36 +00:00
Dave Cramer
6a19c6dccf added DISTINCT to the query to get cross reference. This is required when two columns in a table are both foreign keys to another table. From Peter Royal proyal@pace2020.com 2003-03-25 02:28:45 +00:00
Dave Cramer
326b2f96ae fixed problem where information from previous updates was leaking into subsequent updates patch from Shawn Green, slightly modified 2003-03-25 02:24:07 +00:00
Barry Lind
e27334f405 New build number 2003-03-24 04:01:02 +00:00
Barry Lind
1e3372e6bb Fix bug in reading acls (didn't treat null acl as meaning the table owner had
full privs), also updated the regression test for this case.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
2003-03-24 03:48:32 +00:00
Bruce Momjian
8f5fb5f24e Remove ecpg #warning with approval from Michael. 2003-03-22 19:48:41 +00:00
Bruce Momjian
268bbf430f Add missing #include for calloc in ecpg. 2003-03-22 17:12:23 +00:00
Bruce Momjian
23ecb8855d Add PQfreemem() call for Win32. 2003-03-22 03:29:06 +00:00
Peter Eisentraut
1a7f4ed525 Make "win" a separate port from "cygwin". This means you can now
configure under native Windows (MinGW that is), but you won't get very far
compiling yet.  The dynaloader files are from Jan Wieck's patch set.
2003-03-21 17:18:34 +00:00
Michael Meskes
b8f7d3d0b6 Do not free prepares statements at the end of a transaction. 2003-03-21 15:31:04 +00:00
Michael Meskes
524e9d62a7 Changes to the parser to accept new datatypes. 2003-03-21 14:17:47 +00:00
Michael Meskes
2e6f97560a Started adding date and timestamp. 2003-03-20 15:56:50 +00:00
Bruce Momjian
44aba28020 PGRES_POLLING_ACTIVE is unused, keep for backward compatibility.
Lennert Buytenhek
2003-03-20 06:23:30 +00:00
Peter Eisentraut
28efaf3ccd Avoid mysterious warning about possibly uninitialized variable. 2003-03-19 16:05:41 +00:00
Barry Lind
44a6959f4a Applied patch to work around server bug.
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
2003-03-19 04:06:20 +00:00
Peter Eisentraut
9384dc6e59 Improve error message. 2003-03-18 22:11:48 +00:00
Michael Meskes
6fad73ed45 Some bugfixes for numerical library. 2003-03-18 10:46:39 +00:00
Barry Lind
a6f00f3939 Applied updated translation patch
Modified Files:
 	errors_zh_TW.properties
2003-03-18 05:26:50 +00:00
Bruce Momjian
93b408ef86 Reorder crypt.h include for SunOS compile problem.
Fred Houweling
2003-03-17 17:58:57 +00:00
Michael Meskes
bb3730893b Forgot some files... 2003-03-16 10:49:51 +00:00
Michael Meskes
a4f25b6a9c Started working on a seperate pgtypes library. First test work. PLEASE test compilation on iother systems. 2003-03-16 10:42:54 +00:00
Barry Lind
9f66350b0e Fixed parsing to handle \n for updateable result sets. Bug reported by Rich Cullingford.
Modified Files:
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
2003-03-14 05:36:58 +00:00
Barry Lind
77ce53580b Improved error message and added some log messages in batch update functionality
Modified Files:
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/util/PSQLException.java
2003-03-14 01:21:47 +00:00
Tom Lane
e4704001ea This patch fixes a bunch of spelling mistakes in comments throughout the
PostgreSQL source code.

Neil Conway
2003-03-10 22:28:22 +00:00
Barry Lind
05a966fca4 Applied patch from Paul Sorenson to correctly handle schema names in updateable result sets.
Applied patch from Rich Cullingford to fix a NPE in the absolute() method of result set.
Applied patch from Tarjei Skorgenes to fix a NPE when logging is enabled.

 Modified Files:
 	jdbc/org/postgresql/core/BaseResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc2/Array.java
 	jdbc/org/postgresql/util/PSQLException.java
2003-03-08 06:06:55 +00:00
Barry Lind
6ee060f201 Cleanup and reorganization.
- Added a private api layer (org.postgresql.core.Base*)
  - Cleaned up public api (org.postgresql.PG*)
  - Added consistent headers and copywrite info
  - Removed deprecated Serialize functionality
  - Cleaned up imports
  - Moved some files to more appropriate locations

 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/PGConnection.java
 	jdbc/org/postgresql/PGNotification.java
 	jdbc/org/postgresql/PGStatement.java
 	jdbc/org/postgresql/core/Encoding.java
 	jdbc/org/postgresql/core/Notification.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/core/StartupPacket.java
 	jdbc/org/postgresql/fastpath/Fastpath.java
 	jdbc/org/postgresql/fastpath/FastpathArg.java
 	jdbc/org/postgresql/geometric/PGbox.java
 	jdbc/org/postgresql/geometric/PGcircle.java
 	jdbc/org/postgresql/geometric/PGline.java
 	jdbc/org/postgresql/geometric/PGlseg.java
 	jdbc/org/postgresql/geometric/PGpath.java
 	jdbc/org/postgresql/geometric/PGpoint.java
 	jdbc/org/postgresql/geometric/PGpolygon.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1CallableStatement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/Jdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/Jdbc1PreparedStatement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/Jdbc1ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Blob.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Clob.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/jdbc2/Array.java
 	jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/Jdbc2PreparedStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Statement.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java
 	jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Connection.java
 	jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java
 	jdbc/org/postgresql/jdbc3/Jdbc3ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Statement.java
 	jdbc/org/postgresql/largeobject/BlobInputStream.java
 	jdbc/org/postgresql/largeobject/BlobOutputStream.java
 	jdbc/org/postgresql/largeobject/LargeObject.java
 	jdbc/org/postgresql/largeobject/LargeObjectManager.java
 	jdbc/org/postgresql/test/jdbc2/Jdbc2TestSuite.java
 	jdbc/org/postgresql/test/jdbc2/optional/BaseDataSourceTest.java
 	jdbc/org/postgresql/util/MD5Digest.java
 	jdbc/org/postgresql/util/MessageTranslator.java
 	jdbc/org/postgresql/util/PGbytea.java
 	jdbc/org/postgresql/util/PGmoney.java
 	jdbc/org/postgresql/util/PGobject.java
 	jdbc/org/postgresql/util/PGtokenizer.java
 	jdbc/org/postgresql/util/PSQLException.java
 	jdbc/org/postgresql/util/UnixCrypt.java
 Added Files:
 	jdbc/org/postgresql/core/BaseConnection.java
 	jdbc/org/postgresql/core/BaseResultSet.java
 	jdbc/org/postgresql/core/BaseStatement.java
 	jdbc/org/postgresql/core/Field.java
 	jdbc/org/postgresql/core/PGStream.java
 Removed Files:
 	jdbc/org/postgresql/Field.java
 	jdbc/org/postgresql/PG_Stream.java
 	jdbc/org/postgresql/test/jdbc2/SerializeObject.java
 	jdbc/org/postgresql/test/jdbc2/SerializeTest.java
 	jdbc/org/postgresql/util/Serialize.java
2003-03-07 18:39:46 +00:00
Tom Lane
1d57374114 Use poll(2) in preference to select(2), if available. This solves
problems in applications that may have a large number of files open,
such that libpq's socket number exceeds the range supported by fd_set.
From Chris Brown.
2003-03-06 03:16:55 +00:00
Barry Lind
3d1a1e85cf up build number to 202 for a new development build
Modified Files:
 	jdbc/org/postgresql/Driver.java.in
2003-02-27 05:58:08 +00:00
Barry Lind
4c943c87c1 A little cleanup. Removing an unnecessary method.
Modified Files:
	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
2003-02-27 05:56:27 +00:00
Barry Lind
1cc55168d7 Added support for SSL in the jdbc driver
Modified Files:
 	jdbc/build.xml jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/PG_Stream.java
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/util/PSQLException.java
2003-02-27 05:45:44 +00:00
D'Arcy J.M. Cain
9ff872a272 The quote function should return a string suitable for dropping into a
query string.  This fixes a bug where bool types sometimes returned with
a string that could not be dropped into a query.
2003-02-26 13:16:50 +00:00
Michael Meskes
aedd189a5c Allow SET CONNECTION to be followed by connection object without leading "TO" or "=".
Allow whenever statement to list function without parameters.
2003-02-25 15:58:03 +00:00
Michael Meskes
03829995cd Forgot to commit Makefile change. 2003-02-21 15:19:18 +00:00
Tatsuo Ishii
e2a618fe25 Fix for GUC client_encoding variable not being handled
correctly. See following thread for more details.

Subject: [HACKERS] client_encoding directive is ignored in postgresql.conf
From: Tatsuo Ishii <t-ishii@sra.co.jp>
Date: Wed, 29 Jan 2003 22:24:04 +0900 (JST)
2003-02-19 14:31:26 +00:00
Michael Meskes
d5740d7e26 Added DATABASE command as alias to CONNECT TO. 2003-02-19 12:36:39 +00:00
Bruce Momjian
81f6db4803 Allow PQcmdTuples to return row counts for MOVE and FETCH.
Neil Conway
2003-02-19 03:59:02 +00:00
Michael Meskes
244d2d67a0 Added Informix "database" command. 2003-02-17 14:06:40 +00:00
Michael Meskes
1005c993a6 In Informix mode ecpg should still be able to parse preprocessor directives. 2003-02-14 16:40:01 +00:00
Michael Meskes
3a335375a9 - Synced parser and keyword file.
- More work on Informix compatibility.
2003-02-14 13:17:13 +00:00
Tom Lane
e8a10dc7e9 Fix some of the breakage from the IPV6 patch. 2003-02-14 01:24:26 +00:00
Michael Meskes
53c15ceda0 Just intermediate results for backup reasons. 2003-02-13 20:37:28 +00:00
Tom Lane
8d33f80fc4 Suppress gcc warning. 2003-02-13 18:13:22 +00:00
Michael Meskes
1a9b0613c1 - Applied error reporting patch by Matthew Vanecek
- Started with an Informix compatibility option.
2003-02-13 13:11:52 +00:00
Barry Lind
68c67fc8a8 Applied patch to update translation file, submitted by Zhenbang Wei
Modified Files:
 	jdbc/org/postgresql/errors_zh_TW.properties
2003-02-12 20:40:23 +00:00
Barry Lind
0dbb7aeac4 Patch to messages file from Holger Klawitter to add a missing message.
Patch to makefile to clean up some of the output

 Modified Files:
 	jdbc/Makefile jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/errors_de.properties
2003-02-12 06:13:04 +00:00
Barry Lind
43785a434e upped build# to 201 2003-02-09 23:45:45 +00:00
Barry Lind
abcec0c125 Better error message on character set mismatches during conversion to unicode.
Also applied patch from Lars Stenberg to make callable statements use the form
select * from func() when running against a 7.3 server instead of select func() to allow for set returning functions to be called.

 Modified Files:
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/core/Encoding.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-02-09 23:14:55 +00:00
Dave Cramer
893678eda7 applied Kris Jurka's patch for numeric 2003-02-07 12:47:29 +00:00
Dave Cramer
32c3db0f86 patch from Oliver Jowett to implement some of the jdbc3 methods 2003-02-05 11:12:39 +00:00
Dave Cramer
985e551b48 Applied Kris Jurkas patch to fix rollback and SQLException 2003-02-04 11:01:52 +00:00
Dave Cramer
d23fd9572b applied patch from Oliver Jowett 2003-02-04 10:44:37 +00:00
Barry Lind
28ce9f0fed Two patches from Kris Jurka. One fixes a problem with incorrect type for double
and the other fixes a NPE in Statement.toString() under some circumstances.
The second patch was originally submitted by Oliver Jowett and updated by Kris
2003-02-04 10:09:32 +00:00
Barry Lind
16a30346c8 Patch from Nic Ferrier to add support for result sets being cursor based
so that rows can be fetched incrementally.  This is enabled by using
setFetchSize()
2003-02-04 09:20:12 +00:00
Tom Lane
ef5842b5f7 #ifdef out stuff that shouldn't be compiled when not USE_SSL.
Curious that gcc doesn't complain about unreferenced static variables.
2003-02-03 22:33:51 +00:00
Bruce Momjian
0d3e36b668 Move pg_service.conf.sample to /interfaces/libpq. 2003-02-03 14:24:07 +00:00
Tom Lane
361eaa185f Prevent core dump from calling Tcl_DontCallWhenDeleted() with a null
interp pointer.  Per report from Gerhard Hintermayer.
2003-02-01 00:22:12 +00:00
Tom Lane
032235cafe Apply ljb's patch to prevent both memory leak and core dump during
connection shutdown.  This is a grotty workaround for a Tcl bug, but
said bug has been there long enough that I'm not holding my breath
for a real fix.  Per discussions and testing from ljb and g.hintermayer.
2003-02-01 00:07:03 +00:00
Tom Lane
4ec457ad58 Fix regression in .pgpass support. From Neil Conway. 2003-01-30 19:49:54 +00:00
Tom Lane
3cb282f3e6 Guard against array overrun, per report from Yichen Xie. This case
can only occur if the constant DEFAULT_CLIENT_AUTHSVC is given a bogus
value, so it doesn't seem worth back-patching, but I'll fix it in HEAD.
2003-01-29 01:18:21 +00:00
Dave Cramer
aa78ca3a95 added fix from Joel Hock to get the inserted row into the current buffer 2003-01-23 18:49:22 +00:00
Michael Meskes
f8d8266ac5 Synced parser. 2003-01-21 20:01:12 +00:00
Barry Lind
56e6436c3a Bumped up build number to 200 2003-01-14 09:42:07 +00:00
Barry Lind
feefc329bd Patch from Florian Wunderlich to correctly support java Timestamps. Previously
the code would only capture milliseconds where as both postgres and the java
Timestamp object support greater resolution.
Also fixed a bug reported by Rhett Sutphin where the last digit of the
fractional seconds was lost when using timestamp without time zone

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/test/jdbc2/TimestampTest.java
2003-01-14 09:13:51 +00:00
Barry Lind
9db065ba56 Patch from Aaron Mulder to have pooled connections implement PGConnection
Modified Files:
 	jdbc/org/postgresql/jdbc2/optional/PooledConnectionImpl.java
 	jdbc/org/postgresql/test/jdbc2/optional/BaseDataSourceTest.java
2003-01-14 05:46:49 +00:00
Barry Lind
88e524063a Patch from Kris Jurka to improve the performance of getImportedKeys().
Use explicit joins to avoid using the genetic query optimizer.  Also fixed
a regression test that was failing to compile.  This change also cleans up
how key names are reported as per:
A change to the value of the FK_NAME column.  Currently the returned value
is the triggers arguments which look like

"<unnamed>\000t2\000t1\000UNSPECIFIED\000a\000a\000"

This was required for server versions < 7.3 when a user did not supply
constraint names.  Every constraint was named "<unnamed>"
.  7.3 has enforced unique constraint names per table so unnamed foreign
keys will have different names "$1", "$2" and so on.  I've used logic
along the lines of the following to preserve the unique names in the
original scheme, but allow people who go to the trouble of naming their
constraints to see them:

if (triggerargs.startsWith("<unnamed>")) {
	fkname = [the whole ugly trigger args name originally used];
} else {
	fkname = [the actual fk name];
}

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/test/jdbc2/optional/ConnectionPoolTest.java
2003-01-14 05:05:26 +00:00
Peter Eisentraut
611278cc0b Clean ip.c. 2003-01-10 10:59:08 +00:00
Bruce Momjian
b56af49849 The second was that renegotiation was just plain broken. I can't
believe I didn't notice this before -- once 64k was sent to/from the
server the client would crash.  Basicly, in 7.3 the server SSL code set
the initial state to "about to renegotiate" without actually starting
the renegotiation.  In addition, the server and client didn't properly
handle the SSL_ERROR_WANT_(READ|WRITE) error.  This is fixed in the
second patch.

Nathan Mueller
2003-01-08 23:18:25 +00:00
Bruce Momjian
6ccb5aebad I was playing around with 7.3.1 and found some more SSL problems. The
first, that I missed when checking over 7.3.1, was that the client
method was switched to SSLv23 along with the server.  The SSLv23 client
method does SSLv2 by default, but can also understand SSLv3.  In our
situation the SSLv2 backwords compatibility is really only needed on the
server.  This is the first patch.

The last thing is that I found a way for the server to understand SSLv2
HELLO messages (sent by pre-7.3 clients) but then get them to talk
SSLv3.  This is the last one.

Nathan Mueller
2003-01-08 22:56:58 +00:00
Bruce Momjian
fe7f8f2b91 Fix pgpass to work with PQconnectDB().
Backpatch to 7.3.X.

Report from ljb.
2003-01-08 21:33:27 +00:00
Bruce Momjian
9270f1cdaa Only set the database name if we find a match in the services file. 2003-01-08 16:21:53 +00:00
D'Arcy J.M. Cain
6f14e2771a Correction to last patch. As per the DB-API spec, we need to return None
here, not -1.
2003-01-08 13:42:16 +00:00
Tom Lane
9f1f2bfb66 Fix various places where global s/NOTICE/WARNING/ was applied with too
much enthusiasm.
2003-01-07 22:23:17 +00:00
Bruce Momjian
c859cda782 Document libpq service capability, and add sample file. 2003-01-07 04:25:29 +00:00
Bruce Momjian
c9cf982038 Enable IPv6 libpq 'hostaddr' addresses. Update docs. 2003-01-06 22:48:16 +00:00
Bruce Momjian
c3e9699f21 Enable IPv6 connections to the server, and add pg_hba.conf IPv6 entries
if the OS supports it.  Code will still compile on non-IPv6-aware
machines (feature added by Bruce).

Nigel Kukard
2003-01-06 03:18:27 +00:00
Tom Lane
699782b695 Adjust Tcl-related code to compile cleanly with Tcl 8.4 (add const modifiers as
needed).  Some desultory const-ification of SPI interface to support this.
2002-12-30 22:10:54 +00:00
Bruce Momjian
d82794ee33 Attached is a patch to provide makefiles, etc. to allow the compilation
of the libpq interface static and dynamic libraries with the freely
downloadable Borland C++ compiler version 5.5 and/or C++ Builder.

Lester Godwin
2002-12-30 21:07:26 +00:00
Tom Lane
2e1f2c3109 Make use of TCL_INCLUDE_SPEC if available (it's new in Tcl 8.4, too bad
it took 'em this long to realize it's needed...)
2002-12-30 17:19:54 +00:00
Bruce Momjian
e533e7dcf5 Add missing slash to python install path. 2002-12-30 05:06:50 +00:00
Dave Cramer
3daad2ae91 case sensitive updates by Kris Jurka 2002-12-23 16:12:36 +00:00
Dave Cramer
e2ad5816e2 mike beachy's patch for statement handling 2002-12-20 14:10:34 +00:00
Dave Cramer
83feff3ee7 patch for null table in getPrimaryKeys 2002-12-20 13:15:53 +00:00
Bruce Momjian
abf6f48319 pgindent fe-connect.c --- done to make IPv6 patch easier to apply. 2002-12-19 19:30:24 +00:00