Commit Graph

528 Commits

Author SHA1 Message Date
Peter Eisentraut 336ce4aa18 This is obsolete and doesn't work anymore. 2001-09-04 14:33:08 +00:00
Tom Lane 29ec29ffac Makefile forgot to install README.btree_gist. 2001-08-23 16:55:53 +00:00
Tom Lane 3563e90a8c Add chkpass. 2001-08-23 16:54:25 +00:00
Tom Lane 0525ddc3e5 Bring chkpass build process into sync with other contrib modules;
make it use Makefile.shlib, etc.
2001-08-23 16:50:33 +00:00
Tom Lane 119fd7956a Remove test of 'inf' since it introduces a platform dependency (some
Unixen spell it 'Inf').  Not worth adding multiple expected files and
a resultmap just for this.
2001-08-23 15:10:17 +00:00
Tom Lane 07f6c02eac tskey_cmp() should use timestamp_cmp() instead of doing its own
interval arithmetic.  From Teodor Sigaev.
2001-08-23 15:07:41 +00:00
Tom Lane a9289708af New contrib module for BTREE emulation in GiST.
From Oleg Bartunov and Teodor Sigaev.
2001-08-22 18:27:54 +00:00
Tom Lane a54075a6d6 Update GiST for new pg_opclass arrangement (finally a clean solution
for haskeytype).  Update GiST contrib modules too.  Add linear-time split
algorithm for R-tree GiST opclass.
From Oleg Bartunov and Teodor Sigaev.
2001-08-22 18:24:26 +00:00
Tom Lane 38a4c35116 Persuade new pgcrypto stuff to compile. 2001-08-22 18:19:59 +00:00
Tom Lane f933766ba7 Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in
pgsql-hackers.  pg_opclass now has a row for each opclass supported by each
index AM, not a row for each opclass name.  This allows pg_opclass to show
directly whether an AM supports an opclass, and furthermore makes it possible
to store additional information about an opclass that might be AM-dependent.
pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we
previously expected the user to remember to provide in CREATE INDEX commands.
Lossiness is no longer an index-level property, but is associated with the
use of a particular operator in a particular index opclass.

Along the way, IndexSupportInitialize now uses the syscaches to retrieve
pg_amop and pg_amproc entries.  I find this reduces backend launch time by
about ten percent, at the cost of a couple more special cases in catcache.c's
IndexScanOK.

Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane.

initdb forced.
2001-08-21 16:36:06 +00:00
Bruce Momjian 4859219f19 Add 0.2 version XML files. 2001-08-21 15:26:10 +00:00
Bruce Momjian fe786448e7 Remove krb.c. 2001-08-21 12:50:18 +00:00
Bruce Momjian 18529514b1 Remove encode.*. Not needed anymore. 2001-08-21 01:38:31 +00:00
Bruce Momjian 62d19bd1d2 Remove object file. 2001-08-21 01:36:16 +00:00
Bruce Momjian df24cb73f6 Add missing pgcrypto file. 2001-08-21 01:32:01 +00:00
Bruce Momjian 2518e27334 /contrib/pgcrypto:
* remove support for encode() as it is in main tree now
* remove krb5.c
* new 'PX library' architecture
* remove BSD license from my code to let the general
  PostgreSQL one to apply
* md5, sha1: ANSIfy, use const where appropriate
* various other formatting and clarity changes
* hmac()
* UN*X-like crypt() - system or internal crypt
* Internal crypt: DES, Extended DES, MD5, Blowfish
  crypt-des.c, crypt-md5.c from FreeBSD
  crypt-blowfish.c from Solar Designer
* gen_salt() for crypt() -  Blowfish, MD5, DES, Extended DES
* encrypt(), decrypt(), encrypt_iv(), decrypt_iv()
* Cipher support in mhash.c, openssl.c
* internal: Blowfish, Rijndael-128 ciphers
* blf.[ch], rijndael.[ch] from OpenBSD
* there will be generated file rijndael-tbl.inc.

Marko Kreen
2001-08-21 00:42:41 +00:00
Bruce Momjian 5950a984a7 1. I've now produced an updated version (and called it 0.2) of my XML
parser interface code. It now uses libxml2 instead of expat (though I've
left the old code in the tarball). This means *proper* XPath support, and
the provided function allows you to wrap your result set in XML tags to
produce a new XML document.

