Commit Graph

1078 Commits

Author SHA1 Message Date
Tom Lane 313ed1ed94 Fix (hopefully for the last time) problems with datetime values displaying
like '23:59:60' because of fractional-second roundoff problems.  Trying
to control this upstream of the actual display code was hopeless; the right
way is to explicitly round fractional seconds in the display code and then
refigure the results if the fraction rounds up to 1.  Per bug #1927.
2005-10-09 17:21:47 +00:00
Bruce Momjian 4909357237 Remove unnecessary ABORT commands in dblink regression tests. 2005-10-08 16:10:38 +00:00
Bruce Momjian 768dfd0375 Cosmetic improvements to dblink. 2005-10-08 12:18:48 +00:00
Bruce Momjian f3576c33f8 Cosmetic changes to dblink. 2005-10-08 12:12:29 +00:00
Bruce Momjian 7d937cd408 Cosmetic changes to dblink. 2005-10-08 11:33:45 +00:00
Tom Lane d156e1f850 (Apologies for fat-fingering cvs commit command...) Should have read:
Remove unportable use of tfind/tsearch in favor of bsearch.  Fix up
random number generator to use random() not rand() and to actually honor
its min/max arguments properly.  That wasn't so important before, but
with exposure of capability to ask for general ranges, it will be.
2005-10-07 15:34:17 +00:00
Tom Lane 6ae7671497 gni 2005-10-07 15:31:49 +00:00
Tom Lane dd0fa0f958 Minor dbf2pg fixes from Martin Pitt: check for failure when issuing
CREATE TABLE command, and translate dBase's 'M' field type to 'text'.
2005-10-06 23:05:22 +00:00
Teodor Sigaev 380ab3669f Fix compile error 2005-10-04 17:10:55 +00:00
Tatsuo Ishii 8e48e91bc7 Oops. Partially saved file was committed. 2005-10-04 13:46:52 +00:00
Tatsuo Ishii f50ae06e14 Allow multiple -f options.
Make pgbench "script driven" to eliminate hard coded transaction
scenario. (Tatsuo Ishii)
2005-10-04 13:40:45 +00:00
Teodor Sigaev 8c73dfcc8b Optimize benchmark query and update benchmark's results. 2005-10-03 14:41:42 +00:00
Tom Lane aa731ed843 Change nextval and other sequence functions to specify their sequence
argument as a 'regclass' value instead of a text string.  The frontend
conversion of text string to pg_class OID is now encapsulated as an
implicitly-invocable coercion from text to regclass.  This provides
backwards compatibility to the old behavior when the sequence argument
is explicitly typed as 'text'.  When the argument is just an unadorned
literal string, it will be taken as 'regclass', which means that the
stored representation will be an OID.  This solves longstanding problems
with renaming sequences that are referenced in default expressions, as
well as new-in-8.1 problems with renaming such sequences' schemas or
moving them to another schema.  All per recent discussion.
Along the way, fix some rather serious problems in dbmirror's support
for mirroring sequence operations (int4 vs int8 confusion for instance).
2005-10-02 23:50:16 +00:00
Bruce Momjian c40cd3660f One of the web pages mentioned in dmetaphone.c has moved. Also fix
a few typos in comments.

The dictionaries I checked list "altho" as a variant of "although,"
but I didn't find any other instances of the former in the source
tree so I changed it.

