Commit Graph

1745 Commits

Author SHA1 Message Date
Barry Lind 936ff27696 fixed bug reported by cc.ais40@wanadoo.fr where getObject was returning an Integer for a smallint datatype instead of a Short 2002-06-07 16:46:24 +00:00
Bruce Momjian ce4a287f43 Fix interface example errors causes by backend changes.
Permaine Cheung
2002-06-07 03:55:15 +00:00
Dave Cramer 106dda2915 change table name to lower case in getColumns 2002-06-06 14:47:52 +00:00
Hiroshi Inoue 6cfb3ec593 Add missing win_setup.h. 2002-06-06 09:47:25 +00:00
Hiroshi Inoue 89d6f6808c Add *Int8 As* option. 2002-06-06 04:50:47 +00:00
Dave Cramer 520695701c fixed getImported/ExportedKeys to be simpler, and return the correct number of keys 2002-06-05 19:12:01 +00:00
Barry Lind b48b4ab48e fixed bug reported by Noel Rappin (nrappin@sockeye.com) java Array type handled Timestamps incorrectly 2002-06-03 17:52:05 +00:00
Bruce Momjian e0faed4bee Small patch to correct the default arraysize associated
with the Cursor object's fetchmany() method.  The API and
inline documentation state that the default is 1.  It
currently defaults to 5.

Patrick Macdonald
2002-06-03 17:42:11 +00:00
Bruce Momjian de1f32efc1 Add PQescapeString and PQescapeBytea for Win32. 2002-06-02 22:36:30 +00:00
Bruce Momjian 6bb39991da Allow pod2man 5.005p3 to work with our current sources. 2002-06-02 21:37:26 +00:00
Dave Cramer 3dd13ffd95 small fix to testExportedKeys 2002-05-30 16:39:26 +00:00
Dave Cramer 1ffd044af7 added imported/exported key testDatabaseMetaDataTest.java 2002-05-30 16:26:55 +00:00
Peter Eisentraut 7662419f1b Change PL/Perl and Pg interface build to use configured compiler and
Makefile.shlib system, not MakeMaker.
2002-05-28 16:57:53 +00:00
Hiroshi Inoue 79420840ee 1) Support Keyset Driven driver cursors.
2) Supprt ARD precision/scale and SQL_C_NUEMRIC.
3) Minimal implementation of SQLGetDiagField().
4) SQLRowCount() reports the result of SQLSetPos and SQLBulkOperation.
5) int8 -> SQL_NUMERIC for Microsoft Jet.
6) Support isolation level change.
7) ODBC3.0 SQLSTATE code.
8) Append mode log files.
2002-05-22 05:51:03 +00:00
Michael Meskes 7f660adeb1 - Fixed some parser bugs.
- Removed some simple rules to work arounf bison limit for now.
        - Update c_keywords.c to reflect changes in keywords.c.
2002-05-20 09:29:41 +00:00
Michael Meskes f35ced3de9 - Fixed reduce/reduce conflict in parser.
- Synced preproc.y with gram.y.
        - Synced pgc.l with scan.l.
        - Synced keywords.c.
2002-05-19 20:00:53 +00:00
Tom Lane f0811a74b3 Merge the last few variable.c configuration variables into the generic
GUC support.  It's now possible to set datestyle, timezone, and
client_encoding from postgresql.conf and per-database or per-user
settings.  Also, implement rollback of SET commands that occur in a
transaction that later fails.  Create a SET LOCAL var = value syntax
that sets the variable only for the duration of the current transaction.
All per previous discussions in pghackers.
2002-05-17 01:19:19 +00:00
Barry Lind e25c93c7eb fixed problem connecting to server with client_min_messages set to debug. The code was not expecting to receive notice messages during the connection handshake. 2002-05-14 03:00:35 +00:00
Hiroshi Inoue 16e22de53a Add a file for version control. 2002-05-09 04:10:22 +00:00
Tom Lane 4a2fe8e03d Fix typo in usage instructions. 2002-05-03 14:21:38 +00:00
Tom Lane 8338cc03a8 Remove the last traces of datatypes datetime and timespan. 2002-05-03 04:11:08 +00:00
Michael Meskes c8996f9c6b - Synced yet again.
- Fixed a typo in a comment printed by ecpg.
2002-04-28 17:20:03 +00:00
Hiroshi Inoue 4eac3919dd Fix for the following items about escape sequence
by Marcelo Aceto <aceto@newinf.com.br> .