John Gray
2001-08-21 00:39:20 +00:00
Bruce Momjian f6387b5169 Update XML author's email address. 2001-08-21 00:36:25 +00:00
Tom Lane a61e15a566 geo_distance function needs to be marked strict.
From Mark Stosberg.
2001-08-16 22:24:43 +00:00
Tom Lane d4f4b971a4 Sequences are now based on int8, not int4, arithmetic. SERIAL pseudo-type
has an alias SERIAL4 and a sister SERIAL8.  SERIAL8 is just the same
except the created column is type int8 not int4.
initdb forced.  Note this also breaks any chance of pg_upgrade from 7.1,
unless we hack up pg_upgrade to drop and recreate sequences.  (Which is
not out of the question, but I don't wanna do it.)
2001-08-16 20:38:56 +00:00
Tom Lane bf56f0759b Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them.
Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
pg_description has a three-column key instead of one.

Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
has some usefulness; pg_dump dumps comments on indexes, rules, and
triggers in a valid order.

initdb forced.
2001-08-10 18:57:42 +00:00
Bruce Momjian 13923be7c8 1. null-safe interface to GiST
(as proposed in http://fts.postgresql.org/db/mw/msg.html?mid=1028327)

2. support for 'pass-by-value' arguments - to test this
   we used special opclass for int4 with values in range [0-2^15]
   More testing will be done after resolving problem with
   index_formtuple and implementation of B-tree using GiST

3. small patch to contrib modules (seg,cube,rtree_gist,intarray) -
   mark functions as 'isstrict' where needed.

Oleg Bartunov
2001-08-10 14:34:28 +00:00
Bruce Momjian 2cb95cd925 Update README for fuzzystrmatch description. 2001-08-07 18:18:33 +00:00
Bruce Momjian cdd02cdf00 Sorry - I should have gotten to this sooner. Here's a patch which you should
be able to apply against what you just committed. It rolls soundex into
fuzzystrmatch.

Remove soundex/metaphone and merge into fuzzystrmatch.

Joe Conway
2001-08-07 18:16:01 +00:00
Bruce Momjian d8783c512e Per this discussion, here's a patch to implement both levenshtein() and
metaphone() in a contrib. There seem to be a fair number of different
approaches to both of these algorithms. I used the simplest case for
levenshtein which has a cost  of 1 for any character insertion, deletion, or
substitution. For metaphone, I adapted the same code from CPAN that the PHP
folks did.

A couple of questions:
1. Does it make sense to fold the soundex contrib together with this one?

2. I was debating trying to add multibyte support to levenshtein (it would
make no sense at all for metaphone), but a quick search through the contrib
directory found no hits on the word MULTIBYTE. Should worry about adding
multibyte support to levenshtein()?

Joe Conway
2001-08-07 16:47:43 +00:00
Bruce Momjian e9ea1255c0 This patch adds the following to the FTI module:
* The ability to index more than one column in a table with a single
trigger.
* All uses of sprintf changed to snprintf to prevent users from crashing
Postgres.
* Error messages made more consistent
* Some changes made to bring it into line with coding requirements for
triggers specified in the docs.  (ie. check you're a trigger before casting
your context)
* The perl script that generate indices has been updated to support indexing
multiple columns in a table.
* Fairly well tested in our development environment indexing a food
database's brand and description fields.  The size of the fti index is
around 300,000 rows.
* All docs and examples upgraded.  This includes specifying more efficient
index usage that was specified before, better examples that don't produce
duplicates, etc.


Christopher Kings-Lynne & Brett
2001-08-04 19:41:00 +00:00
Bruce Momjian 0bfc64b387 Looks okay in a quick glance, except error message spelling is poor:
! #define ARRISNULL(x) ( (x) ? ( ( ARR_NDIM(x) == NDIM ) ? ( ( ARRNELEMS( x ) )
? 0 : 1 ) : ( ( ARR_NDIM(x) ) ? (elog(ERROR,"Array is not one-dimentional: %d di
mentions", ARR_NDIM(x)),1) : 1 ) ) : 1 )

Should be "one-dimensional" and "dimensions".  Bruce, would you fix that
when you apply it?

Tom
2001-08-04 19:36:45 +00:00
Bruce Momjian f368c94fd6 1. Fixed error with empty array ( '{}' ),
test data changed to include such data
2. Test a dimension of an array ( we support only one-dimension)

Oleg Bartunov
2001-08-04 19:35:32 +00:00
Bruce Momjian 938236a297 The fti.pl supplied with the fulltextindex module generate ALL possible
substrings of two characters or greater, and is case-sensitive.

This patch makes it work correctly.  It generates only the suffixes of each
word, plus lowercases them - as specified by the README file.

This brings it into line with the fti.c function, makes it case-insensitive
properly, removes the problem with duplicate rows being returned from an fti
search and greatly reduces the size of the generated index table.

It was written by my co-worker, Brett Toolin.

Christopher Kings-Lynne
2001-08-01 18:40:12 +00:00
Tatsuo Ishii b332dc358b When invoked with -i (initialize mode), split the copy command every
10000 tuples, rather than one big copy. This will prevent generating
too much WAL logs.
2001-08-01 01:08:17 +00:00
Bruce Momjian 113bb9b5ac XML conversion utility, requires expat library.
John Gray
2001-07-30 14:59:02 +00:00
Bruce Momjian d4cafeba31 Patch to add comments to Linux startup script.
Rene Pijlman
2001-07-30 14:52:42 +00:00
Tom Lane 7d4d5c00f0 Arrange to recycle old XLOG log segment files as new segment files,
rather than deleting them only to have to create more.  Steady state
is 2*CHECKPOINT_SEGMENTS + WAL_FILES + 1 segment files, which will
simply be renamed rather than constantly deleted and recreated.
To make this safe, added current XLOG file/offset number to page
header of XLOG pages, so that an un-overwritten page from an old
incarnation of a logfile can be reliably told from a valid page.
This change means that if you try to restart postmaster in a CVS-tip
database after installing the change, you'll get a complaint about
bad XLOG page magic number.  If you don't want to initdb, run
contrib/pg_resetxlog (and be sure you shut down the old postmaster
cleanly).
2001-07-19 02:12:35 +00:00
Peter Eisentraut af3ce5daa4 Resolve a number of oddities in the Java build. First, remove the weird
redirections between the build files, which didn't work completely.  Now
you just go to the directory of your choice and run make.  Clean up the
build files to have a logical order, fix the unnecessary rebuilds, prevent
the deleting targets from removing files they're not responsible for.  Ant
1.3 does not have a bug.  It deletes directories just fine if you follow
the documentation.
2001-07-06 23:07:20 +00:00
Bruce Momjian 2e2d17ed51 Here the latest version and first working release of Ora2Pg a tool to export
Oracle database to PostgreSQL.

    It currently dump the database schema (tables, views, sequences,
    indexes, grants), with primary, unique and foreign keys into PostgreSQL
    syntax without editing the SQL code generated. You can dump only a
    particular schema from the Oracle database.

    Functions, procedures and triggers with SQL or PLSQL code generated must
    be reviewed to match the PostgreSQL syntax. Some usefull recommandation
    on porting Oracle to PostgreSQL can be found at
http://techdocs.postgresql.org/
    under the "Converting from other Databases to PostgreSQL" Oracle part. I
just
    notice one thing more is that the trunc() function in Oracle is the same for
number
    or date so be carefull when porting to PostgreSQL to use trunc() for number
and
    date_trunc() for date.

I will add more precision in type NUMBER conversion based on length to match
as closest as possible all rich PostgreSQL numerics type. But it seems not to be

urgent as it seems that Oracle DBAs only create number with length 22 (default)
Space seems not to be their problem...

Gilles DAROLD
2001-06-23 02:56:23 +00:00
Tom Lane d8d9ed931e Add support to lock manager for conditionally locking a lock (ie,
return without waiting if we can't get the lock immediately).
Not used yet, but will be needed for concurrent VACUUM.
2001-06-22 00:04:59 +00:00
Bruce Momjian 7aac048b59 Attached is a patch to deal with the ones that I missed the first time
around.  I tested this patch under Cygwin and Linux.

Note that I only changed dblink's Makefile in the most minimal way
to fix the link problem under Cygwin (i.e., use the link rule from
Makefile.shlib instead).  dblink's Makefile should probably be further
patched to be consistent with the other PostgreSQL Makefiles.

Jason Tishler
2001-06-20 00:04:44 +00:00
Bruce Momjian 558fae16e3 The attached patch enables the contrib subtree to build cleanly under
Cygwin with the possible exception of mSQL-interface.  Since I don't
have mSQL installed, I skipped this tool.

Except for dealing with a missing getopt.h (oid2name) and HUGE (seg),
the bulk of the patch uses the standard PostgreSQL approach to deal with
Windows DLL issues.

I tested the build aspect of this patch under Cygwin and Linux without
any ill affects.  Note that I did not actually attempt to test the code
for functionality.

The procedure to apply the patch is as follows:

    $ # save the attachment as /tmp/contrib.patch
    $ # change directory to the top of the PostgreSQL source tree
    $ patch -p0 </tmp/contrib.patch

Jason
2001-06-18 21:38:02 +00:00
Bruce Momjian 10b5f0bea8 Here's a small patch for dblink:
- fixed dblink invalid pointer causing corrupt elog message
   - fixed dblink_tok improper handling of null results
   - fixed examples in README.dblink

Joe Conway
2001-06-18 19:09:50 +00:00
Bruce Momjian 3dba1ff6e8 Add new dblink to /contrib Makefile.' 2001-06-18 17:20:56 +00:00
Bruce Momjian 5af4855383 Allow remote query execution (dblink)
Joe Conway
2001-06-14 16:49:03 +00:00
Tom Lane 6f2182fe18 contrib/intarray updates from Oleg Bartunov:
it's reimplemented to use function interface version 1 and special
treating of degenerated signatures.
2001-06-11 02:31:25 +00:00
Tom Lane 1173344e74 Adjust WAL code so that checkpoints truncate the xlog at the previous
checkpoint's redo pointer, not its undo pointer, per discussion in
pghackers a few days ago.  No point in hanging onto undo information
until we have the ability to do something with it --- and this solves
a rather large problem with log space for long-running transactions.
Also, change all calls of write() to detect the case where write
returned a count less than requested, but failed to set errno.
Presume that this situation indicates ENOSPC, and give the appropriate
error message, rather than a random message associated with the previous
value of errno.
2001-06-06 17:07:46 +00:00
Tom Lane 5bcf9233e4 Ooops, forgot to commit Makefile along with other changes. 2001-05-31 19:25:27 +00:00
Tom Lane 16f85390f2 Support for emulating RTREE indexing in GiST. Contributed by
Oleg Bartunov and Teodor Sigaev.
2001-05-31 18:27:18 +00:00
Tom Lane 3043810d97 Updates to make GIST work with multi-key indexes (from Oleg Bartunov
and Teodor Sigaev).  Declare key values as Datum where appropriate,
rather than char* (Tom Lane).
2001-05-31 18:16:55 +00:00
Bruce Momjian e7988a7ad3 Remove SEP_CHAR from /contrib. 2001-05-30 14:18:18 +00:00
Bruce Momjian 3f5563d131 Playing with the earthdistance stuff, and found I needed the following
patch:

Larry Rosenman
2001-05-30 12:58:45 +00:00
D'Arcy J.M. Cain 8d7952fdc4 Further conversions to Version 1 API. Also, fix boolean return to use
PG_RETURN_BOOL(0) instead of return 0.
2001-05-30 02:11:46 +00:00
D'Arcy J.M. Cain 505d9037cd Upgraded code to use the current version 1 calling conventions. 2001-05-28 15:34:27 +00:00
D'Arcy J.M. Cain 2bc1c14ab0 Changed use of macros for extracting information. According to comments
in c.h we should be using the visible structure.  We should only see
de-TOASTed values in this program.  The old method refused to compile
because the length macro was no longer an lvalue.
2001-05-27 19:06:20 +00:00
Bruce Momjian 1ef5c99c85 Fix 'make clean' with jdbc and ant by using filesets. 2001-05-17 03:22:53 +00:00
Bruce Momjian 37b006e074 Add NUMERIC tests to jdbc code.
David Esposito
2001-05-16 17:09:26 +00:00
Bruce Momjian 9cdf723142 Backpatch jdbc2 fixes to jdbc1, ANT fixes, from Peter Eisentraut 2001-05-16 16:20:53 +00:00
Bruce Momjian fdbfe1c68e Well, the correct code - that corresponds to current
encode - is below.  I even got the linefeed stuff wrong.

--
marko
2001-05-15 04:45:15 +00:00
Bruce Momjian 5ee76ac8c0 > I've been experimenting with pgcrypto 0.3 (distributed with
> Postgres 7.1.0), and I think I've found a bug.
>
> I compiled Pgcrypto with OpenSSL, using gcc 2.95.4 and
> OpenSSL 0.9.6a (the latest Debian 'unstable' packages).

> web=> select encode(digest('blah', 'sha1'), 'base64');
> FATAL 1:  pg_encode: overflow, encode estimate too small
> pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.

> Is this a bug? Can it be fixed?

This is a bug alright.  And a silly one :)

Marko Kreen
2001-05-13 02:17:09 +00:00
Bruce Momjian 904ba3ff69 Update to ora2pg 1.2. 2001-05-13 02:10:00 +00:00
Bruce Momjian ffd0599c7a Add mention in README of Oracle. 2001-05-10 15:52:27 +00:00
Bruce Momjian 0d2c4d5a17 Add oracle conversion utility ora2pg in /contrib/oracle. 2001-05-10 15:51:05 +00:00
Bruce Momjian c2a062b7fe Add dbase conversion utility to /contrib. 2001-05-10 14:41:23 +00:00
Bruce Momjian 8ace5114dc This directory contains a module that implements the "Metaphone" code as
a PostgreSQL user-defined function.  The Metaphone system is a method of
matching similar sounding names (or any words) to the same code.

Metaphone was invented by Lawrence Philips as an improvement to the popular
name-hashing routine, Soundex.

This metaphone code is from Michael Kuhn, and is detailed at
   http://aspell.sourceforge.net/metaphone/metaphone-kuhn.txt

Joel Burton
2001-05-09 23:00:44 +00:00
D'Arcy J.M. Cain b95ff0c542 Initial checkin of a contributed type that handles passwords efficiently. 2001-05-03 12:32:13 +00:00
Peter Eisentraut 031e1afa23 Pass -D option to pg_ctl because export PGDATA won't be preserved across
'su -l'.

Reported by <VASQUEZ_JASON@LILLY.COM>.
2001-04-19 19:17:44 +00:00
Tom Lane 6faf150a30 Fix/cleanup DLLLIBS handling for Cygwin port. If it works it's to
Jason Tishler's credit, if it's broken it's my fault ...
2001-04-04 21:15:56 +00:00
Tom Lane 5f5db804f5 Provide snprintf() if system hasn't got it. 2001-04-03 19:06:19 +00:00
Bruce Momjian 7cf952e7b4 Fix comments that were mis-wrapped, for Tom Lane. 2001-03-23 04:49:58 +00:00
Bruce Momjian 339cd6b9b0 Run pgindent on _int.c, for Tom Lane. I had skipped this file because
of a complex macro that pgindent complained about.  Hand-adjusted macro
for pgindent run.
2001-03-22 15:24:12 +00:00
Bruce Momjian 0686d49da0 Remove dashes in comments that don't need them, rewrap with pgindent. 2001-03-22 06:16:21 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane 2ef6e7ee18 Repair intarray's problems with TOASTed input, avoid scribbling on
source data, improve split algorithm for intbig_ops.  Oleg Bartunov
with some kibitzing from Tom Lane.
2001-03-20 03:08:12 +00:00
Tom Lane 31b5c05819 Restore include-file updates, and fix some of the more glaring macro
sloppiness (insufficient parenthesization, etc).
It still fails regress test for me, however.
2001-03-18 23:36:55 +00:00
Tom Lane 8f82141b54 Restore Peter's makefile fixes. 2001-03-18 23:35:18 +00:00
Bruce Momjian 4bcb80a3e3 Update contrib intarray to Jan 25 version. 2001-03-17 21:59:42 +00:00
Tom Lane 10a4e0c2eb Documentation update from Marko Kreen. 2001-03-16 17:42:56 +00:00
Tom Lane 4eb5e27a28 Resetting the XLOG can't include rewinding it to logical position zero,
because we need page LSNs stored in the main database to be less than
the current XLOG position.  Hence, generate the new XLOG segment at last
old segment number plus one.
2001-03-16 05:08:39 +00:00
Tom Lane eeaf3fc3a1 First cut at XLOG file reset utility.
Could do with more testing, but it works in the simple cases.
2001-03-14 00:57:43 +00:00
Peter Eisentraut e2f91389a5 'test -e' isn't portable. Use 'test -f'. 2001-03-13 19:28:02 +00:00
Tom Lane 0c383155ae Update for new pg_control format. 2001-03-13 01:17:40 +00:00
Peter Eisentraut 671be61916 Add uninstall target to Java build.
Respect default port setting in JDBC driver.
Pick up version number from Makefile.global.
Change installation directory to share/java/.
Document.
2001-03-11 11:07:01 +00:00
Bruce Momjian c7aa5998ae Update my2pg, new version. 2001-03-06 22:46:50 +00:00
Peter Mount ef8181b808 Hmmm, a conflict with V1.104 of configure.in remained and broke configure
(said redirection required when run).

After checking using cvsweb, removed the offending conflict.
Rebuilt configure using autoconf, and it now works fine.
2001-03-05 10:18:48 +00:00
Peter Mount e2e84a1c5e First batch of the tools merged in... 2001-03-05 09:15:38 +00:00
Bruce Momjian 60cea7d71a Update mysql converter, new version released. 2001-03-04 15:43:33 +00:00
Marc G. Fournier ca22223e82 start of an admin tool for FreeBSD to help configure shared memory for
that machine

I kept the name as generic as possible though, as other OS should have
similar methods, so this can be extended "as appropriate" ...
2001-02-27 15:37:39 +00:00
Peter Eisentraut 2a398726e7 Doesn't need libpq. 2001-02-25 15:57:45 +00:00
Peter Eisentraut eade6d3569 Remove binary files. 2001-02-25 15:55:05 +00:00
Bruce Momjian b25e60d887 I had a need to read such things as the backend locale and the catalog
version number from the current database, and couldn't find any existing
program to do that.

linda:~$ pg_controldata
Log file id:                          0
Log file segment:                     5
Last modified:                        Wed Feb  7 19:35:47 2001
Database block size:                  8192
Blocks per segment of large relation: 131072
Catalog version number:               200101061
LC_COLLATE:                           en_GB
LC_CTYPE:                             en_GB
Log archive directory:

Oliver Elphick                                Oliver.Elphick@lfix.co.uk
2001-02-23 20:38:35 +00:00
Peter Eisentraut cb6edf9d56 Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
2001-02-20 19:20:30 +00:00
Bruce Momjian 60ea34b046 Changes:
* reverse the change #include <> -> "" in krb.c.
  It _must not_ include files in "."
* Makefile update.  Inconsistent var usage and SHLIB was
  not set.

Now it should work with all external libs.

arko Kreen
2001-02-20 15:34:14 +00:00
Tatsuo Ishii 4571439297 Fix README in Japanese to sync with README.pgbench updated by Tom.
(thanks!)
2001-02-17 06:50:03 +00:00
Tom Lane 810c0b85d2 Update README's install instructions to agree with current reality. 2001-02-16 21:41:53 +00:00
Bruce Momjian d99df62c31 Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK, add #include <stdio.h> to the file.  That should fix it.

Seems unlikely, since libpq-fe.h already includes <stdio.h>.

The real problem here is that the code is wrong: it's passing NULL
to an int parameter.

                        regards, tom lane
2001-02-12 21:49:24 +00:00
Bruce Momjian f6df410022 Add stdio to file. 2001-02-12 18:37:35 +00:00
Bruce Momjian 281b7d84fc Add // -> /* */ mapping to pgindent. 2001-02-12 18:30:53 +00:00
Bruce Momjian 9fdd81de1d Add #include <unistd.h> 2001-02-12 13:55:36 +00:00
Bruce Momjian 71f2b6f015 Add to Makefile. 2001-02-11 02:18:48 +00:00
Bruce Momjian 8d1b6de57c Add pg_logger to /contrib. 2001-02-11 02:18:27 +00:00
Peter Eisentraut 2660803697 Only look for bison as YACC; other yaccs need to be selected explicitly.
When no suitable YACC is configured, supply useful informational messages
to users.  (Same way flex has been handled for a while.)
2001-02-10 22:31:42 +00:00
Bruce Momjian a2a51234dd cleanup 2001-02-10 12:07:12 +00:00
Bruce Momjian 2563c3a929 Add URL for my2pg.pl. 2001-02-10 11:59:36 +00:00
Bruce Momjian 66e7d16c27 Add description. 2001-02-10 11:53:14 +00:00
Bruce Momjian 2ecbd255d0 Add both conversion utilities. 2001-02-10 11:46:00 +00:00
Bruce Momjian 228444ae99 cleanup 2001-02-10 11:43:33 +00:00
Bruce Momjian 890bbf2770 Add other mysql conversion utility for comparisons. 2001-02-10 11:43:12 +00:00
Tom Lane 11da9e5cf8 Update findoidjoins notes for 7.1. 2001-02-10 03:57:42 +00:00
Tom Lane fce33c7f85 Compile a little more cleanly. 2001-02-10 03:44:54 +00:00
Tom Lane 2a1553c7fd Add oid2name subdirectory to contrib Makefile. 2001-02-10 03:44:06 +00:00
Tom Lane d08741eab5 Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant
to be the primary include files for backend .c files and frontend .c files
respectively.  By default, only include files meant for frontend use are
installed into the installation include directory.  There is a new make
target 'make install-all-headers' that adds the whole content of the
src/include tree to the installed fileset, for use by people who want to
develop server-side code without keeping the complete source tree on hand.
Cleaned up a whole lot of crufty and inconsistent header inclusions.
2001-02-10 02:31:31 +00:00
Peter Eisentraut fdf87fdf7b Add new FreeBSD start script that makes use of new pg_ctl functionality. 2001-02-10 00:13:23 +00:00
Tom Lane ed4f2f8278 Remove link to dead subdirectory 'linux'. 2001-02-09 18:42:35 +00:00
Peter Eisentraut bbac19a973 Remove outdated contrib/linux start scripts. Beat some sense into
contrib/init.d start script.  Place into more aptly named directory.  Maybe
we could add scripts for other platforms here later.
2001-02-08 19:53:33 +00:00
Bruce Momjian e58775ee75 UPdate file from Patrick. 2001-02-08 04:57:24 +00:00
Bruce Momjian a0885fe63c cleaned up. 2001-02-06 21:38:43 +00:00
Bruce Momjian 9213f63400 Make it clearer. 2001-02-06 21:37:55 +00:00
Bruce Momjian 659a1d65c6 Well, learned the hard way...
Marko Kreen
2001-02-06 18:05:13 +00:00
Bruce Momjian a0b9ffbbeb Update /contrib and TODO.detail. 2001-02-06 17:47:48 +00:00
Bruce Momjian 80dbae395d Change description. 2001-02-03 04:13:22 +00:00
Bruce Momjian 58f882d4b2 Please replace with the one attached to this email message. The
previous version depended on the below patch, this one does not. It is
also a bit cleaner and has a few more helpful comments.

Ryan Kirkpatrick
2001-02-01 18:31:10 +00:00
Bruce Momjian ed7910ef44 Update /contrib README and add init.d from Ryan. 2001-01-30 17:37:49 +00:00
Bruce Momjian 623bf843d2 Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group. 2001-01-24 19:43:33 +00:00
Bruce Momjian 92681e975d Oops, got binary in there too. 2001-01-24 05:49:09 +00:00
Bruce Momjian 80d24370e0 Oops, had .o file in there. 2001-01-24 05:06:15 +00:00
Bruce Momjian cb5427ee47 I would like to do a interface change in pgcrypto. (Good
timing, I know :))  At the moment the digest() function returns
hexadecimal coded hash, but I want it to return pure binary.  I
have also included functions encode() and decode() which support
'base64' and 'hex' encodings, so if anyone needs digest() in hex
he can do encode(digest(...), 'hex').

Main reason for it is "to do one thing and do it well" :)

Another reason is if someone needs really lot of digesting, in
the end he wants to store the binary not the hexadecimal result.
It is really silly to convert it to hex then back to binary
again.  As I said if someone needs hex he can get it.

Well, and the real reason that I am doing encrypt()/decrypt()
functions and _they_ return binary.  For testing I like to see
it in hex occasionally, but it is really wrong to let them
return hex.  Only now it caught my eye that hex-coding in
digest() is wrong.  When doing digest() I thought about 'common
case' but hacking with psql is probably _not_ the common case :)

Marko Kreen
2001-01-24 03:46:16 +00:00
Bruce Momjian a939e97451 Update 2001-01-24 03:40:33 +00:00
Bruce Momjian 2c591cb821 Add oid2name. Add streaming option later. 2001-01-24 00:41:25 +00:00
Peter Mount 11cb9acb68 Some more additions to contrib for JDBC 2001-01-23 10:22:22 +00:00
Peter Mount 45b5d792af Thu Jan 18 12:24:00 GMT 2001 peter@retep.org.uk
- These methods in org.postgresql.jdbc2.ResultSet are now implemented:
            getBigDecimal(int) ie: without a scale (why did this get missed?)
            getBlob(int)
            getCharacterStream(int)
            getConcurrency()
            getDate(int,Calendar)
            getFetchDirection()
            getFetchSize()
            getTime(int,Calendar)
            getTimestamp(int,Calendar)
            getType()
          NB: Where int represents the column name, the associated version
              taking a String were already implemented by calling the int
              version.
        - These methods no longer throw the not implemented but the new noupdate
          error. This is in preparation for the Updateable ResultSet support
          which will overide these methods by extending the existing class to
          implement that functionality, but needed to show something other than
          notimplemented:
            cancelRowUpdates()
            deleteRow()
        - Added new error message into errors.properties "postgresql.noupdate"
          This is used by jdbc2.ResultSet when an update method is called and
          the ResultSet is not updateable. A new method notUpdateable() has been
          added to that class to throw this exception, keeping the binary size
          down.
        - Added new error message into errors.properties "postgresql.psqlnotimp"
          This is used instead of unimplemented when it's a feature in the
          backend that is preventing this method from being implemented.
        - Removed getKeysetSize() as its not part of the ResultSet API

Thu Jan 18 09:46:00 GMT 2001 peter@retep.org.uk
        - Applied modified patch from Richard Bullington-McGuire
          <rbulling@microstate.com>. I had to modify it as some of the code
          patched now exists in different classes, and some of it actually
          patched obsolete code.

Wed Jan 17 10:19:00 GMT 2001 peter@retep.org.uk
        - Updated Implementation to include both ANT & JBuilder
        - Updated README to reflect the changes since 7.0
	- Created jdbc.jpr file which allows JBuilder to be used to edit the
          source. JBuilder _CAN_NOT_ be used to compile. You must use ANT for
          that. It's only to allow JBuilders syntax checking to improve the
          drivers source. Refer to Implementation for more details
2001-01-18 14:50:15 +00:00
Thomas G. Lockhart 26696580c4 Add "--nodata" option to allow schema conversion only. 2001-01-18 07:16:56 +00:00
Tom Lane 2dbc457ef5 Show intarray contrib module in contrib/README and Makefile. 2001-01-15 22:20:00 +00:00
Marc G. Fournier 25c0ffb9ec check one last time for any erros ... 2001-01-13 03:17:05 +00:00
Marc G. Fournier 1fc331bbc2 ignore his too 2001-01-13 03:11:07 +00:00
Marc G. Fournier 3c085b1b35 and this time? 2001-01-13 03:09:43 +00:00
Marc G. Fournier d5e66044ad try this again ... 2001-01-13 03:08:02 +00:00
Peter Eisentraut 16cc90ccdb Clean up garbage. 2001-01-13 02:18:31 +00:00
Peter Eisentraut bc615509ac Surely one README file is enough. 2001-01-13 02:14:32 +00:00
Marc G. Fournier 3f8ea17810 okay, this appears to work ...
onlly changes aer adding some white space ...
2001-01-13 00:57:06 +00:00
Peter Eisentraut daa78233d0 Surely we don't need a 7.0.3 makefile in 7.1. 2001-01-12 22:36:57 +00:00
Bruce Momjian ed7f37b7b1 Add to DROP todo. 2001-01-12 05:37:37 +00:00
Marc G. Fournier 1db943b3ca commit Oleg and Teodor's RD-tree implementation ... this provides the
regression tests for the GiST changes ... this should be integrated into
the regular regression tests similar to Vadim's SPI contrib stuff ...
2001-01-12 00:16:26 +00:00
Bruce Momjian e586026d10 The KAME files md5.* and sha1.* have the following changelog
entry:

----------------------------
revision 1.2
date: 2000/12/04 01:20:38;  author: tgl;  state: Exp;  lines:
+18 -18
Eliminate some of the more blatant platform-dependencies ... it
builds here now, anyway ...
----------------------------

Which basically changes u_int*_t -> uint*_t, so now it does not
compile neither under Debian 2.2 nor under NetBSD 1.5 which
is platform independent<B8> all right.  Also it replaces $KAME$
with $Id$ which is Bad Thing. PostgreSQL Id should be added as a
separate line so the file history could be seen.

So here is patch:

* changes uint*_t -> uint*.  I guess that was the original
  intention
* adds uint64 type to include/c.h because its needed
  [somebody should check if I did it right]
* adds back KAME Id, because KAME is the master repository
* removes stupid c++ comments in pgcrypto.c
* removes <sys/types.h> from the code, its not needed

--
marko

Marko Kreen
2001-01-09 16:07:14 +00:00
Peter Eisentraut a057cbec46 Qualify %.in rule to avoid triggering on configure.in, repair unportable
attempt to install more than one file per 'install' invocation, clean up
some other oddities.
2000-12-28 17:34:52 +00:00
Tom Lane 8609d4abf2 Fix portability problems recently exposed by regression tests on Alphas.
1. Distinguish cases where a Datum representing a tuple datatype is an OID
from cases where it is a pointer to TupleTableSlot, and make sure we use
the right typlen in each case.
2. Make fetchatt() and related code support 8-byte by-value datatypes on
machines where Datum is 8 bytes.  Centralize knowledge of the available
by-value datatype sizes in two macros in tupmacs.h, so that this will be
easier if we ever have to do it again.
2000-12-27 23:59:14 +00:00
Tom Lane 6cc842abd3 Revise lock manager to support "session level" locks as well as "transaction
level" locks.  A session lock is not released at transaction commit (but it
is released on transaction abort, to ensure recovery after an elog(ERROR)).
In VACUUM, use a session lock to protect the master table while vacuuming a
TOAST table, so that the TOAST table can be done in an independent
transaction.