Michael Fuhr
2005-09-30 22:38:44 +00:00
Tom Lane c775b423c1 Fix unportable usages in new pgbench code (strndup, ctype macros) 2005-09-29 16:18:26 +00:00
Tatsuo Ishii 9b19abd74f Add -f option which enables to read SQL commands from a file.
Patches Contributed by Tomoaki Sato.
2005-09-29 13:44:25 +00:00
Tom Lane 1610fcc351 Some marginal tweaks to make 'make installcheck' mostly work when
building contrib with USE_PGXS.  To make it work all the way, the
pg_regress script would need to be included in the installation tree.
2005-09-27 17:43:31 +00:00
Tom Lane 0b36cb83dc PGXS should be set with := not =, as specified in the documentation,
to avoid useless multiple executions of pg_config.
2005-09-27 17:13:14 +00:00
Tom Lane 0df7f493f8 Clean up possibly-uninitialized-variable warnings reported by gcc 4.x. 2005-09-24 23:07:18 +00:00
Tom Lane 8a65b820e2 Suppress signed-vs-unsigned-char warnings in contrib. 2005-09-24 19:14:05 +00:00
Tom Lane bb6b1a38b6 Document that chkpass ignores password characters after the eighth. 2005-09-23 15:05:04 +00:00
Teodor Sigaev f82b853b47 1 Update Snowball sources
2 Makefile fixes
2005-09-15 11:14:18 +00:00
Tom Lane ce128c01a6 Correct comment about why contrib/xml2 isn't built automatically. 2005-09-01 22:02:44 +00:00
Tom Lane e6a30121be int_array_enum function should be using fcinfo->flinfo->fn_extra for
working state, not fcinfo->context.  Silly oversight on my part in last
go-round of fixes.
2005-08-15 19:05:16 +00:00
Bruce Momjian f547909db7 Remove API file.
Marko Kreen
2005-08-13 15:27:41 +00:00
Bruce Momjian 87688ddf87 The large one adds support for RSA keys and reorganizes
the pubkey functions a bit.  The actual RSA-specific code
there is tiny, most of the patch consists of reorg of the
pubkey code, as lots of it was written as elgamal-only.

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

The SHLIB section was copy-pasted from somewhere and contains
several unnecessary libs.  This cleans it up a bit.

 -lcrypt
   we don't use system crypt()

 -lssl, -lssleay32
   no SSL here

 -lz in win32 section
   already added on previous line

 -ldes
   The chance anybody has it is pretty low.
   And the chance pgcrypto works with it is even lower.

Also trim the win32 section.

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

It is already disabled in Makefile, remove code too.

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

I was bit hasty making the random exponent 'k' a prime.  Further researh
shows that Elgamal encryption has no specific needs in respect to k,
any random number is fine.

It is bit different for signing, there it needs to be 'relatively prime'
to p - 1,  that means GCD(k, p-1) == 1, which is also a lot lighter than
full primality.  As we don't do signing, this can be ignored.

This brings major speedup to Elgamal encryption.

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

o  pgp_mpi_free: Accept NULLs
o  pgp_mpi_cksum: result should be 16bit
o  Remove function name from error messages - to be similar to other
   SQL functions, and it does not match anyway the called function
o  remove couple junk lines

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

o  Support for RSA encryption
o  Big reorg to better separate generic and algorithm-specific code.
o  Regression tests for RSA.

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

o  Tom stuck a CVS id into file.  I doubt the usefulness of it,
   but if it needs to be in the file then rather at the end.
   Also tag it as comment for asciidoc.
o  Mention bytea vs. text difference
o  Couple clarifications

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

There is a choice whether to update it with pgp functions or
remove it.  I decided to remove it, updating is pointless.

I've tried to keep the core of pgcrypto relatively independent
from main PostgreSQL, to make it easy to use externally if needed,
and that is good.  Eg. that made development of PGP functions much
nicer.

But I have no plans to release it as generic library, so keeping such
doc
up-to-date is waste of time.  If anyone is interested in using it in
other products, he can probably bother to read the source too.

Commented source is another thing - I'll try to make another pass
over code to see if there is anything non-obvious that would need
more comments.

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

Marko Kreen
2005-08-13 02:06:21 +00:00
Tom Lane 80f6c35833 Remove contrib version of pg_autovacuum --- superseded by integrated
version.
2005-07-29 19:38:22 +00:00
Bruce Momjian 85e9a5a014 Move reindexdb from /contrib to /bin.
Euler Taveira de Oliveira
2005-07-29 15:13:11 +00:00
Bruce Momjian 46c5b4bf5d Remove dbsize mention. 2005-07-29 15:03:51 +00:00
Bruce Momjian 358a897fa1 Move dbsize functions into the backend. New functions:
pg_tablespace_size
	pg_database_size
	pg_relation_size
	pg_complete_relation_size
	pg_size_pretty

Remove /contrib/dbsize.

