Commit Graph

13505 Commits

Author SHA1 Message Date
Barry Lind 2232172e44 JDBC checkin fixing the following bugs:
Fixed support in the driver for notifications (added PGConnection.getNotifications()) - problem reported by Benjamin.Feinstein@guardent.com
  Worked around server problems with int8/int2 and constants; quote values when they are intended to bind to an int8/int2 column - reported by many
  Fixed bug in the Array interface with string parsing not handling escaped characters correctly - reported by devajx@yahoo.com
  Added workaround to support 'infinity' and '-infinity' for dates - reported bydmitry@openratings.com
  Fixed some performance issues with setBlob - reported by d.wall@computer.org
  Added support for using new prepared statements functionality in 7.3 (added PGStatement.setUseServerPrepare() and isUseServerPrepare() methods)

 Modified Files:
 	jdbc/org/postgresql/PGConnection.java
 	jdbc/org/postgresql/PGStatement.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/jdbc2/Array.java
 Added Files:
 	jdbc/org/postgresql/PGNotification.java
 	jdbc/org/postgresql/core/Notification.java
2002-09-02 03:07:36 +00:00
Bruce Momjian 97ac103289 Remove sys/types.h in files that include postgres.h, and hence c.h,
because c.h has sys/types.h.
2002-09-02 02:47:07 +00:00
Tom Lane 248c67d7ed CREATE OR REPLACE VIEW, CREATE OR REPLACE RULE.
Gavin Sherry, Neil Conway, and Tom Lane all got their hands dirty
on this one ...
2002-09-02 02:13:02 +00:00
Tom Lane c7a165adc6 Code review for HeapTupleHeader changes. Add version number to page headers
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
per earlier discussion.  Simplify scheme for overlaying fields in tuple
header (no need for cmax to live in more than one place).  Don't try to
clear infomask status bits in tqual.c --- not safe to do it there.  Don't
try to force output table of a SELECT INTO to have OIDs, either.  Get rid
of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
has already caused one recent failure.  Improve documentation.
2002-09-02 01:05:06 +00:00
Dave Cramer fcd34f9f7f patch from Thomas O'Dowd to ensure that connections are closed 2002-09-01 23:56:13 +00:00
Dave Cramer 422c2e38a1 testing for insertRow 2002-09-01 23:45:20 +00:00
Bruce Momjian 164e1bc913 Update MEMSET_LOOP_LIMIT to 1024 because it is the best value for most
platforms.
2002-09-01 23:41:47 +00:00
Dave Cramer 881390fff6 patch to allow insertRow on an empty resultSet 2002-09-01 23:40:36 +00:00
Dave Cramer 6a5168a7a1 Changed to reflect the current reality, ie we do support updateable resultsets 2002-09-01 23:38:53 +00:00
Bruce Momjian dd1dcf2362 Improve footer length computation for psql.
Greg Sabino Mullan
2002-09-01 23:30:46 +00:00
Bruce Momjian 548d646e65 Add log_duration to GUC/postgresql.conf.
Rename debug_print_query to log_statement and rename show_query_stats to
show_statement_stats.
2002-09-01 23:26:06 +00:00
Bruce Momjian f4abdd8212 Add:
> 	o Add table function support to pltcl, plperl, plpython
2002-09-01 22:36:11 +00:00
Tom Lane 470a1048ec plpgsql functions can return RECORD, per Neil Conway. 2002-09-01 16:28:06 +00:00
Tom Lane 1903221517 Minor copy-editing. 2002-09-01 02:37:02 +00:00
Tom Lane 681ed4e2fe Code cleanups: make non-implicit WITHOUT FUNCTION casts work, avoid
redundant pg_cast searches, fix obsolete comments.
2002-09-01 02:27:32 +00:00
Bruce Momjian a03f9adb98 Remove mention of wal_files in a SHOW example. 2002-09-01 01:59:48 +00:00
Bruce Momjian d64e6392fb Remove code that suggested increasing wal_files. 2002-09-01 01:58:42 +00:00
Bruce Momjian ee8fcc57f6 Done:
> 	o -SELECT col FROM tab WHERE numeric_col = 10.1 fails, requires quotes
2002-09-01 01:32:21 +00:00
Tom Lane 3c49c4b152 Mark the float8 -> int8 cast as implicit. This resolves the problem
pointed out by Barry Lind: UPDATE bigintcol = 10000000000 fails because
the constant is initially taken as float8.  We really need a better way,
but it's not gonna happen for 7.3.

Also, remove int4reltime() function, which is redundant with the
existing binary-compatibility coercion path from int4 to reltime,
and probably has been unreachable code for a long while.
2002-09-01 00:58:07 +00:00
Tom Lane 845a6c3acc Code review for domain-constraints patch. Use a new ConstraintTest node
type for runtime constraint checks, instead of misusing the parse-time
Constraint node for the purpose.  Fix some damage introduced into type
coercion logic; in particular ensure that a coerced expression tree will
read out the correct result type when inspected (patch had broken some
RelabelType cases).  Enforce domain NOT NULL constraints against columns
that are omitted from an INSERT.
2002-08-31 22:10:48 +00:00
Tom Lane 1440acd703 Wups, didn't mean to commit that just yet. 2002-08-31 19:10:08 +00:00
Tom Lane 0da6cf54ec The UNDEFOID later causes an assertion failure in heap_formtuple when
you try to use the tupdesc to build a tuple.

