Tom Lane [Tue, 30 Oct 2001 19:58:58 +0000 (19:58 +0000)]
Fix problems with subselects used in GROUP BY expressions, per gripe
from Philip Warner. Side effect of change is that GROUP BY expressions
will not be re-evaluated at multiple plan levels anymore, whereas this
sometimes happened with old code.
Barry Lind [Tue, 30 Oct 2001 06:31:59 +0000 (06:31 +0000)]
fixed change in behavior introduced in bytea / getBytes changes. This patch reverts back unintentional change in behavior to return raw value even when not bytea column
Tom Lane [Thu, 25 Oct 2001 20:37:30 +0000 (20:37 +0000)]
Fix a couple of places where lack of parenthesization of a cast
causes pgindent to make weird formatting decisions. Easiest fix
seems to be to put in the extra parens...
Tom Lane [Thu, 25 Oct 2001 14:10:07 +0000 (14:10 +0000)]
Add int2-to-int8 and int8-to-int2 conversion routines. Needed to avoid
breaking existing pg_dump scripts, which try to assign the result of
count(*) to an int2 variable. catversion bumped.
Barry Lind [Wed, 24 Oct 2001 04:31:50 +0000 (04:31 +0000)]
fix for a bug in DatabaseMetaData.getIndexInfo(). This fixes a bug reported by tom_falconer@lineone.net. On Sept 7th, he sent a test case to the list demonstrating the bug. His test case now works successfully with this patch
Tom Lane [Tue, 23 Oct 2001 21:26:44 +0000 (21:26 +0000)]
Forbid the switch combination --clean --create, which is pointless
(why bother dropping individual objects in a just-created database?)
as well as dangerous (as the code stands, the drops will be issued in
the wrong database, namely the one you were originally connected to).
Tom Lane [Tue, 23 Oct 2001 02:20:15 +0000 (02:20 +0000)]
Add error checking to PageRepairFragmentation to ensure that it can
never overwrite adjacent pages with copied data, even if page header
and/or item pointers are already corrupt. Change inspired by trouble
report from Alvaro Herrera.
Tom Lane [Mon, 22 Oct 2001 19:41:38 +0000 (19:41 +0000)]
Further cleanup of ps_status setup code. On platforms where the
environment strings need to be moved around, do so when called from
initial startup (main.c), not in init_ps_status. This eliminates the
former risk of invalidating saved environment-string pointers, since
no code has yet had a chance to grab any such pointers when main.c
is running.
Tom Lane [Mon, 22 Oct 2001 19:34:13 +0000 (19:34 +0000)]
Add defenses against invalid operator names passed in CREATE OPERATOR
arguments (where the parser doesn't check them already). Minor code
cleanups too.
Tom Lane [Sun, 21 Oct 2001 03:43:54 +0000 (03:43 +0000)]
Fix FindExec() for case where executable is found via a relative path
in .:/home/postgres/testversion/bin:/opt/perl5.6.1/bin:/home/postgres/bin:/usr/local/bin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/upgrade/bin:/opt/CC/bin:/opt/langtools/bin:/opt/graphics/phigs/bin:/opt/java/bin:/bin:/opt/imake/bin:/opt/hparray/bin:/opt/aCC/bin:/opt/lrom/bin:/usr/local/nmh/bin:. (I suppose the only common case for this is '.').
Tom Lane [Sun, 21 Oct 2001 03:25:36 +0000 (03:25 +0000)]
Fix getopt-vs-init_ps_display problem by copying original argv[] info,
per suggestion from Peter. Simplify several APIs by transmitting the
original argv location directly from main.c to ps_status.c, instead of
passing it down through several levels of subroutines.
Tom Lane [Sat, 20 Oct 2001 17:57:39 +0000 (17:57 +0000)]
Revert change to autodetect '__getopt_initialized' variable ... turns
out glibc doesn't actually export this variable, so we need a different
solution.
Fix transposed arguments for typmod for one INTERVAL production.
Mask both typmod subfields for INTERVAL to avoid setting the high bit,
per dire warning from Tom Lane.
Clear tmask for DTK_ISO_TIME case to avoid time zone troubles.
Symptom reported by Tom Lane.
Clean up checking for valid time zone info in output routine.
This should now work for both SQL99 and Unix-style time zones.
Put in explicit check for INTERVAL() typmod rounding to avoid accumulating
cruft in the lower bits. Not sure that this helps, but we'll need to do
something. The symptom is visible with a query like
select interval(2) '10000 days 01:02:03.040506';
Regression tests are patched to repair the Tom Lane symptom, and all pass.
Tom Lane [Fri, 19 Oct 2001 18:19:41 +0000 (18:19 +0000)]
Set optreset on platforms that have it before launching postmaster
subprocesses; perhaps this will fix portability problem just noted by
Lockhart. Also, move test for bad permissions of DataDir to a more
logical place.
Tom Lane [Fri, 19 Oct 2001 17:03:08 +0000 (17:03 +0000)]
Ensure that all startup paths (postmaster, standalone postgres, or
bootstrap) check for a valid PG_VERSION file before looking at anything
else in the data directory. This fixes confusing error report when
trying to start current sources in a pre-7.1 data directory.
Per trouble report from Rich Shepard 10/18/01.