I also took this opportunity to do some cleanup and renaming in the lock
code.  The previously noted bug in ProcLockWakeup, that it couldn't wake up
any waiters beyond the first non-wakeable waiter, is now fixed.  Also found
a previously unknown bug of the same kind (failure to scan all members of
a lock queue in some cases) in DeadLockCheck.  This might have led to failure
to detect a deadlock condition, resulting in indefinite waits, but it's
difficult to characterize the conditions required to trigger a failure.
2000-12-22 00:51:54 +00:00
Thomas G. Lockhart 4408f04208 Rename undocumented utility SyncSyncID to MasterSync. 2000-12-21 15:28:05 +00:00
Thomas G. Lockhart e59e805d83 Rename undocumented utility SyncSyncID to MasterSync.
Document MasterSync.
Fix up a couple of print statements to respect $verbose and $debug.
2000-12-21 15:26:04 +00:00
Thomas G. Lockhart 54f2b601ef rserv replication toolkit from Vadim Mikheev. 2000-12-20 17:22:35 +00:00
Thomas G. Lockhart 96edf0c185 Add rserv replication toolkit from Vadim Mikheev. 2000-12-20 17:22:26 +00:00
Thomas G. Lockhart d8231344f7 Utility to convert MySQL schema dumps to SQL92 and PostgreSQL conventions. 2000-12-20 17:20:24 +00:00
Tom Lane c4e3b0c3aa Links to CUBE, SEG contrib items 2000-12-11 20:40:59 +00:00
Tom Lane a3694b420f Gene Selkov's SEG datatype (GiST example code) 2000-12-11 20:40:33 +00:00
Tom Lane 9892ddf5ee Gene Selkov's CUBE datatype (GiST example code) 2000-12-11 20:39:15 +00:00
Bruce Momjian 457f0b8919 Add fulltextindex TODO list. 2000-12-09 15:52:11 +00:00
Tom Lane d9466046c0 Fix bogus makefiles ... these didn't build on platforms that are sticky
about being given accurate references to referenced libraries ...
2000-12-04 01:32:19 +00:00
Tom Lane 74b8fe1717 Seems to have been missed in GetPgUserName updates. 2000-12-04 01:25:35 +00:00
Tom Lane 7a4cc54e58 Eliminate some of the more blatant platform-dependencies ... it builds here now, anyway ... 2000-12-04 01:20:38 +00:00
Tom Lane a27b691e29 Ensure that all uses of <ctype.h> functions are applied to unsigned-char
values, whether the local char type is signed or not.  This is necessary
for portability.  Per discussion on pghackers around 9/16/00.
2000-12-03 20:45:40 +00:00
Peter Eisentraut e5ba2fc5b5 Make all commands that link a program look like
$(CC) $(CFLAGS) $(LDFLAGS) <object files> <extra-libraries> $(LIBS) -o $@