1) Wrong translations of embedded escape sequences inside outer join escape
sequences.
2) Wrong translation of parameter markers inside outer joins and function
escape sequences.
3) Bad concatenation of date, time, timestamp constants with next word in
statement:
2002-04-25 02:50:08 +00:00
Peter Eisentraut 39e77dd365 Remove reference to NAMEDATALEN, which wasn't necessary anyway. 2002-04-24 23:00:40 +00:00
Bruce Momjian 80e232f2b8 Update jdbc errors_zh_TW.properties.
Zhenbang Wei
2002-04-24 02:30:53 +00:00
Bruce Momjian 30571b5496 I'm at the win32 error messages once more. The DLL load thingy doesn't
work on all win9x machines, so i made it go thru a l ookup table
instead, using the DLL as last resort.  I also moved this out of the
fe-misc.c file because of the size of the lookup ta ble. Who knows, we
might add more other win32 specific code there in the future.

I also fixed a small typo in the pg_config.h.win32 that made the
compiler compla in about the gnu snprintf declaration.

I tried to make this patch with psql coding style. I've successfully
tested this on win2k and win98 and it works fine (i.e. the mes sage
shows on win98 too, it didn't with the old implementation).

Magnus Naeslund
2002-04-24 02:26:06 +00:00
Bruce Momjian be9728acf1 pgdb.connect() seems to be broken on Python 2.0.1 (which ships with
Slackware 8), and perhaps on other Pythons, haven't checked.  Something in
the _pg.connect() call isn't working.  I think the problem stems from the
fact that 'host' is a named parameter of both _pg.connect and pgdb.connect,
and so Python treats it as a variable assignment, not a named parameter.

Uses non-named parameters.

Andrew Johnson
2002-04-24 01:58:31 +00:00
Bruce Momjian 2d81019493 Sorry for the package, but the following patch need to be applied to get
the new verion compiled on SCO Openserver 5.0.5 and Unixware 7.1.1

Nicolas Bazin
2002-04-24 01:56:20 +00:00
Hiroshi Inoue bf1f2e545c 1) Fix SQLProcedures().
2) Handle timestamp without time zone.
3) Improve SQLForeignKeys() in multibyte mode.
2002-04-23 04:14:13 +00:00
Michael Meskes 75c33220ad Synced preproc.y and keywords.c. 2002-04-22 18:54:43 +00:00
Thomas G. Lockhart 3fab49325d Include stdio.h and stdlib.h for completeness. 2002-04-21 19:51:44 +00:00
Peter Eisentraut ff4281472a Add missing include. 2002-04-20 03:46:16 +00:00
Bruce Momjian 2de427d1ef Ant 1.4.1 now requires for jdbc. Mention in HISTORY release notes. 2002-04-18 04:58:13 +00:00
Bruce Momjian a770da9d8d Back out python change, needs delay. 2002-04-18 03:38:30 +00:00
Bruce Momjian 3cd9399d86 Change docs to do 20! rather than larger. 2002-04-18 03:37:13 +00:00
Dave Cramer 4da51bfd6d Added some rudimentary table and column tests
added a setup/teardown to create and drop the connection, and table
2002-04-16 15:25:17 +00:00
Dave Cramer 710a711ac3 fixed getColumns as per Panu Outinen's email. At this point have only repaired the bug, haven't made it caseInsensitive 2002-04-16 13:28:44 +00:00
Michael Meskes cc592ed8ea Fixed typo in preproc/type.h 2002-04-16 07:03:56 +00:00
Bruce Momjian 5b92d004fa Fix for NOTIFY when NAMEDATALEN is nonstandard in server. Fix idea from
Tom Lane to move string storage to end of structure but keep pointer in
the same location.
2002-04-15 23:35:51 +00:00
Bruce Momjian 394eec1068 Fix for EINTR returns from Win9X socket operations:
In summary, if a software writer implements timer events or other events
 which generate a signal with a timing fast enough to occur while libpq
is inside connect(), then connect returns -EINTR.  The code following
the connect call does not handle this and generates an error message.
The sum result is that the pg_connect() fails.  If the timer or other
event is right on the window of the connect() completion time, the
pg_connect() may appear to work sporadically.  If the event is too slow,
 pg_connect() will appear to always work and if the event is too fast,
pg_connect() will always fail.

