Fix timezone manipulation code to avoid crashes on some machines.
Add type conversion functions for floating point numbers.
Check for zero in unary minus floating point code (IEEE allows an
explicit negative zero which looks ugly in a query result!).
Ensure circle type has non-negative radius.
Marc G. Fournier [Sun, 11 May 1997 06:18:33 +0000 (06:18 +0000)]
From: David Friend <dfriend@atlsci.atlsci.com>
Subject: [PATCHES] Documentation update
This patch updates some of the documentation that comes with the
distribution. The following files are updated:
COPYRIGHT
README
doc/README.flex
doc/README.support
doc/bug.template
From: Edmund Mergl <E.Mergl@bawue.de>
Subject: [PATCHES] libpq patch
Hi,
here is a small patch which fixes two problems:
1. libpq/libpq-fe.h:
somehow disappeared the line
#define DefaultOption ""
now compilation stops with an error complainig an
unknown DefaultOption (970508).
2. Same patch as I sent already twice, but it never made it
into the source tree: there is no default value for
AuthType and Password. This way any libpq-application
(i.e. perl-scripts) which use the function PQconnectdb
will break with PostgreSQL-6.1. The patch simply uses
an empty string as default value.
From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [PATCHES] libpq SET var TO patch
One last, I hope. This one corrects a bogus format string, and
actually sends the contents of PG_DATESTYLE to the backend. That
means, you can do a setenv PG_DATESTYLE 'iso', and your libpq
will pick that up and tell the backend.
Change dummy array dimensions from [0] to [1] to keep non-gcc compilers happy.
No real change in the support code is required since the actual size
of the structures is calculated using offsetof() rather than sizeof().
Rename LOread() and LOwrite() to be lower case to allow use
in case-insensitive SQL. Define LOread() and LOwrite() as macros
to avoid having to update calls everywhere.
/*
* If the file already exists and is empty, we pretend that the
* create succeeded. During bootstrap processing, we skip that check,
* because pg_time, pg_variable, and pg_log get created before their
* .bki file entries are processed.
*
> * As the result of this pretence it was possible to have in
> * pg_class > 1 records with the same relname. Actually, it
> * should be fixed in upper levels, too, but... - vadim 05/06/97
> */
I notice that I have to put single quotes around money amounts if there
is a decimal point in the value. I appears to be happening because there
is something changing things like "123.45" to "123.450000" and the code
has a problem with that. There may be a better way to fix this but here
is a simple change to cash.c that lets it accept trailing zeroes.
Change mixed-case routines to lower-case for case-insensitive SQL.
Add mixed-case #define synonyms to avoid changing more source code.
Add comparison operators for boolean.
Add aggregate min() and max() for datetime and timespan.
Change mixed-case routines to lower-case in pg_proc.h
Add comparison operators for boolean.
Add aggregate min() and max() for datetime and timespan.
Fix duplicate OID in pg_proc.h
Change mixed-case routines to lower-case if referenced in pg_proc.h
Add comparison operators to boolean and smaller/larger operators to datetime
and timespan. Fix int4 overflow math problem in timespan comparison operators.
Marc G. Fournier [Sun, 27 Apr 1997 07:45:49 +0000 (07:45 +0000)]
Alot of regression test fixes, mainly to compensate for moving
the DROP TABLE calls from the destroy.sql file to the 'types' .sql files,
so that they are self-contained
btree_index, hash_index and misc all fail as there seems to be missing
a 'misc.out' expected file...have asked Thomas for one...
Marc G. Fournier [Sun, 27 Apr 1997 04:50:06 +0000 (04:50 +0000)]
Get first four tests to pass:
=============== destroying old regression database... =================
=============== creating new regression database... =================
=============== running regression queries... =================
create_function_1 .. ok
create_type .. ok
create_table .. ok
create_function_2 .. ok
Marc G. Fournier [Sat, 26 Apr 1997 05:45:48 +0000 (05:45 +0000)]
Clean out/up some files that are causing me great headaches since I didn't
do this completely last time and Thomas is creating patches on files that
aren't supposed to exist :(
Marc G. Fournier [Fri, 25 Apr 1997 18:40:50 +0000 (18:40 +0000)]
More timezone patches by Thomas:
Here are patches which should help fix timezone problems in the
datetime and abstime code. Also, I repatched varlena.c to add in
some comments and a little error checking on top of Vadim's earlier
repairs. There are slight mods to the circle data type to have the
distance operator between circles measure the distance between
closest points rather than between centers.
Marc G. Fournier [Thu, 24 Apr 1997 20:30:41 +0000 (20:30 +0000)]
From: "Pedro J. Lobo" <pjlobo@euitt.upm.es>
Subject: [PATCHES] Patches for compiling 6.1 on Digital Unix 3.2c
Attached to this message are the patches I needed to compile 6.1 cleanly
under Digital Unix 3.2c with DEC cc.
I hope these are the last ones. At least, the number of files needing a
patch has decreased noticeably since I sent my previous patches. Nice work
:-)
One of the patches is a bug fix, but I'm including it here anyway.
With these patches applied, the beast seems to work properly. However,
I've done only some preliminary tests. More on this later (but hopefully
before the April 30 deadline... :-)
Bug (yet unfixed but not fatal) found: Re-moving index clauses from the
nestloop's join clauses doesn't work in some cases:
* 1. fix_indxqual_references may change varattno-s in
* inner_indxqual;
* 2. clauses may be commuted
Marc G. Fournier [Wed, 23 Apr 1997 03:18:27 +0000 (03:18 +0000)]
To: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Re: [PATCHES] SET DateStyle patches
On Tue, 22 Apr 1997, Thomas Lockhart wrote:
> Some more patches! These (try to) finish implementing SET variable TO value
> for "DateStyle" (changed the name from simply "date" to be more descriptive).
> This is based on code from Martin and Bruce (?), which was easy to modify.
> The syntax is
>
> SET DateStyle TO 'iso'
> SET DateStyle TO 'postgres'
> SET DateStyle TO 'sql'
> SET DateStyle TO 'european'
> SET DateStyle TO 'noneuropean'
> SET DateStyle TO 'us' (same as "noneuropean")
> SET DateStyle TO 'default' (current same as "postgres,us")
>
> ("european" is just compared for the first 4 characters, and "noneuropean"
> is compared for the first 7 to allow less typing).
>
> Multiple arguments are allowed, so SET datestyle TO 'sql,euro' is valid.
>
> My mods also try to implement "SHOW variable" and "RESET variable", but
> that part just core dumps at the moment. I would guess that my errors
> are obvious to someone who knows what they are doing with the parser stuff,
> so if someone (Bruce and/or Martin??) could have it do the right thing
> we will have a more complete set of what we need.
>
> Also, I would like to have a floating point precision global variable to
> implement "SET precision TO 10" and perhaps "SET precision TO 10,2" for
> float8 and float4, but I don't know how to do that for integer types rather
> than strings. If someone is fixing the SHOW and RESET code, perhaps they can
> add some hooks for me to do the floats while they are at it.
>
> I've left some remnants of variable structures in the source code which
> I did not use in the interests of getting something working for v6.1.
> We'll have time to clean things up for the next release...
Marc G. Fournier [Tue, 22 Apr 1997 17:55:20 +0000 (17:55 +0000)]
From: System Administrator <igor@sba.miami.edu>
Subject: [PORTS] Configure for DEC-Alpha
Configure script properly detects alpha-dec-osf4.0 machine, but
sets a default GENERIC template for it. I modified tempplate/.similar to
add alpha-dec-osf4.0=alpha. Then configure properly set the template to
alpha.
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.