Commit Graph

11595 Commits

Author SHA1 Message Date
Bruce Momjian 329a1b7270 I get the following warning when I compile src/bin/pg_id/pg_id.c:
gcc -pipe -g -Wall -Wmissing-prototypes -Wmissing-declarations
-I../../../src/include   -c -o pg_id.o pg_id.c -MMD
pg_id.c: In function `main':
pg_id.c:35: warning: unused variable `optarg'

The attached trivial patch fixes the warning by removing the variable.

Neil Conway
2003-08-09 01:25:46 +00:00
Bruce Momjian cf3cc7576c This makes psql use the new pg_get_viewdef function. It also puts one
extra line break in to improve formatting.

Christopher Kings-Lynne
2003-08-09 01:21:54 +00:00
Bruce Momjian 46785776c4 Another pgindent run with updated typedefs. 2003-08-08 21:42:59 +00:00
Bruce Momjian 0e2b12bd96 pgindent fix for new typedefs. 2003-08-08 21:25:06 +00:00
Tom Lane 635d00ecea Avoid malloc(0). Although standard mallocs seem not to object,
some debugging malloc packages do.
2003-08-08 19:19:32 +00:00
Tom Lane 332c694085 Fix nasty little order-of-operations bug in _SPI_cursor_operation.
Per report from Mendola Gaetano.
2003-08-08 19:18:21 +00:00
Bruce Momjian 360162b172 Remove, no in /port. 2003-08-08 18:43:49 +00:00
Bruce Momjian 6a991845a3 sprompt not needed in libpq. 2003-08-08 16:32:45 +00:00
Tom Lane 870886affe Suppress unused-variable warnings when building without Asserts. 2003-08-08 14:39:45 +00:00
Tom Lane f65643771b Conversion functions must be STRICT to prevent them from getting null inputs. 2003-08-08 14:31:12 +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 71b9be4d56 Typo cleanup. 2003-08-08 03:09:56 +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 e8dd31701b more thread.c consistency. 2003-08-08 02:48:24 +00:00
Bruce Momjian e4cbb982b0 threads.c -> thread.c, be consistent. 2003-08-08 02:46:40 +00:00
Bruce Momjian cce40d15d5 Remove space between function name and opening paren in pg_dump, for
clarity.
2003-08-08 01:21:02 +00:00
Tom Lane f2b6bb42ab Fix floating-point timestamp comparisons to not go nuts if NaN is
encountered; per bug report from Christian van der Leeden 8/7/03.
Also, adjust larger/smaller routines (MAX/MIN) to share code with
comparisons for timestamp, interval, timetz.
2003-08-08 00:10:31 +00:00
Bruce Momjian e060701f51 Clean up function header. 2003-08-07 23:43:32 +00:00
Tom Lane 33ab177a56 Don't assume that struct option is available just because we can find a
getopt_long().  This is more or less the same problem as we saw earlier
with getaddrinfo() and struct addrinfo, and for the same reason: random
user-added libraries might contain the subroutine, but there's no
guarantee we will find the matching header files.
2003-08-07 21:11:58 +00:00
Tom Lane fea2ffa7d8 SCO_ACCEPT_BUG code didn't get updated for new SockAddr struct definition. 2003-08-07 19:37:13 +00:00
Tom Lane ecbed6e1b9 create_unique_plan() should not discard existing output columns of the
subplan it starts with, as they may be needed at upper join levels.
See comments added to code for the non-obvious reason why.  Per bug report
from Robert Creager.
2003-08-07 19:20:24 +00:00
Tom Lane d862045dfc Don't use HAVE_STRUCT_ADDRINFO as a guide to whether netdb.h defines
macros like AI_NUMERICHOST; instead, test the macros individually.
Should fix recent reports of trouble on AIX and Unixware.
2003-08-07 16:45:21 +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 c7fda55cc6 Update pgindent readme. 2003-08-07 15:02:43 +00:00
Tom Lane b830e933c0 Remove unnecessary use of multiple cat processes to feed psql; this
reduces the number of concurrent processes launched during parallel
regression tests, possibly avoiding failures such as exceeding a user's
max number of processes.  This essentially completes the reversion
of 1.27->1.28.
2003-08-07 14:36:31 +00:00
Bruce Momjian 78154363f9 Update typedef names for pgindent 7.4. 2003-08-07 05:18:14 +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 338aa57be0 Rename fields of DestReceiver to avoid collisions with (ill-considered)
macros in some platforms' sys/socket.h.
2003-08-06 17:46:46 +00:00
Tom Lane d5f7d2c682 Adopt a random backoff algorithm for sleep delays when waiting for a
spinlock.  Per recent pghackers discussion.
2003-08-06 16:43:43 +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 630684d3a1 Improve documentation of ParseDateTime(). Reorder tests to prevent
writing one more value into return arrays than will fit.  This is
potentially a stack smash, though I do not think it is a problem in
current uses of the routine, since a failure return causes elog anyway.
2003-08-05 18:30:21 +00:00
Tom Lane 9d41073f04 Fix several places where fractional-second inputs were misprocessed
in HAVE_INT64_TIMESTAMP cases, including two potential stack smashes
when more than six fractional digits were supplied.  Per bug report
from Philipp Reisner.
2003-08-05 17:39:19 +00:00
Tom Lane 2f9c859ea1 Fix some copyright notices that weren't updated. Improve copyright tool
so it won't miss 'em again.
2003-08-04 23:59:41 +00:00
Bruce Momjian 98bf004421 Re-add USE_THREADS, used by ecpg. 2003-08-04 21:26:26 +00:00
Tom Lane 17d6721e0b Must print server's failure message before trying reconnect, not after. 2003-08-04 19:10:40 +00:00
Tom Lane e627dd2db9 Fix pltcl and plpython to support STATEMENT triggers.
Joe Conway
2003-08-04 18:40:50 +00:00