David Ford
2002-04-15 23:34:17 +00:00
Hiroshi Inoue ab1ead6b97 1) Fix a bug about reporting varchar info thanks to Aceto.
2) Introcuced 3 drivers.
3) The version is now 7.02.0001.
2002-04-15 02:46:00 +00:00
Michael Meskes 70fb71f487 - Synced preproc.y with gram.y
- Fixed one bug in structure handling resulting in using sizeof indicator instead of variable.
2002-04-14 08:59:16 +00:00
Hiroshi Inoue 40eb5495c9 1) Fix a bug in declare/fetch mode.
2) Suppress some error logs for the request to other drivers.
2002-04-12 08:03:12 +00:00
Tom Lane 902a6a0a4b Restructure representation of aggregate functions so that they have pg_proc
entries, per pghackers discussion.  This fixes aggregates to live in
namespaces, and also simplifies/speeds up lookup in parse_func.c.
Also, add a 'proimplicit' flag to pg_proc that controls whether a type
coercion function may be invoked implicitly, or only explicitly.  The
current settings of these flags are more permissive than I would like,
but we will need to debate and refine the behavior; for now, I avoided
breaking regression tests as much as I could.
2002-04-11 20:00:18 +00:00
Hiroshi Inoue b210b16265 Prevent an infinite loop of error reporting. 2002-04-10 08:18:54 +00:00
Hiroshi Inoue 557de2a715 Let psqlodbc30 be compilable without /D DRIVER_CURSOR_IMPLEMENT. 2002-04-09 03:58:33 +00:00
Tatsuo Ishii 38671e01e9 Fix PQescapeBytea/PQunescapeBytea so that they handle bytes > 0x7f.
This is necessary for mulibyte character sequences.
See "[HACKERS] PQescapeBytea is not multibyte aware" thread posted around
2002/04/05 for more details.
2002-04-08 03:48:10 +00:00
Bruce Momjian 811f7df274 When a macro is replaced by the preprocessor, pgc.l reaches a end of
file, which is not the actual end of the file. One side effect of that
is that if you are i n a ifdef block, you get a wrong error telling you
that a endif is missing.

This patch corrects pgc.l and also adds a test of this problem to
test1.pgc. To  convince you apply the patch to test1.pgc first then try
to compile the test the n apply the patch to pgc.l.

The patch moves the test of the scope of an ifdef block to the end of
the file b eeing parsed, including all includes files, ... .

Nicolas Bazin
2002-04-05 11:39:47 +00:00
Hiroshi Inoue 0e11aea246 Fix a bug in SQLError(). 2002-04-04 23:29:16 +00:00
Hiroshi Inoue af10378ab0 Fix a bug in multibyte_strchr(). 2002-04-04 01:36:17 +00:00
Hiroshi Inoue 2966001c77 Fix compiler warnings. 2002-04-02 10:57:25 +00:00
Hiroshi Inoue f8da3990b5 [HACKERS] Proposed patch for ODBC driver w/ C-a-n-c-e-l
From: Bradley McLean <brad@bradm.net>

Patch against 7,2 submitted for comment.

This seems to work just fine; Now, when our users submit a 2 hour
query with four million row sorts by accident, then cancel it 30 seconds
later, it doesn't bog down the server ...
2002-04-02 10:50:50 +00:00
Barry Lind 8860110a74 Removed error message that was incorectly being issued. This fixes a problem reported a few months ago where a select in a rule was causing an insert statement to return a result set which the code was explicitly prohibiting. 2002-04-02 06:24:10 +00:00
Hiroshi Inoue 6df395f63a 1) Add rollback functionality to updatable cursors.
2) Implement some options for SQLGetDescField().
3) Handle *Inifinity* timestamp for SQL_C_CHAR type output.
4) Separate Unicode conversions from common implementations.
5) Improve internal parse_statement() function.
2002-04-01 03:01:15 +00:00
Bruce Momjian eb1ee9e63f Fix ODBC warnings about missing parens and pg_ismb not used (added
#ifdef NOT_USED).
2002-03-29 07:48:56 +00:00
Bruce Momjian b2c89fa7af Fox for old python PyMem_DEL, was PyMem_Del, 2002-03-29 07:45:39 +00:00
Bruce Momjian ed6cce4c7b Fix '#' commant to be proper C comment. 2002-03-29 07:21:25 +00:00
Hiroshi Inoue 6852741c18 [2002-03-28]
1) Prepare to separate 4 kinds of Descriptor handles.
2) Detect the transaction status more naturally.
3) Improve Parse Statement functionality for the use
   of updatable cursors.