Dave Page
2005-07-29 14:47:04 +00:00
Tom Lane ac652466ec Partial fixes for contrib build on AIX: include -lm where needed.
Per Rocco Altier.
2005-07-24 23:30:10 +00:00
Tom Lane 3976899f29 Fix storage size for btree_gist interval indexes. Fix penalty
calculations for interval and time/timetz to behave sanely for both
integer and float timestamps; up to now I think it's been doing
something pretty strange...
2005-07-21 04:15:04 +00:00
Bruce Momjian a45f4c2533 /contrib/btree_gist adjustments for new 'day' interval value. 2005-07-20 18:17:39 +00:00
Tom Lane 24ce1438c0 pgcrypto documentation update. Marko Kreen 2005-07-18 17:17:12 +00:00
Tom Lane 35c675a7fd Fortuna fixes. Marko Kreen 2005-07-18 17:12:54 +00:00
Tom Lane 2787db9b1d Small cleanups for pgcrypto. Marko Kreen 2005-07-18 17:09:01 +00:00
Tom Lane dd4a190d18 Fix C++-style comments, per Rocco Altier. 2005-07-18 16:35:06 +00:00
Neil Conway 75c76e93c7 Mark xml2 CREATE FUNCTIONs as IMMUTABLE, and use the "STRICT" syntax
rather than the deprecated "WITH (isStrict)" syntax. Patch from Ilia
Kantor, minor editorializing by Neil Conway.
2005-07-14 07:12:27 +00:00
Tom Lane 807bbe6051 More pgcrypto fixes: handle long messages correctly, suppress
compiler warnings.  Marko Kreen and Kris Jurka.
2005-07-12 20:27:45 +00:00
Tom Lane a1a64bb7c3 Further tweaking of Win32-specific random code. Marko Kreen 2005-07-11 19:06:46 +00:00
Tom Lane e82f7e9e7e I forgot to update win32 code when doing a renaming in random.c.
Marko Kreen
2005-07-11 17:00:03 +00:00
Tom Lane 067a5cdb35 Avoid bzero/bxopy in favor of more standard library routines.
Marko Kreen
2005-07-11 15:40:38 +00:00
Tom Lane e997758cb6 More pgcrypto fixes: avoid bogus alignment assumptions in sha2,
be more wary about having a value for BYTE_ORDER, clean up randomly-
chosen ways of including Postgres core headers.
Marko Kreen and Tom Lane
2005-07-11 15:07:59 +00:00
Tom Lane 3c52d17fa6 Add support for AES cipher with older OpenSSL libraries.
Marko Kreen
2005-07-11 14:38:05 +00:00
Bruce Momjian 2e330699fa > One more failure:
>
> I think this is because we don't have -lz in SHLIB_LINK.
> Following patch fixes it.

Marko Kreen
2005-07-10 18:32:55 +00:00
Bruce Momjian 21634e513f Add extra argument for new pg_regexec API. 2005-07-10 18:31:59 +00:00
Tom Lane aacfeba61b Suppress compile warning. 2005-07-10 17:22:54 +00:00
Bruce Momjian 6e1004f0fd Remove #include <openssl/bn.h> as compile fix.
Marko Kreen
2005-07-10 15:37:03 +00:00
Bruce Momjian d51df91897 As Kris Jurka found out, pgcrypto does not work with
OpenSSL 0.9.6x.  The DES functions use the older 'des_'
API, but the newer 3DES functions use the 0.9.7x-only
'DES_' API.

I think I just used /usr/include/openssl/des.h for reference
when implementing them, and had upgraded OpenSSL in the
meantime.

Following patch converts DES also to newer API and provides
compatibility functions for OpenSSL < 0.9.7.

I chose this route because:

- openssl.c uses few DES functions.
- compatibility for old 'des_' API is going away at some point
  of time from OpenSSL.
- as seen from macros, new API is saner
- Thus pgcrypto supports any OpenSSL version from 0.9.5 to 1.0

Tested with OpenSSL 0.9.6c and 0.9.7e.

Marko Kreen
2005-07-10 13:54:34 +00:00
Bruce Momjian e94dd6ab91 Add missing pgcrypto files from previous commit. 2005-07-10 13:46:29 +00:00