Commit Graph

413 Commits

Author SHA1 Message Date
Bruce Momjian edb58721b8 Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary. 1997-08-12 20:16:25 +00:00
Bruce Momjian 42c0cd33a2 I think I finally got psort working for all cases. 1997-08-06 07:02:49 +00:00
Bruce Momjian cc24b846dd psort cleanups. 1997-08-06 05:38:46 +00:00
Bruce Momjian f5f366e188 Allow internal sorts to be stored in memory rather than in files. 1997-08-06 03:42:21 +00:00
Bruce Momjian 6ed1715b1f Cleanup for NAMEDATALEN use. 1997-08-03 02:38:47 +00:00
Marc G. Fournier 5089f6ce87 Check for and use <netdb.h> for postmaster.c, instead of checking if
MAXHOSTNAMELEN is defined.  For some reason, my 2.5.1 Solaris box at
work fails on that check...
1997-07-30 14:03:33 +00:00
Bruce Momjian bcc883fed3 Remove HAVE_USAGE because it is no longer used. 1997-07-30 00:09:42 +00:00
Thomas G. Lockhart 3c2d74d2af Add new operators and functions for geometric types.
Add text concatenation operator and function.
Add text trim function for SQL92 support.
1997-07-29 16:17:52 +00:00
Thomas G. Lockhart e89d139dbe Add new routines.
Change definition for isreltime().
Change some names of #define constants to avoid conflicts with the yacc parser.
1997-07-29 16:16:14 +00:00
Bruce Momjian 8d25436d70 mkLinux patches from Tatsuo Ishii. 1997-07-29 14:09:11 +00:00
Bruce Momjian 8338f90d4e Add SCO files. 1997-07-28 01:34:24 +00:00
Bruce Momjian d5e21e0924 HPUX 10 patches from Vladimir Turin 1997-07-27 18:52:43 +00:00
Bruce Momjian 3ac9d2fff3 Various compile errors concerning overflow due to shifts, unsigned, and bad prototypes, from Solaris, from Diab Jerius 1997-07-24 20:19:10 +00:00
Bruce Momjian 31fba1d974 Mips sysv4 support. 1997-07-14 16:52:13 +00:00
Thomas G. Lockhart e66f5c05eb Remove endian information which is now in port-specific header files.
Note that this version is probably identical to two versions ago.
1997-07-11 14:09:00 +00:00
Thomas G. Lockhart c6df30edb9 Modify port-specific definitions to support missing endian information.
Add extra include file for aix to find endian information.
1997-07-11 14:03:01 +00:00
Thomas G. Lockhart bf3bcb6a6d Include definitions for endian info if not in system includes. 1997-07-01 00:31:10 +00:00
Thomas G. Lockhart 495fdfba98 Rearrange DTK_x constants.
Define constants to allow day of week decoding.
Add new datetime and timespan routines.
1997-07-01 00:25:30 +00:00
Thomas G. Lockhart 45409f0cdd Remove code not previously enabled with USE_NEW_DATE and USE_NEW_TIME
#defines.
1997-06-23 15:03:45 +00:00
Thomas G. Lockhart 742425447d Drop internal routines for formatting time output. Use default formatter.
Add timezone info to abstime2tm().
1997-06-23 14:58:51 +00:00
Thomas G. Lockhart 9af564ada6 Add parser category for "DST" Daylight Savings Time qualifier on time zones. 1997-06-20 17:15:00 +00:00
Marc G. Fournier 442306fe36 From: "Brian E. Gallew" <geek+@cmu.edu>
Define USE_POSIX_TIME for dgux port
1997-06-06 01:39:24 +00:00
Marc G. Fournier 15da18508f From: Phil Nelson <phil@cs.wwu.edu>
Subject: [PATCHES] Added support for NetBSD/pc532.
1997-06-06 01:37:23 +00:00
Vadim B. Mikheev 39c73eff63 Definition for RelationForgetRelation(). 1997-06-04 09:01:49 +00:00
Thomas G. Lockhart 4bd4a55b98 Add upgradepath(), isoldpath(), upgradepoly() and revertpoly() to allow
upgrading from existing pre-v6.1 path and polygon geometric data types.
1997-06-03 14:11:28 +00:00
Thomas G. Lockhart 3887d41b13 Put parens around macro arguments for safety per D'Arcy's suggestion. 1997-06-03 14:07:24 +00:00
Vadim B. Mikheev 9c0d64c21c #define GEQO_RELS 6 (not 7) 1997-06-03 03:15:50 +00:00
Vadim B. Mikheev 465047d604 #define GEQO_RELS 7
moved from geqo.h to internal.h.
1997-06-02 11:19:33 +00:00
Marc G. Fournier 187e0f2405 From: Phil Nelson <phil@cs.wwu.edu>
Subject: [PATCHES] Support for NetBSD/sparc