4) Improve updatable cursors.
5) Implement SQLGetDescField() and improve SQLColAttribute().
6) etc.
2002-03-28 08:08:07 +00:00
Barry Lind 2442e79e32 applied patch from Liam Stewart fixing a message in the properties file
also fixed a NPE when calling the next() method on a result set after the
connection or resultset has been closed. (bug reported by Hans Deragon)
2002-03-27 05:33:27 +00:00
Barry Lind da631e931f applied patch submitted by Florian (mailing-list@urbanet.ch) for BigDecimal support 2002-03-26 06:33:21 +00:00
Barry Lind ef7d791074 Changed QueryExecutor.java to correctly read responses from the backend.
Fixed NPE when database name was not passed on the jdbc connection URL
Fixed Connection.isClosed() to not hit the DB for every call
2002-03-26 05:52:50 +00:00
D'Arcy J.M. Cain 102fe3f845 Further changes following discussion on INTERFACES mailing list:
- Use PyObject_Del() rather than macro version
  - Check version and drop back to PyMem_Del() for older systems.
2002-03-26 01:50:14 +00:00
Bruce Momjian 51b55730ae Fix for ODBC compile warnings. 2002-03-25 01:53:55 +00:00
Tom Lane 5eed835b9a Indenting #if commands is not portable, is it? 2002-03-24 18:22:21 +00:00
Tom Lane 6137ed1b59 Fix minor syntax error. 2002-03-21 18:28:07 +00:00
Michael Meskes 73b92d10c6 Added typedef patches and a new option '-c' to automatically create C typedefs from SQL ones. 2002-03-21 09:42:52 +00:00
Dave Cramer 78d40a2a2f Two versions of QueryExecutor, currently only version 2 works 100%
these versions adhere to the backend protocol better than previous version
fixes problem when an error occurs on the backend, and the connection is still used
previous versions were throwing an exception half way through the protocol, leaving it
indeterminate.
also removes empty query code, should speed things up a bit
2002-03-21 03:20:30 +00:00
Dave Cramer 54cc549d8f modifications to the way the protocol is handled to be consistent with
QueryExecutor. This includes:
1) only exit after we receive a 'Z' packet
2) append error messages to a buffer and throw the exception at the end
2002-03-21 02:52:37 +00:00
Dave Cramer 00923229c2 Part of Anders Bengtsson's patch to clean up Connection.java 2002-03-21 02:40:03 +00:00
Dave Cramer d96c29ab30 Applied Anders patch to move the startup code out of Connection into StartupPacket
* Introduces a new class, StartupPacket.
* Moves a lot of constants from Connection to StartupPacket.
* Makes two instance variables in Connection into locals.
2002-03-21 02:39:06 +00:00
Michael Meskes 8e9b215fdf Just one more test case. 2002-03-20 21:00:24 +00:00
D'Arcy J.M. Cain 861c336b51 PyGreSQL causes a segfault when used with a Python executable that was
compiled with --with-pymalloc.  This change fixes that.  Thanks to
Dave Wallace <dwallace@udel.edu>
2002-03-20 14:36:06 +00:00
D'Arcy J.M. Cain b752788510 Bump version number to match tree. 2002-03-19 13:21:14 +00:00
D'Arcy J.M. Cain d6b4153f93 Fix name in comments and add info about this module's place in PyGreSQL. 2002-03-19 13:20:52 +00:00
Bruce Momjian f5810bb8a5 Add missing trailing semicolons to ecpg rules.
Neil Conway
2002-03-19 12:56:38 +00:00
Bruce Momjian eb1fb8650f >Added ServerEncoding
>       Korean (JOHAB), Thai (WIN874),
>       Vietnamese (TCVN), Arabic (WIN1256)
>
>Added ClientEncoding
>       Simplified Chinese (GBK), Korean (UHC)
>
>Add PsqlODBC and document ...etc patch.


"JDBC patch" is delivered, too. :-)



Eiji Tokuya
2002-03-19 02:48:45 +00:00
Bruce Momjian d3337c6e3f > I am backing out this patch. Please resubmit with this corrected. Thanks.
>
> I am running Python 1.5.

Therein lies the problem... :)

Since it appears you have the requirement of supporting old python
versions, attached is just the pgdb.py part of the patch (with a fix for
DateTime handling). It has the same functionality but certainly won't be
quite as fast. Given the absence of _PyString_Join in python1.5, it's a
pain to get the C variants working for all versions. The pgdb.py patch
does leaves the hooks in, should someone wish to do the optimization at a
later point.

