]> granicus.if.org Git - postgresql/log
postgresql
27 years agoAdd in D'Arcy's cash code
Marc G. Fournier [Wed, 9 Apr 1997 08:36:21 +0000 (08:36 +0000)]
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...

27 years agoFrom: "Martin S. Utesch" <utesch@aut.tu-freiberg.de>
Marc G. Fournier [Wed, 9 Apr 1997 08:31:29 +0000 (08:31 +0000)]
From: "Martin S. Utesch" <utesch@aut.tu-freiberg.de>
Subject: Re: [HACKERS] GEQO and views (rules)

Oke, this was caused by a classic bug :-/
I thougth, root->base_relation_list_ could be
represented as relid string 1-2-3-4- etc.

Instead, in case of views, the count of relids doesn't start with "1" but
maybe 4-5-6- etc . :-(

GEQO patch follows ... views are now all right.

27 years agoGNUmakefile.in - remove backend/utils/Gen_fmgrtab.sh on distclean
Marc G. Fournier [Wed, 9 Apr 1997 08:29:35 +0000 (08:29 +0000)]
GNUmakefile.in - remove backend/utils/Gen_fmgrtab.sh on distclean
varlena.c - part of Thomas' most recent patch

27 years agoNow we have #define _CPU_INDEX_PAGE_WEIGHT_ 0.033 (/* CPU-index-to-page cost
Vadim B. Mikheev [Wed, 9 Apr 1997 02:24:19 +0000 (02:24 +0000)]
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
*/).

27 years agogetattnvals(): if attnvals in pg_attribute is 0 then use
Vadim B. Mikheev [Wed, 9 Apr 1997 02:20:32 +0000 (02:20 +0000)]
getattnvals(): if attnvals in pg_attribute is 0 then use
ATTNVALS_SCALE/reltuples (instead of reltuples).

27 years ago1. Enable to have different _CPU_PAGE_WEIGHT_ for heap and index.
Vadim B. Mikheev [Wed, 9 Apr 1997 02:13:41 +0000 (02:13 +0000)]
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.

27 years agoFix (hack) IndexSelectivity():
Vadim B. Mikheev [Wed, 9 Apr 1997 01:52:04 +0000 (01:52 +0000)]
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 ?

27 years agoSlight mods to explain (or try to) the new regression tests
Marc G. Fournier [Tue, 8 Apr 1997 19:34:58 +0000 (19:34 +0000)]
Slight mods to explain (or try to) the new regression tests

27 years agoFix btabstimecmp ().
Vadim B. Mikheev [Mon, 7 Apr 1997 06:45:41 +0000 (06:45 +0000)]
Fix btabstimecmp ().

27 years agoGet rid of queries.source...its all in the sql directory.
Marc G. Fournier [Sun, 6 Apr 1997 08:53:34 +0000 (08:53 +0000)]
Get rid of queries.source...its all in the sql directory.

