Commit Graph

1111 Commits

Author SHA1 Message Date
Teodor Sigaev e8c81e179e Improve word parser.
- improve file and path recognition
 - fix misspeling
 - improve tag recognition
2005-12-05 18:13:22 +00:00
Tatsuo Ishii baa6b22fcb Having blank lines in -f scripts was causing silent failures.
per David Fetter
2005-11-23 12:19:12 +00:00
Bruce Momjian aac96b8994 Fix pgindent of libpq-fe.h by hacking pgindent script.
Remove pgbench comment that was causing problems.
2005-11-23 04:23:30 +00:00
Bruce Momjian 436a2956d8 Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.
2005-11-22 18:17:34 +00:00
Teodor Sigaev 3c6cd8a113 Fixes motivated by snake and spoonbill pgbuildfarm members 2005-11-22 09:01:35 +00:00
Teodor Sigaev 62699337bc remove forgotten // comments 2005-11-21 18:00:52 +00:00
Teodor Sigaev c52795d18a Text parser rewritten:
- supports multibyte encodings
        - more strict rules for lexemes
        - flex isn't used
Add:
        - tsquery plainto_tsquery(text)
          Function makes tsquery from plain text.
        - &&, ||, !! operation for tsquery for combining
          tsquery from it's parts:  'foo & bar' || 'asd' => 'foo & bar | asd'
2005-11-21 12:27:57 +00:00
Tom Lane 8ef289dba1 Defend against nulls-in-arrays in contrib/intarray. I may have put in
more tests than strictly necessary, but did not feel like tracing call
paths in detail ...
2005-11-19 03:00:09 +00:00
Tom Lane 25c00833cb Add defenses against nulls-in-arrays to contrib/ltree. Possibly it'd
be useful to actually do something with nulls, rather than reject them,
but I'll just close the hole for now.
2005-11-19 02:08:45 +00:00
Tom Lane 1d0d8d3c38 Mop-up for nulls-in-arrays patch: fix some places that access array
contents directly.
2005-11-18 02:38:24 +00:00
Tom Lane cecb607559 Make SQL arrays support null elements. This commit fixes the core array
functionality, but I still need to make another pass looking at places
that incidentally use arrays (such as ACL manipulation) to make sure they
are null-safe.  Contrib needs work too.
I have not changed the behaviors that are still under discussion about
array comparison and what to do with lower bounds.
2005-11-17 22:14:56 +00:00
Tatsuo Ishii 2feb930af6 Fix comment on -v option 2005-11-16 13:13:08 +00:00
Teodor Sigaev 08ee64ebf5 Remove usage of ArrayType->flags field, use pgsql's macros BITS_PER_BYTE instead
of self-defined macros, add limit of Array  to gist__int_ops. BTW, intarray now
doesn't support NULLs in arrays.
2005-11-14 16:11:37 +00:00
Teodor Sigaev bad1a5c217 Use postgres-wide macros BITS_PER_BYTE instead self-definenig macros, also use it for calculating bit length of TPQTGist 2005-11-14 14:44:06 +00:00
Teodor Sigaev 34b934f658 fix returning value 2005-11-14 09:59:13 +00:00
Teodor Sigaev 134bed8089 Fix rwrite(ARRAY) on 64-bit boxes:
Instead of getting elements of array manually call deconstruct_array
2005-11-09 09:26:04 +00:00
Teodor Sigaev 0645663e6c New features for tsearch2:
1 Comparison operation for tsquery
2 Btree index on tsquery
3 numnode(tsquery) - returns 'length' of tsquery
4 tsquery @ tsquery, tsquery ~ tsquery - contains, contained for tsquery.
  Note: They don't gurantee exact result, only MAY BE, so it
  useful only for speed up rewrite functions
5 GiST index support for @,~
6 rewrite():
        select rewrite(orig, what, to);
        select rewrite(ARRAY[orig, what, to]) from tsquery_table;
        select rewrite(orig, 'select what, to from tsquery_table;');
7 significantly improve cover algorithm
2005-11-08 17:08:46 +00:00
Tom Lane 2a8d3d83ef R-tree is dead ... long live GiST. 2005-11-07 17:36:47 +00:00
Teodor Sigaev 6812abb673 Fix incorrect header size macros 2005-11-03 18:16:31 +00:00
Tom Lane da9fc25909 pgcrypto documentation polishing from Marko Kreen, and a small amount
of copy-editing from myself.
2005-11-03 02:54:07 +00:00
Teodor Sigaev 1dd6bd19fa Add sanity check of query 2005-10-31 13:47:09 +00:00
Tom Lane 9ee0a7df50 Fix some allocation size calculation errors that would cause pgbench
to fail with large test scripts.
2005-10-29 19:38:07 +00:00
Teodor Sigaev 21b748e76a 1 Fix problem with lost precision in rank with OR-ed lexemes
2 Allow tsquery_in to input void tsquery: resolve dump/restore problem with tsquery
2005-10-28 13:05:06 +00:00
Joe Conway 056eb1412c When a cursor is opened using dblink_open, only start a transaction
if there isn't one already open. Upon dblink_close, only commit
the open transaction if it was started by dblink_open, and only
then when all cursors opened by dblink_open are closed. The transaction
accounting is done individually for all named connections, plus
the persistent unnamed connection.
2005-10-18 02:55:49 +00:00
Tom Lane c62b29a603 Fix several contrib makefiles that failed in VPATH builds, particularly
when not using gcc (which has slightly nonstandard inclusion rules).
2005-10-18 01:30:49 +00:00
Tom Lane ad148c4154 Suppress warnings on platforms where fprintf is a macro (eg, recent
Fedora).  This was already done by somebody for the core flex files,
but these contrib files seem to have been missed.
2005-10-15 20:37:36 +00:00
Tom Lane b562639561 Fix bogus error test in get_ti_Oid(). 2005-10-15 20:28:59 +00:00
Tom Lane 0631059c9c Fix unportable struct initializations. 2005-10-15 20:24:00 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Bruce Momjian 3af21fa568 Mark xslt_process() as volatile. 2005-10-13 16:10:14 +00:00
Bruce Momjian 40e1b30f63 Change xpath_table() and xslt_process() from IMMUTABLE to STABLE. 2005-10-13 14:58:33 +00:00
Bruce Momjian 7d43349ab5 Fix capitalization of example. 2005-10-13 14:44:58 +00:00
Tom Lane 07eeb9d109 Do all accesses to shared buffer headers through volatile-qualified
pointers, to ensure that compilers won't rearrange accesses to occur
while we're not holding the buffer header spinlock.  It's probably
not necessary to mark volatile in every single place in bufmgr.c,
but better safe than sorry.  Per trouble report from Kevin Grittner.
2005-10-12 16:45:14 +00:00
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