The following is a patch to allow BSD44_derived to support NetBSD/sparc.
1997-06-01 15:51:10 +00:00
Marc G. Fournier b3db8ee0b2 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] aix.h needs POSIX...
1997-06-01 15:50:08 +00:00
Bruce Momjian 8bc7439ccf Enable GEQO for more than six tables, from Martin. 1997-06-01 02:56:00 +00:00
Bruce Momjian c3a960ad8a Fix for SELECT * INTO TABLE for char(), varchar() fields. 1997-05-31 16:52:19 +00:00
Vadim B. Mikheev 5cf55737a4 Added: new BTP_CHAIN flag (if hikey == firstkey then it's not
last page in chain of duplicates).
1997-05-30 18:40:02 +00:00
Thomas G. Lockhart 07f0647808 Ensure double alignment for time and arrays of circles. 1997-05-26 16:55:23 +00:00
Thomas G. Lockhart 0828204538 Enable new date and time definitions to allow Solaris and Irix -O2 compilation.
Move date and time field type labels to less than 32 to allow use as masks.
1997-05-23 05:10:03 +00:00
Vadim B. Mikheev 12d9a12eda gist.h:
/*
** You can have as many strategies as you please in GiSTs, as
** long as your consistent method can handle them
*/
#define GISTNStrategies                 100
                                        ^^^
- too big number:

strat.h->StrategyEvaluationData->StrategyExpression  expression[12]
                                                                ^^
 - so 12 is real max # of strategies, or StrategyEvaluationIsValid
crashes backend (called if CASSER defined).
1997-05-22 16:09:57 +00:00
Marc G. Fournier 5e7c0a0b9a From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] DROP AGGREGATE patch/fix.


Here's a patch that fixes the DROP AGGREGATE command to delete
the desired aggregate for a specific type.
1997-05-22 00:17:24 +00:00
Vadim B. Mikheev b0dfe8e38e Define FREE(x) as pfree. 1997-05-20 11:37:33 +00:00
Edmund Mergl 33a629cfef added const declaration in form() E.Mergl 1997-05-17 16:25:57 +00:00
Thomas G. Lockhart 9fd868d16a Rename new float and int conversion routines to avoid conflicts with
system calls on AIX (and probably other machines too).
1997-05-14 04:35:10 +00:00
Marc G. Fournier 45165538c5 From: "Brian E. Gallew" <geek+@cmu.edu>
Subject: [PORTS] minor fix for DGUX port

src/include/port/dgux.h needs the following three lines appended:

#ifndef         BYTE_ORDER
#define         BYTE_ORDER      BIG_ENDIAN
#endif


I believe this to be correct for DG/UX on M88k processors.  I don't have one of
the new Intel-based boxes to check on.
1997-05-13 22:13:33 +00:00
Thomas G. Lockhart 57f55032ff Add type conversion functions between floats and integers.
Include some additional path functions which were coded but omitted here.
Add translation and rotation/scaling operators for some geometric types.
Fix bugs in some geometry comparison operator declarations.
1997-05-11 15:19:33 +00:00
Thomas G. Lockhart 407cd4ee24 Add a few type conversion functions.
Pass an additional argument for date/time formatting to better handle timezones.
1997-05-11 15:13:49 +00:00
Marc G. Fournier 9f2d714620 From: "Paul M. Aoki" <aoki@CS.Berkeley.EDU>
Subject: [PATCHES] port patch: ultrix4