regress.sh modified to get rid of queries.sql tests, as they are
performed vis sql/*.sql

27 years agoMore splits and cleanups...
Marc G. Fournier [Sun, 6 Apr 1997 08:29:57 +0000 (08:29 +0000)]
More splits and cleanups...

Its starting to actually take shape and look as expected...

27 years agoMore splits and cleanups...
Marc G. Fournier [Sun, 6 Apr 1997 06:07:13 +0000 (06:07 +0000)]
More splits and cleanups...

27 years agoAdd in support so that build will at least guess which template file
Marc G. Fournier [Sun, 6 Apr 1997 04:43:28 +0000 (04:43 +0000)]
Add in support so that build will at least guess which template file
should be used :)

27 years agoremove create.{source,sql} as they are now down in the 'sql' directory
Marc G. Fournier [Sat, 5 Apr 1997 21:33:26 +0000 (21:33 +0000)]
remove create.{source,sql} as they are now down in the 'sql' directory
partially split

27 years agoChange Postgres95 to PostgreSQL
Marc G. Fournier [Sat, 5 Apr 1997 21:28:46 +0000 (21:28 +0000)]
Change Postgres95 to PostgreSQL

The whole file needs updating, but will work on that after finishing
with the splits

27 years agoMore splits of the regression tests in order to make them more
Marc G. Fournier [Sat, 5 Apr 1997 21:26:00 +0000 (21:26 +0000)]
More splits of the regression tests in order to make them more
user-friendly (and more useful)

27 years agoPurge out tests/expected that are now in sql/expected subdirectories from
Marc G. Fournier [Sat, 5 Apr 1997 11:58:40 +0000 (11:58 +0000)]
Purge out tests/expected that are now in sql/expected subdirectories from
'master' file

Commit mods to regress.sh so that split out tests are run...look forward
to finding out how to do a proper redirect to continue visual cleanup :)

27 years agoAgain, add more tests
Marc G. Fournier [Sat, 5 Apr 1997 11:26:55 +0000 (11:26 +0000)]
Again, add more tests

27 years agoAdd more expected.out results
Marc G. Fournier [Sat, 5 Apr 1997 11:24:54 +0000 (11:24 +0000)]
Add more expected.out results

27 years agoThere are the broken out 'sql' queries from queries.source
Marc G. Fournier [Sat, 5 Apr 1997 11:08:30 +0000 (11:08 +0000)]
There are the broken out 'sql' queries from queries.source

tests allows us to have a 'for...done' loop inside of regress.sh for
both doing the tests, and determining fail/ok results

27 years agoThese are the broken down 'expected.output' files created so far
Marc G. Fournier [Sat, 5 Apr 1997 11:06:04 +0000 (11:06 +0000)]
These are the broken down 'expected.output' files created so far

27 years agoPrint 'Group' as name of Group plan.
Vadim B. Mikheev [Sat, 5 Apr 1997 06:42:32 +0000 (06:42 +0000)]
Print 'Group' as name of Group plan.

27 years agoChanges for GROUP BY func_results:
Vadim B. Mikheev [Sat, 5 Apr 1997 06:39:58 +0000 (06:39 +0000)]
Changes for GROUP BY func_results:
AddGroupAttrToTlist() is not called from anywhere now.

27 years agoChanges for GROUP BY func_results.
Vadim B. Mikheev [Sat, 5 Apr 1997 06:37:37 +0000 (06:37 +0000)]
Changes for GROUP BY func_results.

27 years agoNow we can GROUP BY func_results.
Vadim B. Mikheev [Sat, 5 Apr 1997 06:29:03 +0000 (06:29 +0000)]
Now we can GROUP BY func_results.

27 years agoFix for 'SET var_name TO var_value': var_name already defined.
Vadim B. Mikheev [Sat, 5 Apr 1997 06:25:59 +0000 (06:25 +0000)]
Fix for 'SET var_name TO var_value': var_name already defined.

27 years agoPut resdom into GroupClause (GROUP BY func_results)
Vadim B. Mikheev [Sat, 5 Apr 1997 06:19:22 +0000 (06:19 +0000)]
Put resdom into GroupClause (GROUP BY func_results)

27 years agoCheck for attributeList is NULL in ConstructTupleDescriptor ().
Vadim B. Mikheev [Sat, 5 Apr 1997 03:36:21 +0000 (03:36 +0000)]
Check for attributeList is NULL in ConstructTupleDescriptor ().

Submitted by Raymond Toy.

27 years agoFrom: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Marc G. Fournier [Sat, 5 Apr 1997 02:51:41 +0000 (02:51 +0000)]
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.

27 years agoMove YACC and YFLAGS into the template files
Marc G. Fournier [Fri, 4 Apr 1997 11:23:15 +0000 (11:23 +0000)]
Move YACC and YFLAGS into the template files

Clean up the .sample files...comment out all sample entries except for
the localhost one

27 years agoThis commit represents a clean compile with the new templates under
Marc G. Fournier [Fri, 4 Apr 1997 10:43:16 +0000 (10:43 +0000)]
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

27 years agoGot AROPT setting backwards...correct it
Marc G. Fournier [Fri, 4 Apr 1997 09:02:34 +0000 (09:02 +0000)]
Got AROPT setting backwards...correct it

27 years agoAdd distclean to target listing
Marc G. Fournier [Fri, 4 Apr 1997 09:01:19 +0000 (09:01 +0000)]
Add distclean to target listing

27 years agoAgain, needs float.h
Marc G. Fournier [Fri, 4 Apr 1997 08:55:29 +0000 (08:55 +0000)]
Again, needs float.h

27 years agoneeds float.h for DBL_MIN under FreeBSD
Marc G. Fournier [Fri, 4 Apr 1997 08:53:08 +0000 (08:53 +0000)]
needs float.h for DBL_MIN under FreeBSD

27 years agoRemove some files that were inadvertantly created
Marc G. Fournier [Fri, 4 Apr 1997 08:16:37 +0000 (08:16 +0000)]
Remove some files that were inadvertantly created
Clean up format of linux-elf

27 years agoOne helluva mess.
Marc G. Fournier [Fri, 4 Apr 1997 07:59:48 +0000 (07:59 +0000)]
One helluva mess.

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...

27 years agoInstall os.h when we install the other headers...
Marc G. Fournier [Fri, 4 Apr 1997 02:53:14 +0000 (02:53 +0000)]
Install os.h when we install the other headers...

Pointed out by: System Administrator <sysadmin@sba.miami.edu>

27 years agoMore modifications to make building more interactive:
Marc G. Fournier [Thu, 3 Apr 1997 22:16:34 +0000 (22:16 +0000)]
More modifications to make building more interactive:

Allow installer to change DEF_PGPORT
Allow installer to disable HBA

27 years agoRemove code associated with !ACLGROUP_PATCH, and appropriate #ifdef's
Marc G. Fournier [Thu, 3 Apr 1997 21:31:57 +0000 (21:31 +0000)]
Remove code associated with !ACLGROUP_PATCH, and appropriate #ifdef's

27 years agoVarious improvements to reduce questions :)
Marc G. Fournier [Thu, 3 Apr 1997 21:26:36 +0000 (21:26 +0000)]
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

27 years agoFrom: "D'Arcy J.M. Cain" <darcy@druid.net>
Marc G. Fournier [Thu, 3 Apr 1997 19:58:11 +0000 (19:58 +0000)]
From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] timestamp.c changes

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?

27 years agoFrom: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Marc G. Fournier [Thu, 3 Apr 1997 19:56:47 +0000 (19:56 +0000)]
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 :).

27 years agoremoved as already installed as part of system headers on NetBSD/FreeBSD
Marc G. Fournier [Wed, 2 Apr 1997 18:49:24 +0000 (18:49 +0000)]
removed as already installed as part of system headers on NetBSD/FreeBSD

27 years agoFrom: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Marc G. Fournier [Wed, 2 Apr 1997 18:36:24 +0000 (18:36 +0000)]
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!

27 years agoFrom: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Marc G. Fournier [Wed, 2 Apr 1997 18:26:25 +0000 (18:26 +0000)]
From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] libpq variable set patch

  Just a small change, so the automatic variable setting on
connection startup actually works...

27 years agoFrom: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Marc G. Fournier [Wed, 2 Apr 1997 18:24:52 +0000 (18:24 +0000)]
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.

27 years agoFrom: Anton de Wet <adw@obsidian.co.za>
Marc G. Fournier [Wed, 2 Apr 1997 18:16:49 +0000 (18:16 +0000)]
From: Anton de Wet <adw@obsidian.co.za>
Subject: [HACKERS] Small patch to pgtclCmds.c

Hi I have made the following small change to the extensions I made to
pgtclCmds.c quite a while ago.

At the moment there is a -assignbyidx option to pg_result assigning the
returned tuples to an array by using the 1st field of the select statement
as the key to the array.
eg "select name,age from vitalstatistics" will result in an array with

myarray(peter) = 32
myarray(paul)  = 45

Often I need to have a pseudo-multi dimentional
array eg. "select name,age from vitalstatistics where occupation='plummer'

I would like to be able to generate an array
newarray(peter,overpaid) = 32

So to add a arbitrary string to the key value I have extended

  pg_result $res -assignbyidx $arrayname

to have an optional argument

  pg_result $res -assignbyidx $arrayname $appendstr

So that that string is appended to the key value.

27 years agoFrom: Oleg Bartunov <oleg@sai.msu.su>
Marc G. Fournier [Wed, 2 Apr 1997 18:13:47 +0000 (18:13 +0000)]
From: Oleg Bartunov <oleg@sai.msu.su>
Subject: [HACKERS] locale patches !

Hi there,

here are little patches to get Postgres 6.1 works with locale stuff.
This is a patch against 970402.tar.gz, there are no problem to apply them
by hand to 6.0 release. Collate stuff tested about 1-2 months in real
working database but I'm sure there must be no problem. US hackers
could vote against locale implementation ( locale for sure will affect to
speed of postgres ), so I introduce variable USE_LOCALE which
controls locale stuff. Non-US users now could use ~* operator
for searching and <order by> for strings with nation alphabet.
Please, don't forget, as I did first time, to set environment variable
LC_CTYPE and LC_COLLATE because backend get locale information from them.
I start postmaster from a little script, assuming that shell is Bash shell
it looks like:

#!/bin/sh

export LC_CTYPE=koi8-r
export LC_COLLATE=koi8-r
postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'

27 years agoNew keyword: SEQUENCE.
Vadim B. Mikheev [Wed, 2 Apr 1997 04:49:13 +0000 (04:49 +0000)]
New keyword: SEQUENCE.

27 years agoManuals for SEQUENCEs.
Vadim B. Mikheev [Wed, 2 Apr 1997 04:20:00 +0000 (04:20 +0000)]
Manuals for SEQUENCEs.

27 years ago\h create/drop sequence.
Vadim B. Mikheev [Wed, 2 Apr 1997 04:18:26 +0000 (04:18 +0000)]
\h create/drop sequence.

27 years agoDumping sequence relations as 'CREATE SEQUENCE ...'.
Vadim B. Mikheev [Wed, 2 Apr 1997 04:17:27 +0000 (04:17 +0000)]
Dumping sequence relations as 'CREATE SEQUENCE ...'.

27 years agoCall DefineSequence () for T_CreateSeqStmt node.
Vadim B. Mikheev [Wed, 2 Apr 1997 04:06:32 +0000 (04:06 +0000)]
Call DefineSequence () for T_CreateSeqStmt node.

27 years agoCan't INSERT/UPDATE/DELETE sequence relation.
Vadim B. Mikheev [Wed, 2 Apr 1997 04:04:11 +0000 (04:04 +0000)]
Can't INSERT/UPDATE/DELETE sequence relation.

27 years agoCREATE/DROP SEQUENCE ...
Vadim B. Mikheev [Wed, 2 Apr 1997 04:01:03 +0000 (04:01 +0000)]
CREATE/DROP SEQUENCE ...
Check nextval/currval permission in analyze.c.

27 years agoCan't COPY TO sequence relation.
Vadim B. Mikheev [Wed, 2 Apr 1997 03:57:06 +0000 (03:57 +0000)]
Can't COPY TO sequence relation.
Can't inherits from ...

27 years agoSequence numbers generators code.
Vadim B. Mikheev [Wed, 2 Apr 1997 03:51:23 +0000 (03:51 +0000)]
Sequence numbers generators code.

27 years agovc_getrels(p, VacRelP) returns NIL for special relations (indices,
Vadim B. Mikheev [Wed, 2 Apr 1997 03:48:01 +0000 (03:48 +0000)]
vc_getrels(p, VacRelP) returns NIL for special relations (indices,
sequences,...) and vc_delhilowstats(NULL->vrl_relid) ...

27 years agoHack for heap_creat to enable relkind to be 'S' for sequences.
Vadim B. Mikheev [Wed, 2 Apr 1997 03:41:16 +0000 (03:41 +0000)]
Hack for heap_creat to enable relkind to be 'S' for sequences.

27 years agoCloseSequences () at xact commit/abort.
Vadim B. Mikheev [Wed, 2 Apr 1997 03:38:02 +0000 (03:38 +0000)]
CloseSequences () at xact commit/abort.

27 years agoNew node T_CreateSeqStmt.
Vadim B. Mikheev [Wed, 2 Apr 1997 03:34:46 +0000 (03:34 +0000)]
New node T_CreateSeqStmt.

27 years agoNew relkind ('S') for sequence relations.
Vadim B. Mikheev [Wed, 2 Apr 1997 03:29:37 +0000 (03:29 +0000)]
New relkind ('S') for sequence relations.
New funcs (nextval & currval) in pg_proc.h

27 years agoPrototypes for sequence.c
Vadim B. Mikheev [Wed, 2 Apr 1997 03:23:38 +0000 (03:23 +0000)]
Prototypes for sequence.c

27 years agoUse $(CC), not gcc, to compile
Marc G. Fournier [Wed, 2 Apr 1997 00:34:23 +0000 (00:34 +0000)]
Use $(CC), not gcc, to compile

Pointed out by: igor@cs.cs.miami.edu

27 years agoMisc port related issues
Marc G. Fournier [Tue, 1 Apr 1997 09:27:11 +0000 (09:27 +0000)]
Misc port related issues

27 years agoSlight Linux related bug pointed out by Gabriel Akos <gabriel@rocker.sch.bme.hu>
Marc G. Fournier [Fri, 28 Mar 1997 09:43:53 +0000 (09:43 +0000)]
Slight Linux related bug pointed out by Gabriel Akos <gabriel@rocker.sch.bme.hu>

27 years agoFrom: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Marc G. Fournier [Fri, 28 Mar 1997 07:18:06 +0000 (07:18 +0000)]
From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Small date patches (resubmitted)

Here a some small patches for the date/time code. They set the default
output format for the datetime type to the traditional Postgres
style, and fix a date debugging declaration. I submitted these
a couple of days ago, but they might have gotten lost...

NOTE: the second patch to dt.c is what I believe D'Arcy submitted as well,
      that I claimed was taken out...sorry D'Arcy, my fault :(

27 years agoFrom: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Marc G. Fournier [Fri, 28 Mar 1997 07:13:21 +0000 (07:13 +0000)]
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...

27 years agoFrom: Dan McGuirk <mcguirk@indirect.com>
Marc G. Fournier [Fri, 28 Mar 1997 07:06:53 +0000 (07:06 +0000)]
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.

27 years agoFrom: "D'Arcy J.M. Cain" <darcy@druid.net>
Marc G. Fournier [Fri, 28 Mar 1997 06:55:58 +0000 (06:55 +0000)]
From: "D'Arcy J.M. Cain" <darcy@druid.net>

#ifdef is looking for the wrong value.

27 years agoFrom: "D'Arcy J.M. Cain" <darcy@druid.net>
Marc G. Fournier [Fri, 28 Mar 1997 06:54:51 +0000 (06:54 +0000)]
From: "D'Arcy J.M. Cain" <darcy@druid.net>

Some systems require limits.h to define DBL_MIN.

27 years agoOn some systems limits.h is needed to define DBL_MIN.
Marc G. Fournier [Fri, 28 Mar 1997 06:53:50 +0000 (06:53 +0000)]
On some systems limits.h is needed to define DBL_MIN.

From: "D'Arcy J.M. Cain" <darcy@druid.net>

27 years agoAdded call to heap_endscan in IndexIsUniqueNoCache - to release
Vadim B. Mikheev [Thu, 27 Mar 1997 04:13:44 +0000 (04:13 +0000)]
Added call to heap_endscan in IndexIsUniqueNoCache - to release
our READ lock on pg_index and let others to create indices too !

27 years agoturn GEQO code on by default
Marc G. Fournier [Thu, 27 Mar 1997 01:00:41 +0000 (01:00 +0000)]
turn GEQO code on by default

27 years agoRemove customize in favor of 'build'
Marc G. Fournier [Wed, 26 Mar 1997 07:10:03 +0000 (07:10 +0000)]
Remove customize in favor of 'build'

27 years agoAdd ability to change installation directory in build, prior to configure
Marc G. Fournier [Wed, 26 Mar 1997 06:54:01 +0000 (06:54 +0000)]
Add ability to change installation directory in build, prior to configure

27 years agoAdd string.h for strerror() prototype
Marc G. Fournier [Wed, 26 Mar 1997 03:27:04 +0000 (03:27 +0000)]
Add string.h for strerror() prototype

27 years agoinclude float.h *after* postgres.h :(
Marc G. Fournier [Wed, 26 Mar 1997 03:14:37 +0000 (03:14 +0000)]
include float.h *after* postgres.h :(

27 years agoDisallow to create multi-column indices using non-btree.
Vadim B. Mikheev [Wed, 26 Mar 1997 03:05:28 +0000 (03:05 +0000)]
Disallow to create multi-column indices using non-btree.

27 years agoneed float.h under FreeBSD for DBL_MIN
Marc G. Fournier [Wed, 26 Mar 1997 03:02:15 +0000 (03:02 +0000)]
need float.h under FreeBSD for DBL_MIN

27 years ago'\h create index' shows that multi-column indices are available now.
Vadim B. Mikheev [Wed, 26 Mar 1997 03:01:29 +0000 (03:01 +0000)]
'\h create index' shows that multi-column indices are available now.

27 years agoAdded syntax for multi-column indices.
Vadim B. Mikheev [Wed, 26 Mar 1997 02:52:49 +0000 (02:52 +0000)]
Added syntax for multi-column indices.

27 years agoSomeone forgot about 'case sizeof(int32)' for
Vadim B. Mikheev [Wed, 26 Mar 1997 02:24:38 +0000 (02:24 +0000)]
Someone forgot about 'case sizeof(int32)' for
tupleDesc->attrs[i]->attlen in fastgetiattr.

27 years agoAdd checs for float.h
Marc G. Fournier [Tue, 25 Mar 1997 20:02:42 +0000 (20:02 +0000)]
Add checs for float.h

Remove 'unused variable' from dt.c

27 years agoAdd float.h for DBL_{MIN,MAX} under FreeBSD
Marc G. Fournier [Tue, 25 Mar 1997 20:00:52 +0000 (20:00 +0000)]
Add float.h for DBL_{MIN,MAX} under FreeBSD

27 years agoanother one missed
Marc G. Fournier [Tue, 25 Mar 1997 09:44:33 +0000 (09:44 +0000)]
another one missed

27 years agoMIssed adding a file to the repository
Marc G. Fournier [Tue, 25 Mar 1997 09:44:00 +0000 (09:44 +0000)]
MIssed adding a file to the repository

27 years agoFrom: "D'Arcy J.M. Cain" <darcy@druid.net>
Marc G. Fournier [Tue, 25 Mar 1997 09:25:33 +0000 (09:25 +0000)]
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.

27 years agoVarious patches for shared libraries under i386-solaris by:
Marc G. Fournier [Tue, 25 Mar 1997 09:21:59 +0000 (09:21 +0000)]
Various patches for shared libraries under i386-solaris by:

Christoph Kaesling <ck@dog.pfalz.sub.de>

27 years agoHere's two more diffs...
Marc G. Fournier [Tue, 25 Mar 1997 09:08:06 +0000 (09:08 +0000)]
Here's two more diffs...

The first fixes a warning from gcc about the assignment within the condition.
The extra set of parens should not make a difference, but with -Werror, they
are necessary.

The second fixes an "ln -s" invocation that assumes the current directory is
implicitly the target if not specified.  Not true in all cases, and again, it
should not make a difference except to those implementation that it does.

From: "Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>

27 years agoRather than make this a Linux test, we should just test for the existence
Marc G. Fournier [Tue, 25 Mar 1997 08:25:47 +0000 (08:25 +0000)]
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>

27 years agoUse $(LD_ADD) from Makefile.global instead of $(LDADD), which doesn't exist...
Marc G. Fournier [Tue, 25 Mar 1997 08:14:25 +0000 (08:14 +0000)]
Use $(LD_ADD) from Makefile.global instead of $(LDADD), which doesn't exist...

Pointed out indirectly by D'Arcy

27 years agoFrom: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Marc G. Fournier [Tue, 25 Mar 1997 08:11:24 +0000 (08:11 +0000)]
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.

27 years agoMOre univel port patches/files from:
Marc G. Fournier [Tue, 25 Mar 1997 07:54:53 +0000 (07:54 +0000)]
MOre univel port patches/files from:

"Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>

27 years agoStart of a univel port by "Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>
Marc G. Fournier [Tue, 25 Mar 1997 07:16:36 +0000 (07:16 +0000)]
Start of a univel port by "Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>

27 years agoFree memory allocated by command in the BlankPortal' HeapMemory context
Vadim B. Mikheev [Tue, 25 Mar 1997 04:10:21 +0000 (04:10 +0000)]
Free memory allocated by command in the BlankPortal' HeapMemory context
(#ifdef-ed).

27 years ago - Renamed the variable names to something shorter, and I hope
Marc G. Fournier [Tue, 25 Mar 1997 02:37:21 +0000 (02:37 +0000)]
  - Renamed the variable names to something shorter, and I hope
    nicer. Also, I grabbed my copy of the Informix manual, and
    added a couple of variables that make sense (formats for
    money, time, a language setting, a timezone).

  - New functions SetPGVariable() and GetPGVariable() in tcop/*.
    These don't actually do anything for the moment, but should
    be enough to implement the SET var_name TO var_val in the
    parser?

    SetPGVariable() expects just two strings, the var_name and
    the var_value from above, and is expected to do the right thing.
    Returns TRUE if  everything okay.

From: "Martin J. Laubach" <mjl@wwx.vip.at>

27 years agoAdd in alpha port
Marc G. Fournier [Tue, 25 Mar 1997 02:29:08 +0000 (02:29 +0000)]
Add in alpha port

27 years agoI don't know whether this breaks what the previous person tried to
Marc G. Fournier [Tue, 25 Mar 1997 00:54:15 +0000 (00:54 +0000)]
I don't know whether this breaks what the previous person tried to
fix, but figure I"ll know soon enough, eh?

Patch submitted by Dan McGuirk