Joe Conway
2002-08-31 19:09:27 +00:00
Tom Lane 1bab464eb4 Code review for pg_locks feature. Make shmemoffset of PROCLOCK structs
available (else there's no way to interpret the list links).  Change
pg_locks view to show transaction ID locks separately from ordinary
relation locks.  Avoid showing N duplicate rows when the same lock is
held multiple times (seems unlikely that users care about exact hold
count).  Improve documentation.
2002-08-31 17:14:28 +00:00
Bruce Momjian 642fd38e42 *** empty log message *** 2002-08-31 01:36:33 +00:00
Tom Lane 7bacf2befa Add expected tuple descriptor to ReturnSetInfo information for table
functions, per suggestion from John Gray and Joe Conway.  Also, fix
plpgsql RETURN NEXT to verify that returned values match the expected
tupdesc.
2002-08-30 23:59:46 +00:00
Tom Lane 9c279355fb Updates to reflect availability of autocommit option. 2002-08-30 22:45:25 +00:00
Tom Lane 26993b2918 AUTOCOMMIT mode is now an available backend GUC variable; setting it
to false provides more SQL-spec-compliant behavior than we had before.
I am not sure that setting it false is actually a good idea yet; there
is a lot of client-side code that will probably be broken by turning
autocommit off.  But it's a start.

Loosely based on a patch by David Van Wie.
2002-08-30 22:18:07 +00:00
Tom Lane 549928d99b Fix for breakage of C-coded SRFs, from Joe Conway. 2002-08-30 19:56:49 +00:00
Tom Lane e2d156fa6e Add attisinherited column to pg_attribute; use it to guard against
column additions, deletions, and renames that would let a child table
get out of sync with its parent.  Patch by Alvaro Herrera, with some
kibitzing by Tom Lane.
2002-08-30 19:23:20 +00:00
Bruce Momjian 96fd7192e7 Back out unintented tab change. 2002-08-30 18:15:23 +00:00
Bruce Momjian 72b60ac997 Remove pgaccess from Makefile. 2002-08-30 18:14:21 +00:00
Bruce Momjian ce26e71945 Run autoconf. 2002-08-30 17:16:42 +00:00
Bruce Momjian 47c51db5f3 Update documentation for --with-perl. 2002-08-30 17:14:30 +00:00
Bruce Momjian 2c65658c04 Improve wording after wal_files removal. 2002-08-30 16:53:34 +00:00
Bruce Momjian 63653f7ffa Complete TODO item:
* Remove wal_files postgresql.conf option because WAL files are
	  now recycled
2002-08-30 16:50:50 +00:00
Bruce Momjian fefb57ce74 Remove pgaccess from CVS. It has its own home now. 2002-08-30 16:48:44 +00:00
Bruce Momjian 4890ec9eac Re-enable perl configure tests for psql help file generation. 2002-08-30 16:23:21 +00:00
Bruce Momjian f7e089b3fa Back out password packet length check.
Improve wording of pre-7.3 syntax mention.
2002-08-30 16:00:41 +00:00
Marc G. Fournier 9a0b4d7f84 perl5 interface moved to gborg 2002-08-30 13:06:22 +00:00
Marc G. Fournier c411f51dfb libpgeasy moved to gborg ... 2002-08-30 13:03:11 +00:00
Tom Lane df40e28850 Fix off-by-one allocation error in PasswordFromFile(), per Gordon Runkle. 2002-08-30 05:28:50 +00:00
Bruce Momjian cafebdd4d8 Add comment on old sytax for SELECT FOR UPDATE/LIMIT and COPY. 2002-08-30 03:18:23 +00:00
Tom Lane a4dbbb52c9 Revert _LARGEFILE64_SOURCE addition; good try but doesn't work,
at least not on HPUX 10.20, and there's no reason to think it
is needed on later versions.
2002-08-30 02:01:34 +00:00
Tom Lane d803de50d4 intagg subdirectory was missing. 2002-08-30 01:44:00 +00:00
Tom Lane fac3dd56b3 Group-manipulating code neglected to fill in array element type,
which is now required.
2002-08-30 01:01:02 +00:00
Tom Lane e107f3a7e3 PL/pgSQL functions can return sets. Neil Conway's patch, modified so
that the functionality is available to anyone via ReturnSetInfo, rather
than hard-wiring it to PL/pgSQL.
2002-08-30 00:28:41 +00:00
Hiroshi Inoue 82ccb420d5 Fix a bug introduced in 7.2. 2002-08-29 23:39:05 +00:00
Bruce Momjian 40f2eec503 > > > > If you want to put in security restrictions that are actually useful,
> > > > where is the code to verify that PGPASSWORDFILE points at a
> > > > non-world-readable file?  That needs to be there now, not later, or
> > > > we'll have people moaning about backward compatibility when we finally
> > > > do plug that hole.

Alvaro Herrera
2002-08-29 23:06:32 +00:00
Bruce Momjian 9858a3a43f Sir Mordred The Traitor <mordred@s-mail.com> writes:
> Upon invoking a polygon(integer, circle) function a
> src/backend/utils/adt/geo_ops.c:circle_poly() function will gets
> called, which suffers from a buffer overflow.
>
> 2) A src/backend/adt/utils/geo_ops.c:path_encode() fails to detect a
> buffer overrun condition. It is called in multiple places, the most
> interesting are path_out() and poly_out() functions.

> 5) A src/backend/utils/adt/geo_ops.c:path_add() also fails to detect
> a simple buffer overrun.

I've attached a patch which should fix these problems.

Neil Conway
2002-08-29 23:05:44 +00:00
Bruce Momjian dbc4d615ca Add cube changes file. 2002-08-29 23:05:03 +00:00