ultrix4 doesn't compile without this.  this also fixes a problem
with dynamic loading (ultrix relocatable objects must be loaded
with -G 0).
1997-05-07 03:12:46 +00:00
Thomas G. Lockhart 36d18351aa 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().
1997-05-06 07:24:42 +00:00
Thomas G. Lockhart 6e27af13eb Rename LOread() and LOwrite() to loread() and lowrite() to allow use by
case-insensitive SQL parser.
1997-05-06 07:20:53 +00:00
Thomas G. Lockhart 94123219bf 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.
1997-05-06 07:14:34 +00:00
Vadim B. Mikheev a1fbd470a9 Fix GroupBy: enable functions over aggregates and GroupBy-ed fields
in target list.
1997-04-29 04:32:50 +00:00
Thomas G. Lockhart 0a95a17da2 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.
1997-04-27 19:24:16 +00:00
Thomas G. Lockhart 1d1c9ff211 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
1997-04-27 19:22:45 +00:00
Thomas G. Lockhart d831e9ce19 Change mixed-case routines to lower-case if referenced in pg_proc.h 1997-04-27 19:21:06 +00:00
Marc G. Fournier c2ae467300 clean up the bin/*/Makefiles...up version.h to v6.1 instead of v6.0
Remove bin/Makefile.global since it wasn't actually *doing* anything
that Makefile.global hadn't already done
1997-04-26 05:07:12 +00:00
Marc G. Fournier 094ec2d3f3 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.
1997-04-25 18:40:50 +00:00
Marc G. Fournier 87fffc4342 Various bug fixes based on a bug report submitted by
Doug Neuhauser <doug@seismo.berkeley.edu> on April 15th
1997-04-24 20:02:02 +00:00
Vadim B. Mikheev 2bbc2e2c0d Added comments about FASTBUILD.
Added #define BTREE_VERSION_1.
1997-04-24 16:21:46 +00:00
Vadim B. Mikheev 0a08f2b22d #define _CPU_PAGE_WEIGHT_: 0.065 --> 0.033
#define _CPU_INDEX_PAGE_WEIGHT_: 0.033 --> 0.017
1997-04-24 15:38:34 +00:00
Marc G. Fournier 08a5901ba1 Various patches not commited, plus a linux/sparc patch from
Satoshi Ishikawa <power@sekine.densi.gifu-u.ac.jp>
1997-04-24 02:35:39 +00:00
Vadim B. Mikheev 3c461c8397 Analyze data only if specified and specified attrs only. 1997-04-23 06:28:48 +00:00
Vadim B. Mikheev bc67a4617d 1. VariableShowStmt and VariableResetStmt added.
2. VacuumStmt changed (for VACUUM ANALYZE...).
1997-04-23 05:58:06 +00:00
Vadim B. Mikheev 72fcb4ee91 There were too many comments. 1997-04-23 05:52:32 +00:00
Marc G. Fournier 4b5319129c 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...
1997-04-23 03:18:27 +00:00
Marc G. Fournier 5514c1fa23 Add fcvt() as a check to configure so that we can get rid of the BSD44_derived
type check in numutils.c:ftoa()

Pointed out by: "Martin J. Laubach" <mjl@emsi.priv.at>
1997-04-22 17:47:42 +00:00
Marc G. Fournier 9e2a87b62d 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.
1997-04-22 17:35:09 +00:00
Vadim B. Mikheev d94c7fc4c5 1. Declaration
static const char *num_word(Cash value);
moved to cash.c.
2. 'extern ' added to funcs prototypes.
1997-04-18 02:59:26 +00:00
Marc G. Fournier a1f229b19e From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch: set date to euro/us postgres/iso/sql

  Here a patch that implements a SET date for use by the datetime
stuff. The syntax is

        SET date TO 'val[,val,...]'

  where val is us (us dates), euro (european dates), postgres,
iso or sql.

  Thomas is working on the integration in his datetime module.
I just needed to get the patch out before it went stale :)
1997-04-17 13:50:57 +00:00
Vadim B. Mikheev afd9295786 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.
1997-04-16 01:21:59 +00:00
Marc G. Fournier cacaaed62b A couple of cleanups from Scott Harrison <Scott_Harrison@next.com> 1997-04-15 19:08:13 +00:00
Marc G. Fournier f9d2ec0eba Have CASSERT enabled/disabled via configure, and passed through config.h
instead of as a -D
1997-04-15 18:35:50 +00:00
Marc G. Fournier 6fd4e2b414 Various minor HP related patches from:
Morten Kjeldgaard <mok@monster.kemi.aau.dk>
1997-04-15 17:55:37 +00:00
Marc G. Fournier 88d740462f 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.

Modules affected are:
builtins.h.patch
cash.c.patch
cash.h.patch
main.c.patch
pg_aggregate.h.patch
pg_operator.h.patch
pg_proc.h.patch
pg_type.h.patch

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.
1997-04-15 17:41:44 +00:00
Marc G. Fournier 7113e880b8 More more of the include files under the include directory 1997-04-12 10:21:55 +00:00
Marc G. Fournier 1e9b80a2fd modifications to pg_dump towards supporting dumping of ACLs (doesn't work yet!)
modification to c.h so that bool isn't typedef'd under __cplusplus
1997-04-12 09:24:23 +00:00
Marc G. Fournier 4999f002e6 Add in D'Arcy's cash code
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...
1997-04-09 08:36:21 +00:00
Vadim B. Mikheev 75e2370cc8 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
*/).
1997-04-09 02:24:19 +00:00
Vadim B. Mikheev bd511f268a Put resdom into GroupClause (GROUP BY func_results) 1997-04-05 06:19:22 +00:00
Marc G. Fournier 0213a81dca More modifications to make building more interactive:
Allow installer to change DEF_PGPORT
	Allow installer to disable HBA