Elliot Lee
2002-03-19 02:47:57 +00:00
Dave Cramer 525b19399c applied patch from Liam Stewart
If one is trying to compile a JDBC 1 driver and junit.jar is in the
CLASSPATH, then the build fails as ant tries to build the JDBC 2 test
classes. This patch fixes this problem by excluding the jdbc 2 files
unless the jdk1.2+ property is set.
2002-03-19 01:32:48 +00:00
Dave Cramer 202a19e47b Fixes bug where query hangs if there is an error in the query, went back to
code before QueryExecutor class was created and copied behaviour
2002-03-18 04:16:33 +00:00
Dave Cramer 134fe5ec61 fixed QueryExecuter to deal with multiple errors
previously it was throwing a SQLException as soon as the error message was
received from the backend. This did not allow the protocol to finish properly
now, simply collects error messages from the backend until the query is done
and throws exception at the end
Also added setLogLevel to Driver.java, and made the log levels public
2002-03-16 02:15:23 +00:00
Bruce Momjian efd45bc68f Manually clean up indenting of ecpg lex/yacc files, OK'ed by Michael
Meskes.  These files are not touched by pgindent so this has to be
manually done.
2002-03-15 21:46:59 +00:00
Dave Cramer a2b5512929 patch from Alexey Slynko
This patch solve problems with arrays in latest development JDBC driver
2002-03-15 04:11:49 +00:00
Hiroshi Inoue 01e322652b 1) Internal improvements to handle updatable cursors(1st cut).
2) Fix a bug in SQLColAttribute().
2002-03-14 05:42:04 +00:00
Bruce Momjian 80bbfe76d5 Inlined a patch to add the libpq setNoticeProcessor capability to
libpq++.

Ofir Reichenberg
2002-03-11 15:08:18 +00:00
Michael Meskes 9f9e3c9803 Changed the version numbers, but did not commit the Makefiles. 2002-03-11 12:56:02 +00:00
Hiroshi Inoue dadb718b10 Bug fixes for the 2002-03-08 change.
1) Put back the error message for SQLError().
2) Change Disallow premature to handle the SELECTed
   result.
3) Put back the behavior of AUTUCOMMIT mode change.
4) Fix SQLColumns for ODBC3.0.

5) Improve the handling of variable bookmark in ODBC3.0.
6) Enable Recognize Unique Index Button.
2002-03-11 10:25:57 +00:00
Michael Meskes 7f7fb4e64c Fixed two bugs in define command in pgc.l 2002-03-10 12:09:54 +00:00
Bruce Momjian ee27436f6c Disable brackets in multi-statement rules, as discussed. 2002-03-10 06:00:15 +00:00
Dave Cramer ee2154829e Added a check for not calling next() before getting objects from the result set,
moved the check for columnIndex into same call
check at the top of all getXXX
added appropriate error
2002-03-09 17:36:14 +00:00
Dave Cramer 1eb31d197d Here is a small patch that cleans up some error reporting in the JDBC driver. PSQLExceptions are thrown instead of SQLExceptions and if a warning is received while waiting for the backend secret key, that warning is chained to the new Connection object instead of generating an exception. A couple new error messages have been added. 2002-03-09 17:08:39 +00:00
Hiroshi Inoue fc70104725 Remove compile errors. 2002-03-08 09:50:39 +00:00
Hiroshi Inoue 4b47467a6b 1) Implement SQLParamOptions().
2) Handle Multiple results and implement SQLMoreResult().
3) Improve multibyte handling thanks to Eiji Tokuya.
4) Add new options.
   LF <-> CR/LF converion.
   TRUE is -1 (for VB).
5) Introduce unicode(UCS-2) support.
6) Reduce the length of connection strings.
7) Improve SQLError, SQLGetDiagRec(ODBC 3.0).
8) Implement SQLTablePrivileges().
9) Miscellaneous changes for ODBC 3.0 support.
2002-03-08 08:52:55 +00:00
Bruce Momjian 9956c566e3 Add libpgeasy example file. 2002-03-06 14:40:05 +00:00
Michael Meskes 5ca7c8e314 Synced parser with backend. 2002-03-06 10:10:52 +00:00
Bruce Momjian 92288a1cf9 Change made to elog:
o  Change all current CVS messages of NOTICE to WARNING.  We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.

o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.

o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.

o Remove INFO from the client_min_messages options and add NOTICE.

Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.

