Commit Graph

272 Commits

Author SHA1 Message Date
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
Marc G. Fournier b5e16b1869 Resync the source tree, commit some things that were missing (pqcomprim.c) and
bring in Thomas's updates for the date/time code...
1997-03-18 16:36:50 +00:00
Marc G. Fournier 4b4ac7c159 oracle_compat.c fixed for function overloading...
By: From: Edmund Mergl <mergl@nadia.s.bawue.de>
1997-03-16 20:40:52 +00:00
Marc G. Fournier ea58f28ee8 om: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch for io routines

  I am currently trying to improve on the front-backend communication
routines; and noticed that lots of code are duplicated for libpq and
the backend. This is a first patch that tries to share code between
the two, more to follow.

        mjl
1997-03-16 18:51:29 +00:00
Marc G. Fournier bd2c53c2a9 Remove overloaded functions until we can figure out how to get them to work
properly...
1997-03-16 01:16:31 +00:00
Marc G. Fournier 078633e729 Re-oid the oracle_compat functions
Add new "overloaded" oracle_compat functions (see man oracle_compat)
1997-03-15 06:13:12 +00:00
Marc G. Fournier 9e4798ea0d A couple of development scripts by Dan to detect unused and duplicate
oids
1997-03-15 06:03:08 +00:00
Marc G. Fournier 791c075852 Date/Time updates from Thomas... 1997-03-14 23:34:16 +00:00
Marc G. Fournier 0889b17444 Missing bits from Dan's patches...sorry :( 1997-03-14 05:56:27 +00:00
Marc G. Fournier 071484c5d8 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] timestamp type

OK, last one.  This patch adds an ANSI SQL 'timestamp' type.
1997-03-12 21:28:14 +00:00
Marc G. Fournier 3a7c93e7f3 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] password authentication

This patch adds support for plaintext password authentication.  To use
it, you add a line like

host         all         0.0.0.0       0.0.0.0           password  pg_pwd.conf


to your pg_hba.conf, where 'pg_pwd.conf' is the name of a file containing
the usernames and password hashes in the format of the first two fields
of a Unix /etc/passwd file.  (Of course, you can use a specific database
name or IP instead.)

Then, to connect with a password through libpq, you use the PQconnectdb()
function, specifying the "password=" tag in the connect string and also
adding the tag "authtype=password".

I also added a command-line switch '-u' to psql that tells it to prompt
for a username and password and use password authentication.
1997-03-12 21:23:16 +00:00
Marc G. Fournier 5dde558ce6 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] linux/alpha patches

These patches lay the groundwork for a Linux/Alpha port.  The port doesn't
actually work unless you tweak the linker to put all the pointers in the
first 32 bits of the address space, but it's at least a start.  It
implements the test-and-set instruction in Alpha assembly, and also fixes
a lot of pointer-to-integer conversions, which is probably good anyway.
1997-03-12 21:13:19 +00:00
Marc G. Fournier e4949f9fe5 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] better access control error messages

This patch replaces the 'no such class or insufficient privilege' with
distinct error messages that tell you whether the table really doesn't
exist or whether access was denied.
1997-03-12 20:48:48 +00:00
Bruce Momjian b913dd1f9e Add prototypes for oracle-compat functions. Rename geo-*.c adt to geo_*.c 1997-03-09 20:41:02 +00:00
Marc G. Fournier 83978e1ea7 This is a set of single row character functions, defined for the datatype
text, which are supposed to behave exactly as their Oracle counterparts.

From: Edmund Mergl <E.Mergl@bawue.de>
1997-03-04 05:32:26 +00:00
Marc G. Fournier 497e3c9b5e Fix the prototype for on_exitpg() 1997-03-03 23:34:27 +00:00
Bruce Momjian 688aff37f9 Change debug to pretty-print tree, recommended by Darren King. 1997-03-02 02:12:49 +00:00
Bruce Momjian 162c2a6e4c Remove _PAGE_SIZE_ as recommended by Darren King. 1997-03-02 01:34:50 +00:00
Vadim B. Mikheev 36058981a4 Added: UNIQUE feature to bulkload code. 1997-02-22 10:08:27 +00:00
Bruce Momjian 6eb0525185 Prevent under/over flow of float8 constants in parser. Small regression fix. 1997-02-19 20:11:05 +00:00
Marc G. Fournier 5b5bbdb161 Disable GEQO...it seems to be broken as shown by the message to
bugs@postgresql.org concerning updates
1997-02-19 19:25:42 +00:00
Marc G. Fournier 29138eeb3c Merge in GEQO Optimizer
From: "Martin S. Utesch" <utesch@aut.tu-freiberg.de>
1997-02-19 12:59:07 +00:00
Bruce Momjian a17b01f320 Update btree patches that were missed. 1997-02-18 17:14:25 +00:00
Bruce Momjian d38767fcb5 Add prototypes and remove unused variables from btree Fastbuild patch. 1997-02-14 22:47:36 +00:00
Bruce Momjian 31c8e94b34 Remove WIN32 defines. They never worked. 1997-02-14 04:19:07 +00:00
Marc G. Fournier aa7dbd0b95 Had configure check for strdup, but didn't have it set HAVE_STRDUP
Fixed
1997-02-13 08:33:28 +00:00
Marc G. Fournier fb70587c1d Patch from Massimo Dal Zotto <dz@cs.unitn.it>
The following patches add to the backend a new debugging flag -K which prints
a debug trace of all locking operations on user relations (those with oid
greater than 20000). The code is compiled only if LOCK_MGR_DEBUG is defined,
so the patch should be harmless if not explicitly enabled.
I'm using the code to trace deadlock conditions caused by application queries
using the command "$POSTMASTER -D $PGDATA -o '-d 1 -K 1'.
The patches are for version 6.0 dated 970126.
1997-02-12 05:25:13 +00:00
Marc G. Fournier 5d9f146c64 What looks like some *major* improvements to btree indexing...
Patches from: aoki@CS.Berkeley.EDU (Paul M. Aoki)

