Commit Graph

13571 Commits

Author SHA1 Message Date
Neil Conway 8ff374ce91 psql code cleanup:
- refactor a bunch of code to call a separate function print_msg() which
checks whether "silent mode" is enabled before printing an error
message.

- rename "silence_mode" to "silent_mode", which IMHO makes more sense

- make the error messages we emit in "waiting" mode more consistent; I
believe this fixes a recent error message regression
2004-10-15 01:36:12 +00:00
Bruce Momjian 5c267325ec Add 'int' cast for getpid() because some Solaris releases return long
for getpid().
2004-10-14 20:23:46 +00:00
Bruce Momjian e92b007715 pg_restore wording improvement, per Peter. 2004-10-13 14:24:16 +00:00
Bruce Momjian c55de22d94 Enable service use by Cygwin of pg_ctl. 2004-10-13 10:35:05 +00:00
Bruce Momjian 4855d7ebe4 Allow compiles for Cygwin /contrib modules.
Reini Urban
2004-10-13 10:20:04 +00:00
Bruce Momjian ae1703d897 Enable static lib builds on Win32 and Cygwin. 2004-10-13 09:51:47 +00:00
Neil Conway 7069dbcc31 More minor cosmetic improvements:
- remove another senseless "extern" keyword that was applied to a
function definition
- change a foo more function signatures from "some_type foo()" to
"some_type foo(void)"
- rewrite another K&R style function definition
- make the type of the "action" function pointer in the KeyWord struct
in src/backend/utils/adt/formatting.c more precise
2004-10-13 01:25:13 +00:00
Neil Conway 1da2bccabb Unbreak regression tests (Peter's recent checkin to executor/spi.c did
not update some error message text).
2004-10-13 01:22:31 +00:00
Bruce Momjian 90542f556b Clarify pg_restore --help wording. 2004-10-13 00:42:53 +00:00
Bruce Momjian bac78bbac6 Update Cygwin build to not use DLLINIT, per Cygwin report from Reini
Urban
2004-10-12 22:20:17 +00:00
Peter Eisentraut 0fd37839d9 Message style revisions 2004-10-12 21:54:45 +00:00
Peter Eisentraut 8532a1aabe New translation 2004-10-12 18:10:16 +00:00
Peter Eisentraut 893094415b Translation updates 2004-10-12 18:01:20 +00:00
Peter Eisentraut 7656e55639 Translation update 2004-10-12 17:57:14 +00:00
Tom Lane a323bce2e7 plpgsql EXIT construct forgot to downcase or quote-strip its identifier
argument, leading to label matching failures at run-time.  Per report from
Patrick Fiche.  Also, fix it so that an unrecognized label argument draws
a more useful error message than 'syntax error'.
2004-10-12 15:44:15 +00:00
Neil Conway 0b112045b7 Fix vpath build break, induced by Bruce's recent commit. 2004-10-12 04:48:36 +00:00
Neil Conway d709964779 Fix a copy-and-paste error: give a distinct memory context a distinct
name, mainly for debugging purposes.
2004-10-12 01:50:04 +00:00
Bruce Momjian 29e7dc420a Add some pg_config_path.h dependencies for places that include
pg_config_paths.h outside of /src/port.
2004-10-12 01:04:11 +00:00
Tom Lane d10a406fe8 Use -fPIC not -fpic for BSDen on Sparc. Also switch from
$(LD) -x -Bshareable to $(CC) -shared on OpenBSD (I suspect this
should be carried over to the other two as well, but will refrain
pending suggestions from people who actually use those platforms).
Per Stefan Kaltenbrunner.
2004-10-11 23:27:23 +00:00
Tom Lane 26112850ec Fix OR-index-scan planner to recognize that a partial index is usable
for scanning one term of an OR clause if the index's predicate is implied
by that same OR clause term (possibly in conjunction with top-level WHERE
clauses).  Per recent example from Dawid Kuroczko,
http://archives.postgresql.org/pgsql-performance/2004-10/msg00095.php
Also, fix a very long-standing bug in index predicate testing, namely the
bizarre ordering of decomposition of predicate and restriction clauses.
AFAICS the correct way is to break down the predicate all the way, and
then for each component term see if you can prove it from the entire
restriction set.  The original coding had a purely-implementation-artifact
distinction between ANDing at the top level and ANDing below that, and
proceeded to get the decomposition order wrong everywhere below the top
level, with the result that even slightly complicated AND/OR predicates
could not be proven.  For instance, given
create index foop on foo(f2) where f1=42 or f1=1
    or (f1 = 11 and f2 = 55);