This form seemed to be the most portable, readable, and logical, but in any
case it's better than having a dozen different ones in the tree.
2000-11-30 20:36:13 +00:00
Tom Lane 89345945d9 Remove old, broken code for query_limit(), assert_enable(),
assert_test() functions --- these weren't accomplishing much except to
render the whole module un-loadable ...
2000-11-22 19:34:49 +00:00
Tom Lane 106710946c This file now redundant with README.pg_dumplo; remove it. 2000-11-22 00:01:46 +00:00
Tom Lane c2d1b3919b Code review: minor cleanups, make the world safe for unsigned OIDs.
Improve documentation, too.
2000-11-22 00:00:55 +00:00
Tom Lane 66d276aab8 Mention pgcrypto. 2000-11-21 21:58:23 +00:00
Tom Lane cfbcb6bb21 Make the world safe for unsigned OIDs. 2000-11-21 21:51:58 +00:00
Tom Lane 280a77d3ee Code review and cleanup. 2000-11-21 17:54:21 +00:00
Tom Lane 5bb2300b59 Revise handling of oldstyle/newstyle functions per recent discussions
in pghackers list.  Support for oldstyle internal functions is gone
(no longer needed, since conversion is complete) and pg_language entry
'internal' now implies newstyle call convention.  pg_language entry
'newC' is gone; both old and newstyle dynamically loaded C functions
are now called language 'C'.  A newstyle function must be identified
by an associated info routine.  See src/backend/utils/fmgr/README.
2000-11-20 20:36:57 +00:00
Tom Lane a933ee38bb Change SearchSysCache coding conventions so that a reference count is
maintained for each cache entry.  A cache entry will not be freed until
the matching ReleaseSysCache call has been executed.  This eliminates
worries about cache entries getting dropped while still in use.  See
my posting to pg-hackers of even date for more info.
2000-11-16 22:30:52 +00:00
Bruce Momjian b83047eee2 Remove pg_dumpaccounts from 7.1 tree. 2000-11-02 22:04:51 +00:00
Jan Wieck 94b8640cd9 Added utility script pg_dumpaccounts to contrib.
Derived from pg_dumpall it just dumps users and groups.