Regression passed.
2002-03-06 06:10:59 +00:00
Dave Cramer 39c58b9065 changed Cancel to cancel 2002-03-06 03:07:45 +00:00
Dave Cramer ffe356b5dd backed out changes for cancel, no need to look for two 'Z' responses 2002-03-05 20:11:57 +00:00
Dave Cramer 29ea8ff9b1 Patch by Nicolas Verger to correctly propogate SQLWarning to the Statement and ResultSet 2002-03-05 18:02:44 +00:00
Dave Cramer ff2f9b663f fixed cancel query bug introduced by patch 2002-03-05 18:01:27 +00:00
Bruce Momjian 0416641baa At this moment, --enable-debug adds debugging information to most of the
parts o f postgresql. The jdbc drivers are never compiled with debugging
support. This p atch make sure that debugging information is added to
the jdbc jar when the --en able-debug is added. This was usefull for me
for debugging some java jdbc poolin g objects but this might perhaps be
usefull for other people too?

Dries Verachtert
2002-03-05 17:55:23 +00:00
Bruce Momjian 6024ac1ba0 Back out old version and update with newer patch of:
Fix for non-blocking connections in libpq

Bernhard Herzog
2002-03-05 06:07:27 +00:00
Bruce Momjian a8bd7e1c6e > Tatsuo Ishii wrote:
> > > > It was made to cope with encoding such as an Asian bloc in 7.2Beta2.
> > > >
> > > > Added ServerEncoding
> > > >         Korean (JOHAB), Thai (WIN874),
> > > >         Vietnamese (TCVN), Arabic (WIN1256)
> > > >
> > > > Added ClientEncoding
> > > >         Simplified Chinese (GBK), Korean (UHC)
> > > >
> > > >
> > > >
> http://www.sankyo-unyu.co.jp/Pool/postgresql-7.2b2.newencoding.diff.tar.gz
> > > > (608K)
> > >
> > > Looks good.  I need some people to review this for me.
> >
> > For me they look good too. The only missing part is a
> > documentation. I will ask him to write it up. If he couldn't, I will
> > do it for him.
> > > The diff is 3mb
> > > but appears to address only additions to multibyte.  I have attached a
> > > list of files it modifies.  Also, look at the sizes of the mb/
> > > directory.  It is getting large:
> > >
> > >   4       ./CVS
> > >   6       ./Unicode/CVS
> > >   3433    ./Unicode
> > >   6197    .
> >
> > Yes. We definitely need the on-the-fly encoding addition capability:
> > i.e. CREATE CHRACTER SET in the future...
> > --
> > Tatsuo Ishii
> >
> >

Address chainge.

http://www.sankyo-unyu.co.jp/Pool/postgresql-7.2.newencoding.diff.gz

Add PsqlODBC and document ...etc patch.

Eiji Tokuya
2002-03-05 05:52:50 +00:00
Bruce Momjian 33766e680d Here's a patch against 7.1.3 that fixes a problem with sending larger
queries over non-blocking connections with libpq. "Larger" here
basically means that it doesn't fit into the output buffer.

The basic strategy is to fix pqFlush and pqPutBytes.

The problem with pqFlush as it stands now is that it returns EOF when an
error occurs or when not all data could be sent. The latter case is
clearly not an error for a non-blocking connection but the caller can't
distringuish it from an error very well.

The first part of the fix is therefore to fix pqFlush. This is done by
to renaming it to pqSendSome which only differs from pqFlush in its
return values to allow the caller to make the above distinction and a
new pqFlush which is implemented in terms of pqSendSome and behaves
exactly like the old pqFlush.

The second part of the fix modifies pqPutBytes to use pqSendSome instead
of pqFlush and to either send all the data or if not all data can be
sent on a non-blocking connection to at least put all data into the
output buffer, enlarging it if necessary. The callers of pqPutBytes
don't have to be changed because from their point of view pqPutBytes
behaves like before. It either succeeds in queueing all output data or
fails with an error.

I've also added a new API function PQsendSome which analogously to
PQflush just calls pqSendSome. Programs using non-blocking queries
should use this new function. The main difference is that this function
will have to be called repeatedly (calling select() properly in between)
until all data has been written.

AFAICT, the code in CVS HEAD hasn't changed with respect to non-blocking
queries and this fix should work there, too, but I haven't tested that
yet.