the old code would fail to match this index to the query
select * from foo where f1 = 11 and f2 = 55;
when it obviously ought to match.
2004-10-11 22:57:00 +00:00
Bruce Momjian c0c4883be3 Use native Cygwin symlinks so tablespaces work on Win95/98/ME which
don't support junction points.  Doesn't affect native Win32.
2004-10-11 22:50:48 +00:00
Tom Lane 669ca7af83 Another try at making plpython autoconfiguration work correctly. Use a
-L spec rather than assuming libpython is in the standard search path
(this returns to the way 7.4 did it).  But check the distutils output
to see if it looks like Python has built a shared library, and if so
link with that instead of the probably-not-shared library found in
configdir.
2004-10-11 19:32:19 +00:00
Tom Lane e5d30091e6 Fix pg_indexes view so that it shows the index's tablespace not the
parent table's tablespace, as per gripe from Michael Kleiser.  Choose
a more plausible column order for this view and pg_tables.  Update
documentation of these views, which was missed in original patch.
2004-10-11 17:24:41 +00:00
Neil Conway 5340a988c8 Fix typo in comment. 2004-10-11 02:02:41 +00:00
Neil Conway 0e72b9d440 Cosmetic improvements/code cleanup:
- replace some function signatures of the form "some_type foo()" with
"some_type foo(void)"
- replace a few instances of a literal 0 being used as a NULL pointer;
there are more instances of this in the code, but I just fixed a few
- in src/backend/utils/mb/wstrncmp.c, replace K&R style function
declarations with ANSI style, remove use of 'register' keyword
- remove an "extern" modifier that was applied to a function definition
(rather than a declaration)
2004-10-10 23:37:45 +00:00
Tom Lane 86a39d5a19 Un-break plpython build for non-Windows platforms. 2004-10-10 19:07:55 +00:00
Tom Lane ea12f8e6a3 Remove gratuitous editorialization on rpath. 2004-10-10 16:13:03 +00:00
Tom Lane 337ffcddba Adjust configuration-files GUC behavior as per my recent proposal.
The vars are renamed to data_directory, config_file, hba_file, and
ident_file, and are guaranteed to be set to accurate absolute paths
during postmaster startup.
This commit does not yet do anything about hiding path values from
non-superusers.
2004-10-09 23:13:22 +00:00
Peter Eisentraut 0d069c53c3 Translation improvement 2004-10-09 17:41:17 +00:00
Bruce Momjian 6c77feed3a Add win32 version information for pg_config Makefile. 2004-10-09 03:57:39 +00:00
Bruce Momjian 67608a393b Make getpid() use %d consistently for printing. 2004-10-09 02:46:42 +00:00
Bruce Momjian abc1d28ba7 Suppress timezone output on log_line_prefix %t on Win32, because it is
too long.
2004-10-09 01:24:47 +00:00
Tom Lane 07ccbeb360 Include schema name in pg_restore -l output, per request from Phil Endecott. 2004-10-08 15:03:26 +00:00
Neil Conway 9bf6effd8e Another minor tweak to psql startup: set the default values for the PROMPT1,
PROMPT2 and PROMPT3 variables before we read any of the settings specified
via the user on the command-line or in psqlrc, so that the latter can
override the former. Per original patch from Ingo van Lil, simpler fix
suggested by Tom Lane.
2004-10-08 11:24:19 +00:00
Tom Lane 79a831e50a Tweak HPUX shared-library build flags, per Shinji Teragaito. 2004-10-08 04:22:59 +00:00
Bruce Momjian 8a657808b0 Update CIDR regresion tests to test for network masks inside the last
byte being tested, to catch any future breakage.
2004-10-08 01:45:37 +00:00
Tom Lane 7ca3a0f3e2 Whack some sense into the configuration-file-location patch.
Refactor code into something reasonably understandable, cause
use of the feature to not fail in standalone backends or in
EXEC_BACKEND case, fix sloppy guc.c table entries, make the
documentation minimally usable.
2004-10-08 01:36:36 +00:00
Bruce Momjian f4f6caa9b0 Do proper testing of CIDR bits against network mask, e.g. don't allow:
test=# select '204.248.199.1/31'::cidr;

Previous releases erroneously accepted such addresses.

WARN IN RELEASE NOTES

Kevin Brintnall
2004-10-08 01:10:31 +00:00
Bruce Momjian b577fe1d56 Remove benchmark comment. 2004-10-07 22:51:13 +00:00
Tom Lane 4b10271037 Change get_rule_expr so that when the input is a List, it displays the
list elements comma-separated instead of barfing.  This allows elimination
of half a dozen redundant copies of that behavior, and also makes the
world safe again for pg_get_expr() applied to pg_index.indexprs, per gripe
from Alexander Zhiltsov.
2004-10-07 20:36:52 +00:00
Bruce Momjian 05c561eec8 Remove mention of -Q option for bench. 2004-10-07 19:37:16 +00:00
Bruce Momjian 59bf879f12 Move -DPLPERL_HAVE_UID_GID to the plperl Makefile, for Win32 only. 2004-10-07 19:01:09 +00:00
Tom Lane 6a640d1e02 Add missing null terminator to escaped string; clean up unnecessarily
obscurantist coding conventions.
2004-10-07 18:57:26 +00:00
Bruce Momjian 0c657baa7f Add PLperl workaround for Win32 to the *.xs file. 2004-10-07 18:57:18 +00:00
Tom Lane a8487e15ed Fix problems with SQL functions returning rowtypes that have dropped
columns.  The returned tuple needs to have appropriate NULL columns
inserted so that it actually matches the declared rowtype.  It seemed
convenient to use a JunkFilter for this, so I made some cleanups and
simplifications in the JunkFilter code to allow it to support this
additional functionality.  (That in turn exposed a latent bug in
nodeAppend.c, which is that it was returning a tuple slot whose
descriptor didn't match its data.)  Also, move check_sql_fn_retval
out of pg_proc.c and into functions.c, where it seems to more naturally
belong.
2004-10-07 18:38:51 +00:00
Bruce Momjian 6d46ea25f2 Add one more byte to malloc for null storage. 2004-10-07 17:29:12 +00:00
Bruce Momjian 9fb5c757b8 Remove unneeded dash. 2004-10-07 17:04:54 +00:00
Bruce Momjian 00f184a83f Update comment to fix nibble mention:
* We are not sure how much precision is in tv_usec, so we
	 * swap the high and low 16 bits of 'later' and XOR them with
	 * 'earlier'. On the off chance that the result is 0, we
	 * loop until it isn't.

Greg Stark
2004-10-07 17:03:50 +00:00
Bruce Momjian d1cee5495a Escape single quotes and backslashes used in locales placed in
postgresql.conf.

Zhong Xubin
2004-10-07 16:53:25 +00:00
Bruce Momjian 2b8fab842b Prevent install error message when doing cmp on empty tree. 2004-10-07 16:23:28 +00:00