1997-04-03 22:16:34 +00:00
Marc G. Fournier a03dc60508 Remove code associated with !ACLGROUP_PATCH, and appropriate #ifdef's 1997-04-03 21:31:57 +00:00
Marc G. Fournier e3649e9e52 Various improvements to reduce questions :)
Remove USE_LOCALE from Makefile.global.in
Add USE_LOCALE to build/configure/config.h

Add check for BUILDRUN in configure to make sure that build is run before
configure
1997-04-03 21:26:36 +00:00
Marc G. Fournier 9d5c0af586 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Aggregate function patches

Here are the aggregate function patches I originally sent in last December.
They fix sum() and avg() behavior for ints and floats when NULL values are
involved.

I was waiting to resubmit these until I had a chance to write a v6.0->v6.1
database upgrade script to ensure that existing v6.0 databases which have
not been reloaded for v6.1 do no break with the new aggregate behavior.
These scripts are included below. It's OK with me if someone wants to do
something different with the upgrade strategy, but something like this
was discussed a few weeks ago.

Also, there were a couple of small items which cropped up in doing a clean
install of 970403 (actually 970402 + 970403 changes since the full 970403
tar file appears to be damaged or at least suspect). They are the first
two patches below and can be omitted if desired (although I think they
aren't dangerous :).
1997-04-03 19:56:47 +00:00
Marc G. Fournier 2ab34dfe1a From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] More date time functions

Here are some additional patches mostly related to the date and time
data types. It includes some type conversion routines to move between
the different date types and some other date manipulation routines such
as date_part(units,datetime).

I noticed Edmund Mergl et al's neat trick for getting function overloading
for builtin functions, so started to use that for the date and time stuff.
Later, if someone figures out how to get function overloading directly
for internal C code, then we can move to that technique.