i gave jolly my btree bulkload code a long, long time ago but never
gave him a bunch of my bugfixes.  here's a diff against the 6.0
baseline.

for some reason, this code has slowed down somewhat relative to the
insertion-build code on very small tables.  don't know why -- it used
to be within about 10%.  anyway, here are some (highly unscientific!)
timings on a dec 3000/300 for synthetic tables with 10k, 100k and
1000k tuples (basically, 1mb, 10mb and 100mb heaps).  'c' means
clustered (pre-sorted) inputs and 'u' means unclustered (randomly
ordered) inputs.  the 10k table basically fits in the buffer pool, but
the 100k and 1000k tables don't.  as you can see, insertion build is
fine if you've sorted your heaps on your index key or if your heap
fits in core, but is absolutely horrible on unordered data (yes,
that's 7.5 hours to index 100mb of data...) because of the zillions of
random i/os.

if it doesn't work for you for whatever reason, you can always turn it
back off by flipping the FastBuild flag in nbtree.c.  i don't have
time to maintain it.

good luck!

baseline code:

time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest
real   8.6
time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest
real   9.1
time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest
real   59.2
time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest
real   652.4
time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest
real   636.1
time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest
real   26772.9

bulkloading code:

time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest
real   11.3
time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest
real   10.4
time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest
real   59.5
time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest
real   63.5
time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest
real   636.9
time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest
real   701.0
1997-02-12 05:04:52 +00:00
Bruce Momjian 4331b16320 Add comment for questionable 5 padding. 1997-02-11 15:37:18 +00:00
Marc G. Fournier 86c28441b4 Remove machine.h, since it wasn't doing anything that config.h wasn't
already doing

Removed only reference to a machine.h I could find in c.h, to win32/machine.h
1997-02-09 04:50:25 +00:00
Marc G. Fournier e7c767b477 Try to further reduce the PORT dependencies.
Essentially, config.h now includes an 'os.h', which is created via
configure by linking a "port.h" file from the port directory to the
include directory.

Going to try to merge backend/port in similar ways
1997-02-09 04:34:07 +00:00
Marc G. Fournier d557375d61 Remove NO_{SIGPROCMASK,SETSID,WAITPID} from nextstep port, since they
aren't doing anything anyway
1997-02-09 03:36:08 +00:00
Marc G. Fournier 171e0c27e4 Changes to configure/config.h.in to check for:
sigprocmask, setsid and waitpid

Especially for nextstep systems

Awaiting for a context diff from Gregor to complete changes for the nextstep
port
1997-02-09 03:33:38 +00:00
Bruce Momjian e2292e0c0c Add missing paren for hpux. 1997-02-08 20:39:50 +00:00
Bruce Momjian 2300ac0dc4 Add attribute optimization statistics. 1997-02-07 16:24:12 +00:00
Marc G. Fournier 2c9dbc57e5 Various changes to improve/support Mklinux
Submitted by: Tatsuo Ishii
1997-02-06 08:40:16 +00:00
Marc G. Fournier 9b9141245c Make sure all changes are committed... 1997-02-06 06:33:58 +00:00
Marc G. Fournier a7257ff41f autoconf test for and set HAVE_VFORK 1997-02-06 06:15:49 +00:00
Marc G. Fournier e72b1ccd30 Add test for union semun to configure
Remove references to NEED_UNION_SEMUN from include/config.h.in and
from include/storage/ipc.h, replacing it with a single HAVE_UNION_SEMUN
1997-02-06 05:30:50 +00:00
Marc G. Fournier 4506116db8 Add in appropriate checks for inet_aton, and modifications to backend/port/Makefile
to include inet_aton.c if required
1997-02-04 22:39:56 +00:00
Marc G. Fournier 63c28920ab remove old non-autoconf config.h
clean up some of the readline code in config.h.in
1997-02-04 09:08:56 +00:00
Marc G. Fournier a20440b210 Final file required for autoconf, so far... 1997-02-04 08:54:47 +00:00