Here are some hacks to get timezone behavior for the various time
data types to be compatible with v6.0. Although we have some hooks
already installed to get timezone info from the client to the
server, it still isn't clear if that can correctly transfer enough
timezone info to make the behavior the same as if timezone info
were derived from the server as is now the case. We certainly
won't resolve it in a day, so I think we are stuck with server-only
timezones for v6.1.
Marc G. Fournier [Tue, 22 Apr 1997 17:35:09 +0000 (17:35 +0000)]
Major patch from Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
OK, here are a passel of patches for the geometric data types.
These add a "circle" data type, new operators and functions
for the existing data types, and change the default formats
for some of the existing types to make them consistant with
each other. Current formatting conventions (e.g. compatible
with v6.0 to allow dump/reload) are supported, but the new
conventions should be an improvement and we can eventually
drop the old conventions entirely.
For example, there are two kinds of paths (connected line segments),
open and closed, and the old format was
'(1,2,1,2,3,4)' for a closed path with two points (1,2) and (3,4)
'(0,2,1,2,3,4)' for an open path with two points (1,2) and (3,4)
Pretty arcane, huh? The new format for paths is
'((1,2),(3,4))' for a closed path with two points (1,2) and (3,4)
'[(1,2),(3,4)]' for an open path with two points (1,2) and (3,4)
For polygons, the old convention is
'(0,4,2,0,4,3)' for a triangle with points at (0,0),(4,4), and (2,3)
and the new convention is
'((0,0),(4,4),(2,3))' for a triangle with points at (0,0),(4,4), and (2,3)
Other data types which are also represented as lists of points
(e.g. boxes, line segments, and polygons) have similar representations
(they surround each point with parens).
For v6.1, any format which can be interpreted as the old style format
is decoded as such; we can remove that backwards compatibility but ugly
convention for v7.0. This will allow dump/reloads from v6.0.
These include some updates to the regression test files to change the test
for creating a data type from "circle" to "widget" to keep the test from
trashing the new builtin circle type.
Marc G. Fournier [Sun, 20 Apr 1997 21:49:17 +0000 (21:49 +0000)]
Here is the Mismatched input/output patch for tintervals as reported over
the last week on Hackers...(A coulpe of clippings of the final
verdict are included below + the diff).
Marc G. Fournier [Fri, 18 Apr 1997 18:34:11 +0000 (18:34 +0000)]
From: adrian@waltham.harvard.net
Subject: [HACKERS] Another patch to configure.in
I heard very little in objections/approvals to defaulting some of the
parameters to configure. Enclosed is a patch to configure.in which
removes the questions for
PGPORT
USE_LOCALE
NOHBA
By default (i.e. assuming you don't put anything extra in the configure
command line), it assumes PGPORT=5432, USE_LOCAL=no and NOHBA=no (i.e.
HBA is turned on)
--with-pgport=PGPORT_NO Over-rides the PGPORT value
--enable-locale enables USE_LOCALE
--disable-hba disables HBA
Just for completeness:
--prefix=BASEDIR Defaults to /usr/local/pgsql
--with-template=TEMPLATE Defaults to asking you
Marc G. Fournier [Thu, 17 Apr 1997 20:39:31 +0000 (20:39 +0000)]
From: Raymond Toy <toy@rtp.ericsson.se>
Subject: [PATCHES] 970417: some large object patches
Two patches here, made against 970417. Both have to do with large
objects:
1. lobjfuncs was not initialized in PQconnectdb. This causes
failure later if large objects are used. (Someone already
caught this error in PQsetdb.)
2. Postgres functions lo_import and lo_export sometimes
produce garbage for the file names because the filename
strings aren't always terminated by \0. (VARDATA isn't
necessarily null terminated.)
Marc G. Fournier [Thu, 17 Apr 1997 20:38:26 +0000 (20:38 +0000)]
From: Raymond Toy <toy@rtp.ericsson.se>
Subject: [PATCHES] 970417: two more patches for large objects
Here are two more patches:
1. pg_getint doesn't properly set the status flag when
calling pqGetShort or pqGetLong. This is required when
accessing large objects via libpq. This, combined with
problem 1 above causes postgres to crash when postgres
tries to print out the message that the status was not
good.
2. ExceptionalCondition crashes when called with detail =
NULL. This patch prevents dereferencing the NULL.
The patch fixes a rare bug that may occur when one tries to vacuum a single
table. The table name is de-allocated by the CommitTransactionCommand()
in vc_init() before it is copied in VacRel.data and sometimes this causes
a SIGSEGV. My patch simply moves the strcpy before vc_init.
1. BTREE_VERSION_1: using bti_itup->t_tid as unique identifier for a given
index tuple (logical position within A LEVEL). bti_oid & bti_dummy
taken off from BTItemData.
2. Fix for multi-column indices (nbtsearch.c):
_bt_binsrch() - for searches on internal pages having keysize <
number of attrs we point at the last item < the scankey, not at the
first item = the scankey;
_bt_moveright() - if keysize < number of attrs we compare scankey with
_last_ item on current page to decide should we move right or
not.
BTREE_VERSION_1: using bti_itup->t_tid as unique identifier for a given
index tuple (logical position within A LEVEL). bti_oid & bti_dummy
taken off from BTItemData.
Marc G. Fournier [Tue, 15 Apr 1997 17:41:44 +0000 (17:41 +0000)]
From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Money integration patches
Here are patches to integrate the money data type. I have included
some math and aggregate functions and have made the locale support optional
by #ifdef USE_LOCALE bracketing of functions.
I changed the data type to be pass-by-reference rather than by-value
to pave the way for a larger internal representation (64-bit ints?).
Also, I changed the tabbing of cash.c and cash.h to match most of
the other Postgres source code files (4 space indent, 8 spaces == 1 tab).
The locale stuff should be tested under another convention (Russian?)
but I don't know what the correct results should be so perhaps someone
else can give them a try. Will update docs and regression tests in
the next few days.
pg_proc.h still needs modifying, but this gets it in there so that we can
get around any compiler bugs. Will try and get the pg_proc.h entries done
up later tonight...
Now we have #define _CPU_INDEX_PAGE_WEIGHT_ 0.033 (/* CPU-index-to-page cost
weighting factor */) in addition to
#define _CPU_PAGE_WEIGHT_ 0.065 (/* CPU-heap-to-page cost weighting factor
*/).
1. Enable to have different _CPU_PAGE_WEIGHT_ for heap and index.
2. PageWeights are variables now.
3. Fixed using ceil((double)selec*indextuples) as estimation
for expected heap pages: ceil((double)selec*relpages) now.
Fix (hack) IndexSelectivity():
use sum(npages)/((nkeys == 1) ? 1 : nkeys + 1) as expected index page
estimation for multi-key quals - instead of sum(npages).
In old code npages for x > 10 and x < 20 is twice as for x > 10 - cool ?
From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Fix for European dates
This apparently fixes the European date reading problem reported
by several (European) bleeding edge adopters. I tried a few test
cases and it doesn't break the non-EuroDate cases in my test suite.
This commit represents a clean compile with the new templates under
FreeBSD
The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE. The Makefile(s)
should be alot more straightforward then they were before...and
consistent
Further extended Makefile.global/build/configure so that we can
have a 'template' file for each OS (and each version of OS, as in BSDi)
which is used as much as possible to generate Makefile.global
Any future ports should look at using the template file as a basis,
before moving over to Makefile.global.
This will most probably break alot of the ports, atho I've tried to
be very neat about it...
I sent in changes previously and they were rejected because they didn't
follow ANSI spec. Here is the input part of the changes again. Even
though it allows more flexibility for inputting different formats, it
is also backwards compatible with the standard version. I have also
not changed the output format so it will still output the ANSI forms.
Is this acceptable to everyone?