These patches include documentation updates (don't faint!) for the built-in
man page. Doesn't yet include mention of timestamp, since I don't know
much about it and since it may change a bit to become a _real_ ANSI timestamp
which would include parser support for the declaration syntax (what do you
think, Dan?).

The patches were developed on the 970330 release, but have been rebuilt
off of the 970402 release. The first patch below is to get libpq to compile,
on my Linux box, but is not related to the rest of the patches and you can
choose not to apply that one at this time. Thanks in advance, scrappy!
1997-04-02 18:36:24 +00:00
Marc G. Fournier a51df14a69 From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch: SET var TO 'val'

  Here is a patch that adds a "SET variable TO 'somevalue'" capability
to the parser, and then calls the SetPGVariable() function (which does
just issue a elog(NOTICE) to see whether it works).

  That's the framework for adding timezone/date format/language/...
stuff.
1997-04-02 18:24:52 +00:00
Vadim B. Mikheev 6ec8d375f5 New node T_CreateSeqStmt. 1997-04-02 03:34:46 +00:00
Vadim B. Mikheev 46d11f314f New relkind ('S') for sequence relations.
New funcs (nextval & currval) in pg_proc.h
1997-04-02 03:29:37 +00:00
Vadim B. Mikheev 4d8e84155e Prototypes for sequence.c 1997-04-02 03:23:38 +00:00
Marc G. Fournier 28454c216b From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Re: [HACKERS] abstime "now" broken

Yes, I broke 'now' :( with an attempt at a bug fix involving
servers running in the UTC/GMT timezone. These patches fix
the problem, and have been tested in GMT (+00 hours),
PST (-08), and NZT (+12) timezones which exercized the code for
various cases including across day boundaries.  btw, this code
fixes the same type of problem for 'today', 'yesterday', 'tomorrow',
for DATETIME, ABSTIME, DATE and TIME types.

The bugfix itself is quite small, but I have accumulated other
changes in the datetime data type and include them here also.
One set of changes involves printing ISO-formatted dates and
is in response to the helpful information from Kurt Lidl regarding
ANSI SQL dates. I'll send another e-mail sometime soon discussing
more issues he has raised...
1997-03-28 07:13:21 +00:00
Marc G. Fournier 159f8c63ad From: Dan McGuirk <mcguirk@indirect.com>
Reply-To: hackers@hub.org, Dan McGuirk <mcguirk@indirect.com>
To: hackers@hub.org
Subject: [HACKERS] tmin writeback optimization

I was doing some profiling of the backend, and noticed that during a certain
benchmark I was running somewhere between 30% and 75% of the backend's CPU
time was being spent in calls to TransactionIdDidCommit() from
HeapTupleSatisfiesNow() or HeapTupleSatisfiesItself() to determine that
changed rows' transactions had in fact been committed even though the rows'
tmin values had not yet been set.

When a query looks at a given row, it needs to figure out whether the
transaction that changed the row has been committed and hence it should pay
attention to the row, or whether on the other hand the transaction is still
in progress or has been aborted and hence the row should be ignored.  If
a tmin value is set, it is known definitively that the row's transaction
has been committed.  However, if tmin is not set, the transaction
referred to in xmin must be looked up in pg_log, and this is what the
backend was spending a lot of time doing during my benchmark.

So, implementing a method suggested by Vadim, I created the following
patch that, the first time a query finds a committed row whose tmin value
is not set, sets it, and marks the buffer where the row is stored as
dirty.  (It works for tmax, too.)  This doesn't result in the boost in
real time performance I was hoping for, however it does decrease backend
CPU usage by up to two-thirds in certain situations, so it could be
rather beneficial in high-concurrency settings.
1997-03-28 07:06:53 +00:00
Marc G. Fournier dd07f76658 turn GEQO code on by default 1997-03-27 01:00:41 +00:00
Marc G. Fournier 64c82a5016 Add checs for float.h
Remove 'unused variable' from dt.c
1997-03-25 20:02:42 +00:00
Marc G. Fournier 0ccaaac169 another one missed 1997-03-25 09:44:33 +00:00
Marc G. Fournier 070381482f From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] backend/utils/adt/timestamp.c

Back to this timezone stuff.  The struct tm has a field (tm_gmtoff) which
is the offset from UTC (GMT is archaic BTW) in seconds.  Is this the
value you are looking for when you use timezone?  Note that this applies
to NetBSD but it does not appear to be in either ANSI C or POSIX.  This
looks like one of those things that is just going to have to be hand
coded for each platform.

Why not just store the values in UTC and use localtime instead of
gmtime when retrieving the value?

Also, you assume the time is returned as a 4 byte integer.  In fact,
there is not even any requirement that time be an integral value.  You
should use time_t here.

The input function seems unduly restrictive.  Somewhere in the sources
there is an input function that allows words for months.  Can't we do
the same here?

There is a standard function, difftime, for subtracting two times.  It
deals with cases where time_t is not integral.  There is, however, a
small performance hit since it returns a double and I don't believe
there is any system currently which uses anything but an integral for
time_t.  Still, this is technically the correct and portable thing to do.

The returns from the various comparisons should probably be a bool.
1997-03-25 09:25:33 +00:00
Marc G. Fournier ea2fa32eff Rather than make this a Linux test, we should just test for the existence
of endian.h.  I figure that if it exists it's pretty sure that it has
the byte order information and we may catch some other ports without
any further testing.

From: "D'Arcy J.M. Cain" <darcy@druid.net>
1997-03-25 08:25:47 +00:00
Marc G. Fournier dfe0475362 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] More patches for date/time