Jan
2000-11-02 18:20:12 +00:00
Tatsuo Ishii 6d7f1d3300 Fix for PQsetdb port parameter due to the interface change.
PQsetdb no more recognize "" as the default port number.
2000-11-01 00:45:46 +00:00
Peter Eisentraut 0c0dde6176 Hashing functions from Marko Kreen <marko@l-t.ee> 2000-10-31 13:11:28 +00:00
Tom Lane 4f44aa04b5 Major overhaul of large-object implementation, by Denis Perchine with
kibitzing from Tom Lane.  Large objects are now all stored in a single
system relation "pg_largeobject" --- no more xinv or xinx files, no more
relkind 'l'.  This should offer substantial performance improvement for
large numbers of LOs, since there won't be directory bloat anymore.
It'll also fix problems like running out of locktable space when you
access thousands of LOs in one transaction.
Also clean up cruft in read/write routines.  LOs with "holes" in them
(never-written byte ranges) now work just like Unix files with holes do:
a hole reads as zeroes but doesn't occupy storage space.
INITDB forced!
2000-10-24 01:38:44 +00:00
Peter Eisentraut 805e431a38 Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
2000-10-20 21:04:27 +00:00
Peter Eisentraut 18d99bc264 Update soundex to new fmgr interface and fix algorithm 2000-10-04 19:25:34 +00:00
Peter Eisentraut 2a7da3f564 Standardize on __CYGWIN__ rather than __CYGWIN32__ macro. Doesn't matter
either way (although the former is preferred by the Cygwin folks
themselves), but using only one seems nicer.
2000-09-29 13:53:35 +00:00
Peter Eisentraut 2acdef186d Move contrib/odbc/odbc.sql together with odbc driver, remove old files;
revise ODBC "installation instructions"; update some other outdated
documentation; update contrib documentation
2000-09-18 20:11:37 +00:00
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Thomas G. Lockhart 87523ab8db Comment fixes from Larry Rosenman" <ler@lerctr.org>. 2000-08-23 13:44:14 +00:00
Thomas G. Lockhart aa2a3bfd48 Create and manage information on MAC address OUIs
(Organizationally Unique Identifiers).
 This is the manufacturer's code in the MAC address.