Bernhard Herzog
2002-03-05 05:20:12 +00:00
Dave Cramer 17b6baf17d Doug Fields patch to prevent exception being thrown on zero length arrays 2002-03-05 03:46:03 +00:00
Dave Cramer fe4e95f682 patch from Zhenbang Wei
The errors_zh_TW.properties must be translated using native2ascii or it
will raise an exception. Please replace the old file.
2002-03-05 03:33:29 +00:00
Dave Cramer 8f83590aa1 Patch from Ryouichi Matsuda
An attached patch corrects problem of this bug and fractional second.


 The handling of time zone was as follows:

   (a) with time zone
       using  SimpleDateFormat("yyyy-MM-dd HH:mm:ss z")
   (b) without time zone
       using  SimpleDateFormat("yyyy-MM-dd HH:mm:ss")


 About problem of fractional second,
 Fractional second was changed from milli-second to nano-second
2002-03-05 03:29:30 +00:00
Dave Cramer 7aa6270fc7 patch from Mitchel Friedman to fix getTables 2002-03-05 03:02:52 +00:00
Dave Cramer 521017c5d0 patch from Vicktor to fix Numeric decimal digits in getColumns 2002-03-05 02:14:08 +00:00
Bruce Momjian fef790cc03 Back out python patch:
Elliot Lee wrote:
> This patch to the python bindings adds C versions of the often-used
query
> args quoting routines, as well as support for quoting lists e.g.
> dbc.execute("SELECT * FROM foo WHERE blah IN %s", ([1,2,3],))
2002-03-05 02:01:44 +00:00
Bruce Momjian 14b05248cc This patch to the python bindings adds C versions of the often-used
query args quoting routines, as well as support for quoting lists e.g.
dbc.execute("SELECT * FROM foo WHERE blah IN %s", ([1,2,3],))

Elliot Lee
2002-03-05 00:23:13 +00:00
Bruce Momjian 294f0d4bd6 Add PQunescapeBytea libpq function.
Everyone using libpq and bytea is probably having to invent this wheel..

Patrick Welche
2002-03-04 23:59:14 +00:00
Bruce Momjian b2aade0e4b Improve libpgeasy API for multiple result sets, add example. 2002-03-04 18:50:21 +00:00
Tom Lane a616cbc5e3 Fix bogus error check in pg_execute, per report from lbayuk@mindspring.com. 2002-03-04 02:41:49 +00:00
Tom Lane 78ab803402 Don't bother to request SSL connection over a Unix socket, since the
postmaster won't accept the request anyway.  (If your kernel can't
be trusted, SSL will not help you.)
2002-03-02 00:49:22 +00:00
Hiroshi Inoue e1716475e4 Add files for Unicode support. 2002-03-01 07:18:34 +00:00
Hiroshi Inoue fc3726b4b9 Improve the handling of ODBC escape(a request from Marcelo Aceto).
Change SQLGetFunctions() to reply not yet implemented ODBC 3.0
functions precisely.
2002-02-27 01:43:24 +00:00
Dave Cramer 7776319a7e Implementation for cancelQuery by Grant Finnemore <grantf@guruhut.co.za> 2002-02-26 02:15:55 +00:00
Dave Cramer f66f7a542f compiles correctly but still doesn't work with jdk 1.4 2002-02-24 16:12:51 +00:00
Peter Eisentraut 42c3381fc7 Heimdal support (Kerberos V implementation from KTH) 2002-02-23 04:17:47 +00:00
Peter Eisentraut 0055a39390 Add -Wno-error to CFLAGS, so the rest of the tree can compile with
-Werror.
2002-02-23 04:16:04 +00:00
Dave Cramer 391e1f7b7f fixed compile error 2002-02-22 03:22:31 +00:00
Dave Cramer 8c17e4e0fc This patch fixes the exception thrown to inform the user the method
getColumnClassName(int) is not implemented. This will futher fixes method
ResultSet.getObject(int) since it requires the getColumnClassName(int) method to return the proper java class used to map the database column.

auther Ed Yu
2002-02-22 02:58:24 +00:00
Dave Cramer deaad93462 Patch from Cormac Twomey
fixes getIndexInfo throwing NullPointerException
fixes getIndexInfo improper results when multiple key indexs are used
2002-02-22 02:40:09 +00:00
Dave Cramer 0786c61c14 Patch from Cormac Twomey
fixes getIndexInfo throwing NullPointerException
fixes getIndexInfo improper results when multiple key indexs are used
2002-02-22 02:17:13 +00:00
Dave Cramer 178961ad47 now compiles clean with jdk 1.4 2002-02-22 02:07:30 +00:00
Hiroshi Inoue c03e7fbadc Remove compile warnings in multibute mode. 2002-02-18 05:54:50 +00:00
Hiroshi Inoue 3c16d095b5 The version is now 7.01.0010.
1) Handle parameter array.
2) Allow re-use of the connection handle after SQLDisconnect.
3) Reject NULL if no indicator specified.
4) Improve the handling of '_' in table name.
5) Unify internal begin/commit/abort operations.
6) Change SQLTables() to return null not "" for the
   table_owner.