I have accumulated several patches to add functionality to the datetime
and timespan data types as well as to fix reported porting bugs on non-BSD
machines. These patches are:

dt.c.patch              - add datetime_part(), fix bugs
dt.h.patch              - add quarter and timezone support, add prototypes
globals.c.patch         - add time and timezone variables
miscadmin.h.patch       - add time and timezone variables
nabstime.c.patch        - add datetime conversion routine
nabstime.h.patch        - add prototypes
pg_operator.h.patch     - add datetime operators, clean up formatting
pg_proc.h.patch         - add datetime functions, reassign conflicting date OIDs
pg_type.h.patch         - add datetime and timespan data types

The dt.c and pg_proc.h patches are fairly large; the latter mostly because I tried
to get some columns for existing entries to line up.
1997-03-25 08:11:24 +00:00
Vadim B. Mikheev 427a87911d New func _bt_checkkeys() added to let caller know number of keys
for which checking was TRUE.
1997-03-24 08:04:51 +00:00
Vadim B. Mikheev 5d4e3a7511 Added #define NullValueRegProcedure and #define NonNullValueRegProcedure -
is in use by btree now.
1997-03-24 07:32:38 +00:00
Marc G. Fournier bf872f0aff From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] libpq/pqcomm stuff and Solaris byte order

I decided to go ahead with the required changes since no one else seems
to.  I don't guarantee that it is perfect but with these changes the
package actually compiles.  While I was at it I added to the Sparc
Solaris header to define the byte order.  Note that NetBSD sets this
in the system headers so it wasn't required there.

In particular, someone may want to check whether I removed the correct
84 lines from backend/libpq/pqcomprim.c.
1997-03-20 18:23:33 +00:00
Marc G. Fournier 7d5770eaf2 Check for and set HAVE_CRYPT_H if <crypt.h> exists
include crypt.h in password.c if crypt.h does exist
1997-03-20 18:04:32 +00:00
Vadim B. Mikheev 8157c833aa Fix index_create for multi-column indices 1997-03-19 07:36:35 +00:00
Marc G. Fournier 6ffd26d8eb Add a check for strerr, and add in D'Arcy's strerror() code in case not
found
1997-03-19 02:37:42 +00:00
Marc G. Fournier 812a6c2b54 - Move most of the I/O in both libpq and the backend to a set
of common routines in pqcomprim.c (pq communication primitives).
    Not all adapted to it yet, but it's a start.

  - Rewritten some of those routines, to write/read bigger chunks of
    data, precomputing stuff in buffers instead of sending out byte
    by byte.

  - As a consequence, I need to know the endianness of the machine.
    Currently I rely on getting it from machine/endian.h, but this
    may not be available everywhere? (Who the hell thought it was
    a good idea to pass integers to the backend the other way around
    than the normal network byte order? *argl*)

  - Libpq looks in the environment for magic variables, and upon
    establishing a connection to the backend, sends it queries
    of the form "SET var_name TO 'var_value'". This needs a change
    in the backend parser (Mr. Parser, are you there? :)

  - Currently it looks for two Env-Vars, namely PG_DATEFORMAT
    and PG_FLOATFORMAT. What else makes sense? PG_TIMEFORMAT?
    PG_TIMEZONE?

From: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-03-18 20:15:39 +00:00
Marc G. Fournier d146305065 Patches for Vadim's multikey indexing... 1997-03-18 18:41:37 +00:00