2000-08-23 06:02:23 +00:00
Tom Lane c298d74d49 More functions updated to new fmgr style --- money, name, tid datatypes.
We're reaching the mopup stage here (good thing too, this is getting
tedious).
2000-08-03 16:35:08 +00:00
Tom Lane 87cdaf5491 Remove <values.h> inclusions, no-longer-needed MAXINT definitions. 2000-07-28 02:13:52 +00:00
Tom Lane d0e17e2112 Arrays are toastable. (At least if you initdb, which I didn't force.)
Remove a bunch of crufty code for large-object-based arrays, which is
superseded by TOAST and likely hasn't worked in a long time anyway.
Clean up array code a little, and in particular eliminate its habit
of scribbling on the input array (ie, modifying the input tuple :-().
2000-07-22 03:34:43 +00:00
Tom Lane 436d04435d Stat functions now in main system, contrib code no longer needed. 2000-07-17 03:55:43 +00:00
Peter Eisentraut 0d59dad770 Automatic dependency tracking
The .DEFAULT rule in backend/Makefile is harmful -- removed.
Replace `::' rules by `:'.
2000-07-16 14:50:44 +00:00
Peter Eisentraut cb292206c5 Remove a bunch of unused configure tests, in particular cases where
* the result is not recorded anywhere
* the result is not used anywhere
* the result is only used in some places, whereas others have been getting away with it
* the result is used improperly

Also make command line options handling a little better (e.g., --disable-locale,
while redundant, should really still *dis*able).
2000-07-12 22:59:15 +00:00
Peter Eisentraut 74618e2b82 Another round of those unportable config/build changes :-/
* Add option to build with OpenSSL out of the box. Fix thusly exposed
  bit rot. Although it compiles now, getting this to do something
  useful is left as an exercise.

* Fix Kerberos options to defer checking for required libraries until
  all the other libraries are checked for.

* Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc.

* Install work around for Autoconf's install-sh relative path anomaly.
  Get rid of old INSTL_*_OPTS variables, now that we don't need them
  anymore.

* Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX.

* Look for only one of readline.h or readline/readline.h, not both.

* Make check for PS_STRINGS cacheable. Don't test for the header files
  separately.

* Disable fcntl(F_SETLK) test on Linux.

* Substitute the standard GCC warnings set into CFLAGS in configure,
  don't add it on in Makefile.global.

* Sweep through contrib tree to teach makefiles standard semantics.

... and in completely unrelated news:

* Make postmaster.opts arbitrary options-aware. I still think we need to
  save the environment as well.
2000-07-09 13:14:19 +00:00
Tom Lane 65da0d66b4 Fix misuse of StrNCpy to copy and add null to non-null-terminated data.
Does not work since it fetches one byte beyond the source data, and when
the phase of the moon is wrong, the source data is smack up against the
end of backend memory and you get SIGSEGV.  Don't laugh, this is a fix
for an actual user bug report.
2000-07-07 21:12:53 +00:00
Tom Lane 40f64064ff Update textin() and textout() to new fmgr style. This is just phase
one of updating the whole text datatype, but there are so dang many
calls of these two routines that it seems worth a separate commit.
2000-07-05 23:12:09 +00:00
Bruce Momjian 5c603943ef Makefile cleanup from Karel. 2000-07-04 16:17:21 +00:00
Jan Wieck 31a020f6eb Added CVS header
Jan
2000-07-04 14:37:32 +00:00
Jan Wieck 92010434d4 New contrib module for statistical mathematics
Jan
2000-07-04 14:36:03 +00:00
Tom Lane 4e71240dbb Now that I look at it, is_stopword() is broken and always has been.
Doesn't anyone remember how to program a binary search??
2000-07-04 06:29:27 +00:00
Tom Lane 6d87107b0e Result of strcmp() is a signed int. Per bug report
from Paul McGarry.
2000-07-04 06:20:14 +00:00
Bruce Momjian d66a8c7c47 Very small changes in the contrib's pg_dumplo in the attache.
And:

 Note, Bruce I found in the contrib tree any files that we forget
remove during contrib cleaning. Please remove these files:

contrib/lo/test.sql
contrib/pg_dumplo/Makefile.out
contrib/pgbench/pgbench_jis.doc
contrib/spi/new_example.example
contrib/spi/README.MAX

Thanks.

                                Karel
2000-07-03 16:03:27 +00:00
Bruce Momjian e3b37462c2 Remove old README files. 2000-06-19 14:07:37 +00:00
Bruce Momjian bad9ce7099 Add missing /contrib files 2000-06-19 14:02:16 +00:00
Bruce Momjian 6de7d4fe91 Update to /contrib from Karel. 2000-06-19 13:54:50 +00:00
Bruce Momjian b36d31030b Cleanup README Makefile installs. 2000-06-16 18:59:30 +00:00
Bruce Momjian fca9295fab Remove old doc files, now README. 2000-06-15 19:08:37 +00:00
Bruce Momjian 5683e704d0 Add missing /contrib files to CVS. 2000-06-15 19:05:22 +00:00
Bruce Momjian f7f177d372 /contrib patch from Karel. 2000-06-15 18:55:34 +00:00
Bruce Momjian aaf19c0e25 Well, pg_dumplo is in attache. It is really simple program and now is not
prepared for dirtribution (it needs a little changes). I can change and work
on this, but I need motivation :-)

And Peter, I know and I agree that standard PG tree is not good space for
all interfaces and for all tools based on PG, but LO is PG feature and we
haven't backup tool for LO.


Karel Zak
2000-06-12 04:01:52 +00:00
Tom Lane 3477957b44 Update sequence-related functions to new fmgr style. Remove downcasing,
quote-stripping, and acl-checking tasks for these functions from the
parser, and do them at function execution time instead.  This fixes
the failure of pg_dump to produce correct output for nextval(Foo)
used in a rule, and also eliminates the restriction that the argument
of these functions must be a parse-time constant.
2000-06-11 20:08:01 +00:00
Tom Lane ae526b4070 Another round of updates for new fmgr, mostly in the datetime code. 2000-06-09 01:11:16 +00:00
Tom Lane 8a098f2f5d Update array_iterator to use new fmgr interface. 2000-05-29 20:30:11 +00:00
Tom Lane 091126fa28 Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
2000-05-29 05:45:56 +00:00
Tom Lane 18952f6744 Second round of fmgr changes: triggers are now invoked in new style,
CurrentTriggerData is history.
2000-05-29 01:59:17 +00:00
Bruce Momjian f63ba5cd6a Fix WARN->NOTICE in docs. Change libpgeasy connection parameters to use
PQconnectdb() style connections.
2000-05-18 14:24:38 +00:00
Bruce Momjian 21517e5960 The old init file won't run under bash on my box.
Joseph Shraibman
2000-05-16 03:18:43 +00:00
Tom Lane 0471eb1681 Because we ended up forcing an initdb for 7.0 final, we aren't going
to need this updatepgproc.sql script after all...
2000-05-05 03:11:24 +00:00
Bruce Momjian 0ccf3c8877 Update pgeasy examples 2000-04-28 22:49:25 +00:00
Bruce Momjian 96d643e5d5 More libpgeasy update of connectdb() parameter ordering 2000-04-28 15:03:39 +00:00
Tom Lane bfabd4f052 Add scripts to enable/disable use of new LIKE/regexp selectivity
estimation operators.  See contrib/likeplanning/README for info.
2000-04-16 18:41:30 +00:00
Tom Lane bec82a8571 Print OIDs as %u not %d. 2000-04-16 04:14:49 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Thomas G. Lockhart 9f2a07d891 Internal functions to support newest ODBC driver {fn ...} conventions.
Includes compiled code to support pre-7.0 backends, but for 7.0 only
requires executing odbc.sql.
2000-04-11 15:53:13 +00:00
Tom Lane 7ecf7eea63 Modify pgbench.c not to depend on configure, since it's not shipped with one. 2000-04-08 18:32:24 +00:00
Thomas G. Lockhart b2096a5512 Clean up directory to compile and run on my Linux box at least.
Note that there is some trouble with inconsistant input/output formats.
2000-04-07 13:28:37 +00:00
Bruce Momjian 51cfdae50f Hi,
here is an updated version of the bit type with a bugfix and all the necessa
ry
SQL functions defined. This should replace what is currently in contrib. I'd
appreciate any comments on what is there.

Kind regards,

Adriaan
2000-04-03 20:56:40 +00:00
Tom Lane fdd7f59820 Since PORTNAME is no longer used at the level of C code (it's only in
Makefiles now), there's no reason for os2client to maintain its own
copy of c.h just to change #define PORTNAME.  Simplify Makefile
accordingly.  Get rid of horribly-out-of-date modified copy of c.h,
which should never have been in the distribution to start with,
since it's actually a derived file.  Now it's not needed anyway.
2000-03-19 21:59:30 +00:00
Bruce Momjian a2226ad237 contrib-array.patch
this is an old patch which I have already submitted and never seen
        in the sources. It corrects the datatype oids used in some iterator
        functions. This bug has been reported to me by many other people.

contrib-datetime.patch

        some code contributed by Reiner Dassing <dassing@wettzell.ifag.de>

contrib-makefiles.patch

        fixes all my contrib makefiles which don't work with some compilers,
        as reported to me by another user.

contrib-miscutil.patch

        an old patch for one of my old contribs.

contrib-string.patch

        a small change to the c-like text output functions. Now the '{'
        is escaped only at the beginning of the string to distinguish it
        from arrays, and the '}' is no more escaped.

elog-lineno.patch

        adds the current lineno of CopyFrom to elog messages. This is very
        useful when you load a 1 million tuples table from an external file
        and there is a bad value somehere. Currently you get an error message
        but you can't know where is the bad data. The patch uses a variable
        which was declared static in copy.c. The variable is now exported
        and initialized to 0. It is always cleared at the end of the copy
        or at the first elog message or when the copy is canceled.
        I know this is very ugly but I can't find any better way of knowing
        where the copy fails and I have this problem quite often.

plperl-makefile.patch

        fixes a typo in a makefile, but the error must be elsewhere because
        it is a file generated automatically. Please have a look.

tprintf-timestamp.patch

        restores the original 2-digit year format, assuming that the two
        century digits don't carry much information and that '000202' is
        easier to read than 20000202. Being only a log file it shouldn't
        break anything.

Please apply the patches before the next scheduled code freeze.

I also noticed that some of the contribs don't compile correcly. Should we
ask people to fix their code or rename their makefiles so that they are
ignored by the top makefile?

--
Massimo Dal Zotto
2000-02-13 18:59:53 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Bruce Momjian b866d2e2d7 as attache of this mail is patch (to the main tree) with to_char's
family functions. Contain:

  conversion from a datetype to formatted text:

	to_char( datetime, 	text)
	to_char( timestamp,	text)
	to_char( int4,		text)
	to_char( int8,		text)
	to_char( float4,	text)
	to_char( float8,	text)
	to_char( numeric,	text)

  vice versa:

	to_date		( text, text)
	to_datetime	( text, text)
	to_timestamp	( text, text)
	to_number	( text, text)	   (convert to numeric)


  PostgreSQL to_char is very compatible with Oracle's to_char(), but not
total exactly (now). Small differentions are in number formating. It will
fix in next to_char() version.


! If will this patch aplly to the main tree, must be delete the current
  to_char version in contrib (directory "dateformat" and note in contrib's
  README), this patch not erase it (sorry Bruce).



The patch patching files:

	doc/src/sgml/func.sgml
                     ^^^^^^^^
   Hmm, I'm not sure if my English... :( Check it anyone (volunteer)?

   Thomas, it is right? SGML is not my primary lang  and compile
   the current PG docs tree is very happy job (hard variables setting in
   docs/sgml/Makefile --> HSTYLE= /home/users/t/thomas/....  :-)

   What add any definition to global configure.in and set Makefiles in docs
   tree via ./configure?

	src/backend/utils/adt/Makefile
	src/backend/utils/adt/formatting.c
	src/include/catalog/pg_proc.h
	src/include/utils/formatting.h
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-01-25 23:53:56 +00:00
Tom Lane 78845177bb findoidjoins was suffering from bit rot (pginterface no
longer in expected location).
2000-01-22 23:05:14 +00:00
Tatsuo Ishii a765db409b Add pgench: a TPC-B like benchmarking tool 2000-01-15 12:38:09 +00:00
Bruce Momjian 1c5aec60bb I finish devel. of Oracle compatible DateTime routines TO_CHAR(),
TO_DATE()
and PgSQL extension FROM_CHAR().

TO_CHAR() routine allow formating text output with a datetime values:

        SELECT TO_CHAR('now'::datetime, '"Now is: "HH24:MI:SS');
        to_char
        ----------------
        Now is: 21:04:10

FROM_CHAR() routine allow convert text to a datetime:

        SELECT FROM_CHAR('September 1999 10:20:30', 'FMMonth YYYY
HH:MI:SS');
        from_char
        -----------------------------
        Wed Sep 01 10:20:30 1999 CEST

TO_DATE() is equal with FROM_CHAR(), but output a Date only:

        SELECT TO_DATE('September 1999 10:20:30', 'FMMonth YYYY
HH:MI:SS');
        to_date
        ----------
        09-01-1999


In attache is compressed dir for the contrib. All is prepared, but I'am
not
sure if Makefile is good (probably yes).

Comments & suggestions ?


Thomas, thank you for your good advices.

                                                        Karel


------------------------------------------------------------------------------

Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
1999-11-29 23:26:18 +00:00
Bruce Momjian 1f747c6722 Attached are the C-routines that implement a BIT and BIT VARYING type.
Adriaan Joubert
1999-11-29 22:34:36 +00:00
Bruce Momjian 676404d5dc Add pginterface into main tree, called pgeasy. 1999-10-11 17:47:02 +00:00
Bruce Momjian 3202f45354 Update contrib/README. 1999-10-09 01:31:36 +00:00
Bruce Momjian 16b996d105 Remove contrib/int8. 1999-10-09 01:08:51 +00:00
Bruce Momjian 5a017b96ad Apply contrib patch from Massimo 1999-09-27 20:04:14 +00:00
Tom Lane bd272cace6 Mega-commit to make heap_open/heap_openr/heap_close take an
additional argument specifying the kind of lock to acquire/release (or
'NoLock' to do no lock processing).  Ensure that all relations are locked
with some appropriate lock level before being examined --- this ensures
that relevant shared-inval messages have been processed and should prevent
problems caused by concurrent VACUUM.  Fix several bugs having to do with
mismatched increment/decrement of relation ref count and mismatched
heap_open/close (which amounts to the same thing).  A bogus ref count on
a relation doesn't matter much *unless* a SI Inval message happens to
arrive at the wrong time, which is probably why we got away with this
sloppiness for so long.  Repair missing grab of AccessExclusiveLock in
DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi.
Recommend 'make clean all' after pulling this update; I modified the
Relation struct layout slightly.
Will post further discussion to pghackers list shortly.
1999-09-18 19:08:25 +00:00
Bruce Momjian 4cf595bf88 Update from Massimo 1999-06-05 20:07:54 +00:00
Bruce Momjian 27b8143944 Hi,
I have updated my contrib code for version 6.5. In the attachment you will
find the directories array, datetime, miscutil, string, tools and userlocks
which replace the corresponding directories under contrib.

In contrib/tools you will find some developement scripts which I use while
hacking the sources. I hope they will be useful for some other people.

I have also added a contrib/Makefile which tries to compile and install all
the contribs. Unfortunately many of them don't have a Makefile or don't
compile cleanly.

--
Massimo Dal Zotto
1999-06-05 19:09:48 +00:00
Vadim B. Mikheev bbf37e9477 typedef struct LTAG
{
    Oid             relId;
    Oid             dbId;
    union
    {
        BlockNumber     blkno;
        TransactionId   xid;
    }               objId;
>
> Added:
>    /*
>     * offnum should be part of objId.tupleId above, but would increase
>     * sizeof(LOCKTAG) and so moved here; currently used by userlocks only.
>     */
>    OffsetNumber    offnum;
    uint16          lockmethod;     /* needed by userlocks */
} LOCKTAG;

gmake clean required...
User locks are ready for 6.5 release...
1999-06-01 09:35:39 +00:00
Bruce Momjian fcff1cdf4e Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
Bruce Momjian 4eadfe8754 Make 0x007f -> (unsigned)0x7f to make pgindent happy. 1999-05-25 22:04:56 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Bruce Momjian 57455fc565 Remove more -B parameters not needed. 1999-05-23 19:01:18 +00:00
Bruce Momjian 716b8e2dba Updates for 6.5. 1999-05-17 06:06:35 +00:00
Tom Lane cf11642e92 Undo collateral damage from recent patch: Makefile had
lost most of target list and thus 'make clean' didn't clean up very well.
1999-05-16 14:56:17 +00:00
Bruce Momjian 1a87c14c9c I am sorry, I misinterpreted the still failing trigger regression test.
The
offending code
has been removed, the action is now always dependent :-)

I suggest the following patch, to finally make trigger regression happy
again:

 <<refint1.patch>>
After that you can remove the following from TODO:
Remove ERROR:  check_primary_key: even number of arguments should be
specified
Trigger regression test fails

Andreas
1999-05-12 12:47:24 +00:00
Bruce Momjian d489fdfc7f I send you a attach of my modified refint.c that
works with a new policy  in cascade mode .

Please Read README.MAX .
I do not know if you are the author of refint.c ,
but if not please tell me who is .


Thank you ( excuse me for my bad english) .
Massimo Lambertini massimo.lambertini@everex.it
1999-05-10 15:12:29 +00:00
Bruce Momjian 9e4e33c996 This patch is to add more comments
to postgres.init.sh , clairify the options
available, and to add easy support
for installation of postgres into the
runlevel system.

"sh postgres.init.sh install"

Will now install "postgres" in the
/etc/rc.d/init.d directory and execute
/sbin/chkconfig to hook up the symbolic
links.  An uninstall option is also added.

Enclosed is the patch and the patched file

Clark
1999-05-10 04:57:07 +00:00
Bruce Momjian 40457dfde9 add mention of large object orphaning 1999-05-10 04:19:30 +00:00
Peter Mount 94bb87f94b vacuumlo deals with large objects not referenced by any tables and removes them. 1999-04-10 16:48:05 +00:00
Tom Lane 763a7ab6b0 Delete unused system table pg_parg. 1999-03-27 17:26:26 +00:00
Tom Lane 85e9e03e0b Update findoidjoins for 6.5: remove workaround for long-dead bug,
use NOT EXISTS() which is a lot faster than NOT IN (),
update documentation.
1999-03-26 07:21:58 +00:00
Bruce Momjian 787786085f contrib/array_iterator/array_iterator.c won't compile.
Included patches should fix the problem.
--
Tatsuo Ishii
1999-03-16 03:09:51 +00:00
Bruce Momjian 98ad3fcfaf Hi All,
I've changed the check_primary_key() function code to allow for either
the "automatic insert key rule" or "dependent insert key rule".
Previously it restricted the addtion of a child entry if the
corresponding parent entry was not there. Now if the option is
"automatic" it will add an entry in the parent too ( it will be
successful if there are no no-null fields in the parent apart from the
primary key).
The way to use it now is:
:/*
 * check_primary_key () -- check that key in tuple being
inserted/updated
 *                       references existing tuple in "primary" table.
 * Though it's called without args You have to specify referenced
 * table/keys while creating trigger:  key field names in triggered
table,
 * referenced table name, referenced key field names,type of action
[automatic|dependent]:
 * EXECUTE PROCEDURE
 * check_primary_key ('Fkey1', 'Fkey2', 'Ptable', 'Pkey1', 'Pkey2',
'[automatic|dependent]').
 */
I am attaching the new ../contrib/spi/refint.c file which will do this.
I will be glad to help in case of any problems.

- Anand.
1999-03-15 00:34:53 +00:00
Bruce Momjian 7311da9ec4 i have made minor changes to array_iterator to make it work with
pgsql-6.3.2. I think array_iterator is a great thing to have!!!

With best regards,


Tobias Gabele
1999-01-21 22:40:16 +00:00
Tom Lane 21badba151 Replace direct inclusions of c.h with inclusion of postgres.h,
to ensure that config.h is included as well.
1999-01-17 03:04:57 +00:00