7) Fix a bug about parameter handling reported by Benoit Menendez.
8) Add cast in handling ODBC date/time escape sequences.
9) Fix a bug about cache_size handing in declare/fetch mode.

[ODBC3.0 related]
10) Improve the handling of descriptor handles(ODBC3.0).
11) Improve the type handling of some types for ODBC3.0.

[Thanks to Marcelo Aceto for his useful patches]
12) Allow nested ODBC escape.
13) Allow changing autocommit on/off inside the transaction
    block.
14) Improve the handling of ODBC scalar functions.
2002-02-18 03:16:11 +00:00
Hiroshi Inoue b6db89a02d Separate info30.c from info.c. 2002-02-18 02:15:04 +00:00
Hiroshi Inoue 22d7fa7de4 Add files for ODBC3.0 support. 2002-02-18 01:43:24 +00:00
Bruce Momjian 4f5991552c Remove ODBC todo, add to main TODO. 2002-02-18 01:15:46 +00:00
Peter Eisentraut 673b48becb Remove warning about automatic inclusion of sqlca. 2002-02-15 17:46:57 +00:00
Peter Eisentraut 3ac85b86cb Update Win32-world version number of libpq++. 2002-01-30 21:59:33 +00:00
Michael Meskes cb8961ab47 Added patch to temporarily disable locale for descriptors too (Christof) 2002-01-23 16:34:06 +00:00
Tom Lane 04c8d4c660 libpq++/pgconnection.h must not include postgres_fe.h, else it fails to
compile in client apps that use the standard installed header set.
To allow removing that include, move DLLIMPORT definitions out of c.h
and into the appropriate port-specific header files.
2002-01-22 19:02:40 +00:00
Dave Cramer 83b5ae65a0 Fixes to getImportedKeys/getExportedKeys from Jason Davies
Previous versions did not correctly identify primary/foreign keys
2002-01-18 17:21:51 +00:00
Michael Meskes 2ab3a88879 Accept subsequent commits. This should have been just a warning anyway. I
cannot see a reason why it should be an error.
2002-01-18 15:51:00 +00:00
Barry Lind 2843a13e51 Applied patch submitted by Ryouichi Matsuda (r-matuda@sra.co.jp) that fixed a problem with leading zeros being lost on fractional seconds when setting a timestamp value on a PreparedStatement. 2002-01-15 07:37:33 +00:00
Barry Lind d013dbed75 Applied patch from Ryouichi Matsuda <r-matuda@sra.co.jp> where the jdbc
driver was not properly handling timestamptz datatype when using the
getObject() method on ResultSet.  Fix adds this datatype to the object mappings.
2002-01-15 06:55:13 +00:00
Tom Lane eab6776358 Ensure that ecpg/test is cleaned by higher-level 'make clean'. 2002-01-14 17:49:56 +00:00
Bruce Momjian d43b364eb9 Small AIX fixes from Rick Flower. 2002-01-14 15:34:41 +00:00
Michael Meskes 7138a1e5fc - Fixed variable handling for struct members.
- Removed check for array input. An attribut might store the
          complete array.
2002-01-13 08:52:09 +00:00
Michael Meskes 051a4f233f Added Christof's fixes. 2002-01-11 14:43:11 +00:00
Hiroshi Inoue d91b445117 *** empty log message *** 2002-01-11 06:01:47 +00:00
Hiroshi Inoue f43b5de649 Add a directory to save the changes until 7.3-tree is branched. 2002-01-11 02:50:01 +00:00
Michael Meskes 7955f98774 Include sqlca.h automatically. 2002-01-10 10:42:54 +00:00
Tom Lane 92a2598f97 The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.
2002-01-10 01:11:45 +00:00
Tom Lane d079c419d2 Fix include paths for case of VPATH build. 2002-01-09 00:06:42 +00:00
Tom Lane a34f313223 Fix copy-and-paste mistake exposed by gcc warning. 2002-01-08 23:34:47 +00:00
Peter Eisentraut 154ccb6040 Revert last change (CFLAGS+=-g). Probably was a mistake... 2002-01-08 20:41:28 +00:00
Tom Lane 61dd8b6dc4 Remove shift/reduce conflicts introduced by last change. 2002-01-08 19:02:51 +00:00