Commit Graph

673 Commits

Author SHA1 Message Date
Bruce Momjian 81631ac435 Fixes for intagg regression tests to match new array internal handling.
mlw
2002-09-02 06:28:06 +00:00
Bruce Momjian f68fe6716c In case Florian and I don't finish his changes to this contrib before
beta, at least get this stuff in.

ftipatch.txt - Updates to docs and scripts.  Run in the fulltextindexdir
WARNING - Add to fulltextindex dir
uninstall.sql - Add to fulltextindex dir
2002-09-02 06:27:04 +00:00
Bruce Momjian 7b8eb0b4f1 Attached is a fairly sizeable update to contrib/dblink. I'd love to get
review/feedback if anyone is interested and can spend the time. But I'd
also love to get this committed and address changes as incremental
patches ;-), so if there are no objections, please apply.

Below I'll give a synopsis of the changes. More detailed descriptions
are now in a new doc directory under contrib/dblink. There is also a new

dblink.test.sql file which will give a pretty good overview of the
functions and their use.

Joe Conway
2002-09-02 06:13:31 +00:00
Bruce Momjian a12b4e279b I checked all the previous string handling errors and most of them were
already fixed by You. However there were a few left and attached patch
should fix the rest of them.

I used StringInfo only in 2 places and both of them are inside debug
ifdefs. Only performance penalty will come from using strlen() like all
the other code does.

I also modified some of the already patched parts by changing
snprintf(buf, 2 * BUFSIZE, ... style lines to
snprintf(buf, sizeof(buf), ... where buf is an array.

Jukka Holappa
2002-09-02 06:11:43 +00:00
Bruce Momjian 6aa4482f2f Attached is an update to contrib/tablefunc. It introduces a new
function, connectby(), which can serve as a reference implementation for

the changes made in the last few days -- namely the ability of a
function to return an entire tuplestore, and the ability of a function
to make use of the query provided "expected" tuple description.

Description:

   connectby(text relname, text keyid_fld, text parent_keyid_fld,
     text start_with, int max_depth [, text branch_delim])
   - returns keyid, parent_keyid, level, and an optional branch string
   - requires anonymous composite type syntax in the FROM clause. See
     the instructions in the documentation below.

Joe Conway
2002-09-02 05:44:05 +00:00
Tom Lane c7a165adc6 Code review for HeapTupleHeader changes. Add version number to page headers
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
per earlier discussion.  Simplify scheme for overlaying fields in tuple
header (no need for cmax to live in more than one place).  Don't try to
clear infomask status bits in tqual.c --- not safe to do it there.  Don't
try to force output table of a SELECT INTO to have OIDs, either.  Get rid
of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
has already caused one recent failure.  Improve documentation.
2002-09-02 01:05:06 +00:00
Tom Lane d803de50d4 intagg subdirectory was missing. 2002-08-30 01:44:00 +00:00
Tom Lane e107f3a7e3 PL/pgSQL functions can return sets. Neil Conway's patch, modified so
that the functionality is available to anyone via ReturnSetInfo, rather
than hard-wiring it to PL/pgSQL.
2002-08-30 00:28:41 +00:00
Bruce Momjian dbc4d615ca Add cube changes file. 2002-08-29 23:05:03 +00:00
Bruce Momjian 32784cddf1 The changes I have made are described in CHANGES. This was based on
diffs to 7.3-devel and may not be applicable to 7.2. I have included a
change covered by a previous bugfix patch I submitted (the problem with
-.1 not being accepted by cube_in). It does not include a fix for the
potential buffer overrun issue I reported for cube_yyerror in
cubeparse.y.


Bruno Wolff III
2002-08-29 23:03:58 +00:00
Peter Eisentraut 6d27cfdd89 Make pg_resetxlog options parsing more standard and prepare messages for
translation.
2002-08-29 22:19:03 +00:00
Bruce Momjian 1761990e38 please apply small patch for README.tsearch.
I've documented space usage and using CLUSTER command

Oleg Bartunov
2002-08-29 19:55:26 +00:00
Tom Lane e4186762ff Adjust nodeFunctionscan.c to reset transient memory context between calls
to the table function, thus preventing memory leakage accumulation across
calls.  This means that SRFs need to be careful to distinguish permanent
and local storage; adjust code and documentation accordingly.  Patch by
Joe Conway, very minor tweaks by Tom Lane.
2002-08-29 17:14:33 +00:00
D'Arcy J.M. Cain 5f97dc3e7c chkpass_rout returns text so change PG_RETURN_CSTRING to PG_RETURN_TEXT_P.
This is currently a cosmetic difference but I make the change now in case
the macros diverge one day.
2002-08-29 12:18:20 +00:00
Tom Lane 64505ed58b Code review for standalone composite types, query-specified composite
types, SRFs.  Not happy with memory management yet, but I'll commit these
other changes.
2002-08-29 00:17:06 +00:00
Tom Lane 7483749d82 Improve description of tablefunc. 2002-08-28 22:05:46 +00:00
Tom Lane 5cabcfccce Modify array operations to include array's element type OID in the
array header, and to compute sizing and alignment of array elements
the same way normal tuple access operations do --- viz, using the
tupmacs.h macros att_addlength and att_align.  This makes the world
safe for arrays of cstrings or intervals, and should make it much
easier to write array-type-polymorphic functions; as examples see
the cleanups of array_out and contrib/array_iterator.  By Joe Conway
and Tom Lane.
2002-08-26 17:54:02 +00:00
Tatsuo Ishii cf7ee638a7 Adapt for SRF(Set Returning Function). 2002-08-23 08:19:49 +00:00
Bruce Momjian 52ee800ed3 Patch resolve ERROR problem for non-goog query_txt.
Teodor Sigaev
2002-08-23 02:56:36 +00:00
Tom Lane ceb9e60e8e Update contrib regression tests for OPAQUE datatype changes. 2002-08-23 00:04:52 +00:00
Tom Lane b663f3443b Add a bunch of pseudo-types to replace the behavior formerly associated
with OPAQUE, as per recent pghackers discussion.  I still want to do some
more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
of the changes now before the tree starts shifting under me ...
2002-08-22 00:01:51 +00:00
Tom Lane e1b040a7c3 Fix potential buffer overrun in cube_out(), per report from
Bruno Wolff.
2002-08-18 20:15:52 +00:00
Tom Lane 675a7b8280 Cleanup. 2002-08-17 04:06:48 +00:00
Bruce Momjian 6945ea3445 Move pg_controldata to /bin. 2002-08-17 02:43:08 +00:00
Bruce Momjian cd1f4087c9 Move pg_controldata from /contrib to src/bin. 2002-08-16 20:34:06 +00:00
Bruce Momjian 2860041bf0 August 13, 2002
Use parser of OpenFTS v0.33.

--
Teodor Sigaev
2002-08-15 03:02:08 +00:00
Bruce Momjian 66eb8df6a4 The attached patch changes most of the usages of sprintf() to
snprintf() in contrib/. I didn't touch the places where pointer
arithmatic was being used, or other areas where the fix wasn't
trivial. I would think that few, if any, of the usages of sprintf()
were actually exploitable, but it's probably better to be paranoid...

Neil Conway
2002-08-15 02:58:29 +00:00
Bruce Momjian 45e2544584 As discussed on several occasions previously, the new anonymous
composite type capability makes it possible to create a system view
based on a table function in a way that is hopefully palatable to
everyone. The attached patch takes advantage of this, moving
show_all_settings() from contrib/tablefunc into the backend (renamed
all_settings(). It is defined as a builtin returning type RECORD. During
initdb a system view is created to expose the same information presently
available through SHOW ALL. For example:

test=# select * from pg_settings where name like '%debug%';
          name          | setting
-----------------------+---------
  debug_assertions      | on
  debug_pretty_print    | off
  debug_print_parse     | off
  debug_print_plan      | off
  debug_print_query     | off
  debug_print_rewritten | off
  wal_debug             | 0
(7 rows)


Additionally during initdb two rules are created which make it possible
to change settings by updating the system view -- a "virtual table" as
Tom put it. Here's an example:

Joe Conway
2002-08-15 02:51:27 +00:00
Bruce Momjian 106c733c34 Spacing improvement. 2002-08-14 03:01:43 +00:00
Bruce Momjian 87cfb8eb29 Fixed very stupid but important bug: mixing calls of some founctions from
contrib/tsearch and contrib/ltree :)

Teodor Sigaev
2002-08-10 20:46:24 +00:00
Bruce Momjian be2de3b9c8 The patch solves this problem, I hope...
Christopher Kings-Lynne wrote:
> I'm still getting ltree failures on 64bit freebsd:
>
> sed 's,MODULE_PATHNAME,$libdir/ltree,g' ltree.sql.in >ltree.sql
> gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
> C -DLOWER_NODE -I. -I../../src/include   -c -o ltree_io.o ltree_io.c -MMD
> ltree_io.c: In function `ltree_in':
> ltree_io.c:57: warning: int format, different type arg (arg 3)
> ltree_io.c:63: warning: int format, different type arg (arg 4)
> ltree_io.c:68: warning: int format, different type arg (arg 3)

Teodor Sigaev
2002-08-10 20:45:48 +00:00
Bruce Momjian 181ca96e7a August 6, 2002
1. Reworked patch from Andrey Oktyabrski (ano@spider.ru) with
      functions: icount, sort, sort_asc, uniq, idx, subarray
      operations: #, +, -, |, &

FUNCTIONS:

  int   icount(int[]) - the number of elements in intarray
  int[] sort(int[], 'asc' | 'desc') - sort intarray
  int[] sort(int[]) - sort in ascending order
  int[] sort_asc(int[]),sort_desc(int[]) - shortcuts for sort
  int[] uniq(int[]) - returns unique elements
  int   idx(int[], int item) - returns index of first intarray matching element
                               to item, or '0' if matching failed.
  int[] subarray(int[],int START [, int LEN]) - returns part of intarray
                               starting from element number START (from 1)
                               and length LEN.
OPERATIONS:

  int[] && int[]  - overlap - returns TRUE if arrays has at least one common elements.
  int[] @  int[]  - contains - returns TRUE if left array contains right array
  int[] ~ int[]   - contained - returns TRUE if left array is contained in right array
  # int[]         - return the number of elements in array
  int[] + int     - push element to array ( add to end of array)
  int[] + int[]   - merge of arrays (right array added to the end of left one)
  int[] - int     - remove entries matched by right argument from array
  int[] - int[]   - remove left array from right
  int[] | int     - returns intarray - union of arguments
  int[] | int[]   - returns intarray as a union of two arrays
  int[] & int[]   - returns intersection of arrays

Oleg Bartunov
2002-08-10 20:38:29 +00:00
Tom Lane 4ab8e69094 has_table_privilege spawns scions has_database_privilege, has_function_privilege,
has_language_privilege, has_schema_privilege to let SQL queries test
all the new privilege types in 7.3.  Also, add functions pg_table_is_visible,
pg_type_is_visible, pg_function_is_visible, pg_operator_is_visible,
pg_opclass_is_visible to test whether objects contained in schemas are
visible in the current search path.  Do some minor cleanup to centralize
accesses to pg_database, as well.
2002-08-09 16:45:16 +00:00
Bruce Momjian 34f03b1630 Patch for current CVS. It add test of lca() to ltree test suite.
Teodor Sigaev
2002-08-06 05:35:29 +00:00
Bruce Momjian 4132106055 Tom Lane:
>       please find attached patch to current CVS ( contrib/ltree)
>       Version for 7.2 is distributed as separate package -

I believe that patch also intended to remove contrib/ltree/patch.72
2002-08-04 05:12:43 +00:00
Bruce Momjian 978c8c6d2f please find attached patch to current CVS ( contrib/ltree )
Changes:

July 31, 2002
   Now works on 64-bit platforms.
   Added function lca - lowest common ancestor
   Version for 7.2 is distributed as separate package -
   http://www.sai.msu.su/~megera/postgres/gist/ltree/ltree-7.2.tar.gz

Oleg Bartunov
2002-08-04 05:02:50 +00:00
Bruce Momjian ce3d087010 This patch adds support for inet[] arrays to the /contrib/array module.
Neil Conway
2002-08-04 04:25:02 +00:00
Tom Lane 38bb77a5d1 ALTER TABLE DROP COLUMN works. Patch by Christopher Kings-Lynne,
code review by Tom Lane.  Remaining issues: functions that take or
return tuple types are likely to break if one drops (or adds!)
a column in the table defining the type.  Need to think about what
to do here.

Along the way: some code review for recent COPY changes; mark system
columns attnotnull = true where appropriate, per discussion a month ago.
2002-08-02 18:15:10 +00:00
Tom Lane 45e584a445 Replace ad-hoc insertions into pg_opclass and friends with CREATE
OPERATOR CLASS commands.
2002-07-30 18:48:34 +00:00
Tom Lane 65b6868b13 Replace ad-hoc insertions into pg_opclass and friends with CREATE
OPERATOR CLASS commands.  Further tweaking of documentation for same.
2002-07-30 17:34:37 +00:00
Tom Lane ea2d97414c Use Max/Min macros, not MAX/MIN, to eliminate portability issues. 2002-07-30 17:32:10 +00:00
Bruce Momjian 1dedbf2da5 Add ltree data type to contrib, from Teodor Sigaev and Oleg Bartunov. 2002-07-30 16:40:34 +00:00
Tom Lane 9f1fc1080e Since we're depending on %option noyywrap in the main scanner now,
we may as well use it in all our flex files.  Make all the flex files
have a consistent set of options.
2002-07-30 16:33:08 +00:00
Bruce Momjian 74780590d8 Add tablefunc to contrib makefile. 2002-07-30 16:32:20 +00:00
Bruce Momjian 41f862ba87 As mentioned above, here is my contrib/tablefunc patch. It includes
three functions which exercise the tablefunc API.

show_all_settings()
   - returns the same information as SHOW ALL, but as a query result

normal_rand(int numvals, float8 mean, float8 stddev, int seed)
   - returns a set of normally distributed float8 values
   - This routine implements Algorithm P (Polar method for normal
     deviates) from Knuth's _The_Art_of_Computer_Programming_, Volume 2,
     3rd ed., pages 122-126. Knuth cites his source as "The polar
     method", G. E. P. Box, M. E. Muller, and G. Marsaglia,
     _Annals_Math,_Stat._ 29 (1958), 610-611.

crosstabN(text sql)
   - returns a set of row_name plus N category value columns
   - crosstab2(), crosstab3(), and crosstab4() are defined for you,
     but you can create additional crosstab functions per directions
     in the README.

Joe Conway
2002-07-30 16:31:11 +00:00
Tom Lane ea4686e3e1 Implement CREATE/DROP OPERATOR CLASS. Work still remains: need more
documentation (xindex.sgml should be rewritten), need to teach pg_dump
about it, need to update contrib modules that currently build pg_opclass
entries by hand.  Original patch by Bill Studenmund, grammar adjustments
and general update for 7.3 by Tom Lane.
2002-07-29 22:14:11 +00:00
Peter Eisentraut b0c3c48eb3 Assemble portability modules into libpgport library.
Some makefile simplifications.
2002-07-27 20:10:05 +00:00
Bruce Momjian b0f5086e41 oid is needed, it is added at the end of the struct (after the null
bitmap, if present).

Per Tom Lane's suggestion the information whether a tuple has an oid
or not is carried in the tuple descriptor.  For debugging reasons
tdhasoid is of type char, not bool.  There are predefined values for
WITHOID, WITHOUTOID and UNDEFOID.

This patch has been generated against a cvs snapshot from last week
and I don't expect it to apply cleanly to current sources.  While I
post it here for public review, I'm working on a new version against a
current snapshot.  (There's been heavy activity recently; hope to
catch up some day ...)

This is a long patch;  if it is too hard to swallow, I can provide it
in smaller pieces:

Part 1:  Accessor macros
Part 2:  tdhasoid in TupDesc
Part 3:  Regression test
Part 4:  Parameter withoid to heap_addheader
Part 5:  Eliminate t_oid from HeapTupleHeader

Part 2 is the most hairy part because of changes in the executor and
even in the parser;  the other parts are straightforward.

Up to part 4 the patched postmaster stays binary compatible to
databases created with an unpatched version.  Part 5 is small (100
lines) and finally breaks compatibility.

Manfred Koizar
2002-07-20 05:16:59 +00:00
Tatsuo Ishii cdf4b9aff2 Apply patches from Neil Conway.
> Hi Tatsuo,
>
> I've attached a patch for the version of pgbench in CVS. It includes the
> following changes:
>
>     - fix some spelling mistakes, indentation stuff, etc.
>
>     - minor code cleanup -- (void) args instead of (), etc.
>
>     - allocate the state array dynamically, so that it is only as
>     large as needed. This reduces the memory consumption of pgbench
>     slightly, and makes a larger MAXCLIENTS setting possible
>
>     - (the only controversial change) add an option "-l" to log
>     transaction latencies to a file. The "transaction latency"
>     is the time between when the BEGIN is issued and the transaction
>     commits. This is written to a file, along with the client #
>     and the transaction #. The data in the file can then be used
>     for things like:
>
>         - consistency analysis: is the TPS the same through the
>         entire run of pgbench, or does it change?
>
>         - more detailed stats: what is the average latency, worse-case
>         latency, best-case latency?
>
>         - graphs: feed the data to gnuplot, graph latency versus. time
>
>         - etc.
>
>     I was going to store this data in memory and write it to disk
>     at the end of the pgbench run, but that isn't feasible because
>     the data can be very large: for example, ~70MB if benchmarking
>     128 clients doing 100,000 transactions each.
>
> Cheers,
>
> Neil
2002-07-20 03:02:01 +00:00
Bruce Momjian a5a8110a86 Contrib port/ usage is same as others so no need for rules. 2002-07-18 04:33:39 +00:00
Bruce Momjian 7f43165dd2 Make src/backend/port/*.c file location dependent only on configure.in. 2002-07-18 03:59:49 +00:00
Bruce Momjian b52790b069 Add comment for isbn,issn data type, from Pete St. Onge 2002-07-16 00:48:30 +00:00
Thomas G. Lockhart fe92e018d7 Add a few new lines to display recently added fields in the ControlFile
structure.
Now includes the following new fields:
 integer/float date/time storage
 maximum length of names (+1; they must also include a null termination)
 maximum number of function arguments
 maximum length of locale name
2002-07-05 15:31:16 +00:00
Bruce Momjian 0a4e3577f4 Cleanup. 2002-07-05 00:29:34 +00:00
Bruce Momjian c3c54a21b6 Disable pg_upgrade for 7.3. 2002-07-03 14:38:19 +00:00
Bruce Momjian 68913b0fbb Link dbmirror into /contrib system. 2002-06-23 22:15:04 +00:00
Bruce Momjian d64b97ae37 Add dbmirror to /contrib. Minor C cleanups and Makefile.
Steven Singer
2002-06-23 21:58:08 +00:00
Bruce Momjian eb4e4fd262 Add indexing for isbn and issn.
Dan Weston
2002-06-23 21:20:38 +00:00
Bruce Momjian 8bd0bedb62 Update dbsize documentation with:
Copy this directory to contrib/dbsize in your PostgreSQL source tree.
Then just run make; make install.  Finally, load the functions into any
database using dbsize.sql.

When computing the size of a table, it does not include TOAST or index
disk space.
2002-06-23 20:09:23 +00:00
Bruce Momjian a0361c46e6 Rename command to reindexdb, for consistency. 2002-06-23 03:51:55 +00:00
Bruce Momjian 30be6c23c1 Handle mixed-case names in reindex script.
Document need for reindex in SGML docs.
2002-06-23 03:37:12 +00:00
Bruce Momjian a8a1f15877 uint -> uint32, portability. 2002-06-22 04:08:07 +00:00
Bruce Momjian 41400d66aa Add mention of segmented files to oid2name. 2002-06-21 19:48:18 +00:00
Bruce Momjian 485fc354e1 Add reindex utility to /contrib.
Shaun Thomas                   <sthomas@townnews.com>
2002-06-21 19:34:18 +00:00
Bruce Momjian d84fe82230 Update copyright to 2002. 2002-06-20 20:29:54 +00:00
Bruce Momjian 2ed878d31d Mention vacuum for relpages. 2002-06-13 00:54:05 +00:00
Bruce Momjian 9bba67aa9b Add script to show disk space per db. 2002-06-13 00:21:52 +00:00
Bruce Momjian 4f8795eb71 Improve query. 2002-06-12 23:42:48 +00:00
Bruce Momjian 7e20a2e74f Add mention of query showing pages used. 2002-06-12 23:41:50 +00:00
Bruce Momjian 5a8f555e41 Add -q option to oid2name. Add sample session to README. 2002-06-12 21:09:09 +00:00
Bruce Momjian 74a8af099f Please apply attached patch to contrib/intarray (7.2, 7.3).
Fixed bug with '=' operator for gist__int_ops and
     define '=' operator for gist__intbig_ops opclass.
     Now '=' operator is consistent with standard 'array' type.

     Thanks Achilleus Mantzios for bug report and suggestion.

Oleg Bartunov
2002-06-07 21:52:33 +00:00
Tom Lane de1f586f09 Fix a bug with building rtree_gist indexes.
Patch from Teodor Sigaev.
2002-05-28 15:24:53 +00:00
Tom Lane d15b1e1791 Update dblink to work with qualified relation names.
From Joe Conway.
2002-05-27 21:59:12 +00:00
Tom Lane 44fbe20d62 Restructure indexscan API (index_beginscan, index_getnext) per
yesterday's proposal to pghackers.  Also remove unnecessary parameters
to heap_beginscan, heap_rescan.  I modified pg_proc.h to reflect the
new numbers of parameters for the AM interface routines, but did not
force an initdb because nothing actually looks at those fields.
2002-05-20 23:51:44 +00:00
Tatsuo Ishii 0d7c58a977 Update docs about new -N option 2002-05-20 05:07:28 +00:00
Tom Lane 8338cc03a8 Remove the last traces of datatypes datetime and timespan. 2002-05-03 04:11:08 +00:00
Tom Lane 52200befd0 Implement types regprocedure, regoper, regoperator, regclass, regtype
per pghackers discussion.  Add some more typsanity tests, and clean
up some problems exposed thereby (broken or missing array types for
some built-in types).  Also, clean up loose ends from unknownin/out
patch.
2002-04-25 02:56:56 +00:00
Bruce Momjian 7f459808de I've improved the contributed vacuumlo command, now it behaves like all other
postgres command line utilites e.g. supports -U, -p, -h, -?, -v, password
prompt and has a "test mode". In test mode, no large objects are removed,
just reported.

Mario Weilguni
2002-04-24 02:45:51 +00:00
Bruce Momjian 3bf6b8f06a Attached is an update to contrib/dblink. Please apply if there are no
objections.

Major changes:
   - removed cursor wrap around input sql to allow for remote
     execution of INSERT/UPDATE/DELETE
   - dblink now returns a resource id instead of a real pointer
   - added several utility functions

I'm still hoping to add explicit cursor open/fetch/close support before
7.3 is released, but I need a bit more time on that.

On a somewhat unrelated topic, I never got any feedback on the
unknownin/out patch and the mb_substring patch. Is there anything else I
need to do to get those applied?

Joe Conway
2002-04-24 02:28:28 +00:00
Bruce Momjian 450e728d24 Update to my2pg 1.24. 2002-04-24 01:42:29 +00:00
Tom Lane 27a54ae282 Opclasses live in namespaces. I also took the opportunity to create
an 'opclass owner' column in pg_opclass.  Nothing is done with it at
present, but since there are plans to invent a CREATE OPERATOR CLASS
command soon, we'll probably want DROP OPERATOR CLASS too, which
suggests that a notion of ownership would be a good idea.
2002-04-17 20:57:57 +00:00
Bruce Momjian c419c22414 Update pg_upgrade for 7.3. 2002-04-09 18:07:24 +00:00
Bruce Momjian d61c7886e8 Update to new version of Oracle conversion utility, version 1.8.
Gilles DAROLD
2002-04-04 05:55:57 +00:00
Tom Lane 688781d450 Fix contrib/dbsize for schema-qualified table names. 2002-04-02 01:17:28 +00:00
Tom Lane 5f4745adf4 Further cleanups for relations in schemas: teach nextval and other
sequence functions how to cope with qualified names.  Same code is
also used for int4notin, currtid_byrelname, pgstattuple.  Also,
move TOAST tables into special pg_toast namespace.
2002-03-30 01:02:42 +00:00
Bruce Momjian 14d542bc67 > > Users of contrib/tsearch needs after upgrading of module (compiling, installing)
> > to perform sql command:
> >  update pg_amop set amopreqcheck = true where amopclaid =
> >       (select oid from pg_opclass where opcname = 'gist_txtidx_ops');
>
> Oleg, sorry, I don't understand where this should appear.  In the README
> file, and if so, where?  Is this something only for people upgrading
> from 7.2?

Sorry Bruce, I was unclear. I have attached patch to Readme.tsearch
Also, It'd be worth to mention in Changes to point users of tsearch
about importang upgrade notices.

Oleg Bartunov
2002-03-19 14:15:55 +00:00
Bruce Momjian 99c8581f5a > > Users of contrib/tsearch needs after upgrading of module (compiling, installing)
> > to perform sql command:
> >  update pg_amop set amopreqcheck = true where amopclaid =
> >       (select oid from pg_opclass where opcname = 'gist_txtidx_ops');
>
> Oleg, sorry, I don't understand where this should appear.  In the README
> file, and if so, where?  Is this something only for people upgrading
> from 7.2?

Sorry Bruce, I was unclear. I have attached patch to Readme.tsearch
Also, It'd be worth to mention in Changes to point users of tsearch
about importang upgrade notices.

Oleg Bartunov
2002-03-19 14:14:44 +00:00
Bruce Momjian cdfe4bb64f Pleas apply it for 7.2.1 and current CVS.
Patch fixes using lc.lang instead of lc.lc_ctype.

Teodor Sigaev
2002-03-11 16:54:27 +00:00
Bruce Momjian 29731df471 Back out this for Peter:
>       This simple patch fixes broken Makefile, broken ApplySnapshot and
>       makes all utilities honour --verbose command line option.
>
>       --
>       Yours, Alexey V. Borzov, Webmaster of RDW.ru
>
2002-03-11 04:39:14 +00:00
Bruce Momjian 0df1dc6aaf This simple patch fixes broken Makefile, broken ApplySnapshot and
makes all utilities honour --verbose command line option.

--
Yours, Alexey V. Borzov, Webmaster of RDW.ru
2002-03-06 20:41:36 +00:00
Bruce Momjian 92288a1cf9 Change made to elog:
o  Change all current CVS messages of NOTICE to WARNING.  We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.

o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.

o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.

o Remove INFO from the client_min_messages options and add NOTICE.

Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.

Regression passed.
2002-03-06 06:10:59 +00:00
Bruce Momjian 8fdc7814d0 Please, apply attached patch for contrib/tsearch to 7.2.1 and current
CVS. It  fix english stemmer's problem with ending words like
'technology'.

We have found one more bug in english stemmer. The bug is with
'irregular'  english words like 'skies' -> 'sky'. Please, apply attached
cumulative patch to  7.2.1 and current CVS instead previous one.

Thank to Thomas T. Thai <tom@minnesota.com> for hard testing. This kind
of bug  has significance only for dump/reload database and viewing, but
searching/indexing works right.

Teodor Sigaev
2002-03-05 06:10:28 +00:00
Bruce Momjian 66cd6a0fb2 Currently, contrib/oid2name doesn't bother to free() the memory that it
malloc()'s. This isn't too serious (because oid2name is a short-lived
utility, so the memory will soon be returned to the OS on process
termination), but I still think it's poor style.

This patch changes oid2name so that it allocates memory on the stack
where possible and free()s the remaining heap-allocated memory. The
patch also fixes a typo a comment and adds 'const' qualifiers to a few
'char *' function parameters.

Neil Conway
2002-03-05 05:54:07 +00:00
Tom Lane d6198ee3a5 Try to make makefile actually work ... 2002-02-25 04:16:58 +00:00
Bruce Momjian 17f9913922 Fix typo in Makefile. 2002-02-25 04:08:03 +00:00
Bruce Momjian 7464e7f25a Fix typo in filename. 2002-02-25 03:59:39 +00:00
Bruce Momjian 2146d8c6a0 Add integer aggregator to /contrib.
mlw
2002-02-25 03:45:27 +00:00
Tatsuo Ishii 0c124c5731 Add -N option which disables updation of branches and tellers tables.
So there would be less contention with -N, that might be more realistic
test.
2002-02-24 00:17:57 +00:00
Bruce Momjian ad0787b2bd I've written on like that a while ago:
http://webmail.postgresql.org/~petere/dbsize.html

The tarball can be rolled into contrib -- now that I think of it I don't
know why I never did that.

Never imagined this would have anything to do with that TODO item,
though.
I figured oid2name accomplished that.

Peter Eisentraut   peter_e@gmx.net
2002-02-22 23:05:35 +00:00
Bruce Momjian 60555bd46c Please, apply attached patch of contrib/btree_gist to 7.2.1 and current
cvs.
The patch fixes memory leak during creation GiST index on timestamp
column.

Thank you.

--
Teodor Sigaev
teodor@stack.net
2002-02-22 05:47:50 +00:00
Bruce Momjian bc26fd76d9 More wording improvement. 2002-02-22 00:12:08 +00:00
Bruce Momjian 581599b903 Improve wording of meaning of /contrib directory. 2002-02-22 00:10:11 +00:00
Bruce Momjian c9361a7a9c Remove CHECKPOINT call from pgbench -- Not needed and affects performance. 2002-02-18 05:46:41 +00:00
Bruce Momjian 966e6478b5 Fix flag handling of pg_upgrade. 2002-02-11 15:19:33 +00:00
Bruce Momjian 8c7e1893c3 Upgrade my2pg version 1.23. 2002-02-08 14:47:56 +00:00
Tom Lane fe1a9c3362 Repair some problems in GIST-index contrib modules. Patch from
Teodor Sigaev <teodor@stack.net>.
2002-02-07 22:11:43 +00:00
Bruce Momjian a7ff4a7393 Add mention of recovery using pg_upgrade. 2002-01-31 19:13:53 +00:00
Bruce Momjian c69c25ba4d Update HISTORY/release.sgml for Monday release. 2002-01-31 18:31:44 +00:00
Tom Lane 7798b50c60 Remove gratuitous redefinition of inline, which should already have been
taken care of in pg_config.h.
2002-01-29 15:40:45 +00:00
Tom Lane 06f08209a9 Fix typo in usage message, per Oleg. 2002-01-25 15:40:13 +00:00
Bruce Momjian 85bc36158d Enable /contrib/pg_upgrade, mention little testing. 2002-01-18 04:38:46 +00:00
Bruce Momjian eb410b6bde Manual page improvements. 2002-01-15 05:41:55 +00:00
Bruce Momjian 08147fa7da More cleanups. 2002-01-15 05:10:57 +00:00
Bruce Momjian a73517cb8c Keep pg_upgrade as disabled. 2002-01-15 05:03:53 +00:00
Bruce Momjian 19cba1a775 More wording improvements. 2002-01-15 05:03:25 +00:00
Bruce Momjian fff981652e More updates. 2002-01-15 04:55:26 +00:00
Bruce Momjian 8e76187790 More cleanups with ideas from Peter. 2002-01-15 04:50:37 +00:00
Bruce Momjian 86beaf4fa0 Add Peter's portability and option suggestions. 2002-01-15 04:05:24 +00:00
Bruce Momjian ebf57dd082 Update permissions? 2002-01-14 22:54:44 +00:00
Bruce Momjian 309cbe494c Add README file. 2002-01-14 17:45:43 +00:00
Bruce Momjian 0451c09fd6 Doc improvements. 2002-01-14 17:42:42 +00:00
Bruce Momjian 15ca0a502c Add manual page to /contrib. SGML from docs. 2002-01-14 17:32:36 +00:00
Bruce Momjian 92a8bc9634 Move pg_upgrade to /contrib. Still need to make Peter's portability
changes.
2002-01-14 17:32:07 +00:00
Tom Lane 5c2d36c3dd Code review for latest changes. 2002-01-11 21:27:13 +00:00
Bruce Momjian 37c9346ef2 pg_resetxlog specifies log location in hex; more pg_upgrade testing
improvments.
2002-01-11 06:33:01 +00:00
Bruce Momjian 9ab1872ef4 Have pg_resetxlog -n return zero exit status. 2002-01-10 23:46:13 +00:00
Bruce Momjian c309873680 Remove 7.1beta WAL handling from /contrib/pg_resetxlog. 2002-01-10 23:40:58 +00:00
Bruce Momjian 4c0e9b5efc Add new -l flag to set checkpoint location for /contrib/pg_resetxlog. 2002-01-10 20:09:06 +00:00
Bruce Momjian 872aad61ff Per Tom, do full reset on -x flag. 2002-01-10 18:08:29 +00:00
Bruce Momjian f6e603cffa Add new -x XID option to /contrib/pg_resetxlog for future pg_upgrade use. 2002-01-10 17:51:52 +00:00
Tom Lane 92a2598f97 The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.
2002-01-10 01:11:45 +00:00
Bruce Momjian f88aa2d653 Update my2pg to version 1.22. 2002-01-07 22:36:51 +00:00
Tom Lane 6d6b3e911c Add variants of digest() and hmac() that accept text inputs.
Marko Kreen says:
This is so obvious that I would like to make it 'official'.

Seems like the theology around bytea<>text casting kept me from
seeing the simple :)
2002-01-07 18:56:09 +00:00
Bruce Momjian b490469cb9 > > On Fri, Dec 21, 2001 at 11:43:21AM +0800, Christopher Kings-Lynne
wrote:
> > > Just testing pgcrypto on freebsd/alpha.  I get some warnings:
> > They should be harmless, although I should fix them.
>
> The actual code is:
>
>     if ((dlen & 15) || (((unsigned) res) & 3))
>         return -1;

> Hard to imagine how (uint *) & 3 makes any sense, unless res isn't
> always a (uint8 *).  Is that true?

At some point it was casted to (uint32*) so I wanted to be sure its ok.
ATM its pointless.  Please apply the following patch.

--
marko
2002-01-03 07:21:48 +00:00
Bruce Momjian 6b086de31a Update dbase for Maarten.Boekhold. 2001-12-31 13:32:04 +00:00
Tom Lane ee051baeac Make sure that all <ctype.h> routines are called with unsigned char
values; it's not portable to call them with signed chars.  I recall doing
this for the last release, but a few more uncasted calls have snuck in.
2001-12-30 23:09:42 +00:00
Bruce Momjian 491545fff4 Do not require iconv for dbase conversion. 2001-12-21 05:29:46 +00:00
Bruce Momjian 3f94ff5400 Allow contrib/dbase to compile if HAVE_ICONV_H it not defined. This is
only a partial solution but a step in the right direction.
2001-12-21 04:30:59 +00:00
Bruce Momjian eb36cdd562 Add needed libiconv link to contrib/dbase, per Christopher Kings-Lynne 2001-12-21 04:13:12 +00:00
Tatsuo Ishii 71d641cf15 Reflect Tom's change 2001-12-20 01:56:08 +00:00
Tom Lane 897083715b Fix pgstattuple to acquire a read lock on the target table. This
prevents embarassments such as having the table dropped or truncated
partway through the scan.  Also, fix free space calculation to include
pages that currently contain no tuples.
2001-12-19 20:28:41 +00:00
Peter Eisentraut f9d87c66db Fix warning 2001-12-19 18:49:24 +00:00
Bruce Momjian cde5fae7c9 >>I confirmed the UNION hack is no longer required. Thanks! Is it too late
>>to change the README in contrib/dblink?
>>
>
> No, I don't think that's a problem.  Send a patch.
>

Here's a (documentation only) patch for the contrib/dblink README.

Joe Conway
2001-12-13 10:48:39 +00:00
Hiroshi Inoue aa82ac8ab2 Fix a lo_manage()'s bug. 2001-12-07 04:18:31 +00:00
Bruce Momjian 657499dbab We forgot to mention in README.rtree_gist we implemented new
picksplit algorithm for Rtree. Please apply patch below to CVS

Oleg Bartunov
2001-12-05 18:25:28 +00:00
Bruce Momjian 8f73bb4da9 * include <endian.h> is not enough, include sys/types.h too
everywhere.

At least it was now detected correctly.

marko
2001-11-30 17:39:20 +00:00
Bruce Momjian 8aa538cfd5 * When postgres.h does not define BYTE_ENDIAN pgcrypto
produces garbage.

I learned the hard way that

        #if UNDEFINED_1 == UNDEFINED_2
        #error "gcc is idiot"
        #endif

prints "gcc is idiot" ...

Affected are MD5/SHA1 in internal library, and also HMAC-MD5/HMAC-SHA1/
crypt-md5 which use them.  Blowfish is ok, also Rijndael on at
least x86.

Big thanks to Daniel Holtzman who send me a build log which
contained warning:

        md5.c:246: warning: `X' defined but not used

Yes, gcc is that helpful...

Please apply this.

--
marko
2001-11-29 19:40:37 +00:00
Bruce Momjian c9483cb6e4 This patch mark datatype txtidx as 'extended' storage type.
Thanks.

Teodor Sigaev
2001-11-26 17:45:41 +00:00
Tom Lane 56f5dc9078 Remove bogus pg_amop insertion commands, per discussion of 25-Oct.
No change in results of script, but perhaps less confusion for people
reading it.
2001-11-24 23:28:09 +00:00
Bruce Momjian 3345da53ad Update my2pg.pl for release. 2001-11-21 02:43:30 +00:00
Bruce Momjian c78975f845 Include sys/types.h in crypt-des.c. FreeBSD netinet/in.h
needs it.

Seems it is getting compileable...

Marko Kreen
2001-11-20 21:10:38 +00:00
Bruce Momjian 60f777606f Duh, my regexp's missed bunch of them. Here's next batch, this
should be all.

Marko Kreen
2001-11-20 18:54:07 +00:00
Bruce Momjian 540155b777 pgcrypto uses non-standard type uint, which causes compile
failures on FreeBSD.  This patch replaces uint -> unsigned.

This was reported by Daniel Holtzman against 0.4pre3 standalone
package, but it needs fixing in contrib/pgcrypto too.

Marko Kreen
2001-11-20 15:50:53 +00:00
Peter Eisentraut aff53b27f0 Make the yacc rules safe for parallel make. See discussion on pgsql-patches
and comment in src/backend/parser/Makefile for the technical details.
2001-11-16 16:32:33 +00:00
Bruce Momjian d4337f6a7c Read getopt() into an int, not char. 2001-11-15 18:40:52 +00:00
Bruce Momjian d7a343d5ce Add port number to pg_dumplo.
andrea gelmini
2001-11-12 17:44:14 +00:00
Bruce Momjian 149d13de74 When given oversized key, encrypt/decrypt corrupted
memory.  This fixes it.  Also a free() was missing.

marko
2001-11-08 15:56:58 +00:00
Bruce Momjian 62298f60b2 Add mention of another MySQL conversion tool. 2001-11-06 22:25:53 +00:00
Bruce Momjian ea08e6cd55 New pgindent run with fixes suggested by Tom. Patch manually reviewed,
initdb/regression tests pass.
2001-11-05 17:46:40 +00:00
Bruce Momjian c41b6b1b9c Fix small problem Tom Lane found with pgindent run. 2001-10-30 05:38:56 +00:00
Bruce Momjian cd01c32f55 Add trailing semicolon for Joe Conway 2001-10-29 19:41:54 +00:00
Bruce Momjian 6783b2372e Another pgindent run. Fixes enum indenting, and improves #endif
spacing.  Also adds space for one-line comments.
2001-10-28 06:26:15 +00:00
Bruce Momjian b81844b173 pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
2001-10-25 05:50:21 +00:00
Bruce Momjian fde8edaf53 Add do { ... } while (0) to more bad macros. 2001-10-25 01:29:37 +00:00
Bruce Momjian b4a57b0648 Add more missing 'do { ... } while (0)' in missing macros. Without it,
these macros fail in if/else cases:

#define X \
{ \
	... \
}


{

	if (...)
		X;
	else
		...
}

with proper setup:

#define X \
do { \
	... \
} while (0)

it works fine.
2001-10-25 00:55:48 +00:00
Tatsuo Ishii f8aa02eb85 "time" is now a reserved keyword(changed to "mtime"). 2001-10-24 08:07:22 +00:00
Tom Lane 4fec55af6c Fix several problems with simple_prompt() --- the nastiest being that
the entered password would get echoed on some platforms, eg HPUX.
We have enough copies of this code that I'm thinking it ought to be
moved into libpq, but that's a task for another day.
2001-10-18 21:57:11 +00:00
Tom Lane 77f27d5ec3 Fix some portability problems (get it to compile, at least, on HP's cc) 2001-10-15 19:15:18 +00:00
Tom Lane aa6970efff Fix some portability problems (get it to compile, at least, on HP's cc) 2001-10-15 18:56:30 +00:00
Tom Lane 1e2779117d Fix some portability problems (get it to compile, at least, on HP's cc) 2001-10-15 18:49:40 +00:00
Tom Lane b261cb9fa1 Updated regression test for tsearch, from Teodor Sigaev. 2001-10-15 17:41:33 +00:00
Tom Lane b57705673d txtidx datatype for full text indexing with GiST.
From Oleg Bartunov and Teodor Sigaev.
2001-10-12 23:19:09 +00:00
Bruce Momjian 7ff432c9ad 1. Implemented binary search in array
Oleg Bartunov
2001-10-04 15:41:14 +00:00
Tom Lane 2d6b1f29fb Update incorrect expected file. Use 'timestamp without time zone'
datatype in test, to try to avoid any dependency on local time zone.
2001-10-03 18:39:12 +00:00
Tom Lane a5dafa3177 Tweak to test HAVE_GETOPT_H before including <getopt.h>, so as to
build on systems without.
2001-10-02 22:38:43 +00:00
Tom Lane 6d18c038b7 Fix a couple of stray // comments. 2001-10-01 17:53:12 +00:00
Bruce Momjian 43cadb9231 Add missing pgcrypto files. 2001-10-01 16:12:23 +00:00
Tatsuo Ishii 9a23885f72 Add pgstattuple 2001-10-01 01:52:38 +00:00
Bruce Momjian 9588084263 * regression tests
* minor doc updates

Marko Kreen
2001-09-30 22:18:29 +00:00
Tom Lane 14b0da2ac3 Changes:
1. gist__int_ops is now without lossy
 2. added sort entry in picksplit

Oleg Bartunov
2001-09-30 16:16:44 +00:00
Tom Lane 5798ccc4a6 Update required due to recent changes in FigureColname. 2001-09-30 16:15:59 +00:00
Tom Lane 793bcc67b2 Remove mistakenly-included file, per request from John Gray. 2001-09-29 05:42:24 +00:00
Bruce Momjian 7d94ac3b23 Found type mismatch in random.c. Please apply this also.
Marko Kreen
2001-09-29 03:12:51 +00:00
Bruce Momjian cff23429d6 I noticed that the contrib Makefiles were reorganized.
Converted pgcrypto one too.

* Changed default randomness source to libc random()
  That way pgcrypto does not have any external dependencies
  and should work everywhere.
* Re-enabled pgcrypto build in contrib/makefile
* contrib/README update - there is more stuff than
  only 'hash functions'
* Noted the libc random fact in README.pgcrypto


Marko Kreen
2001-09-29 03:11:58 +00:00
Bruce Momjian 1bd0b3406a No, file not needed. 2001-09-23 04:17:53 +00:00
Bruce Momjian 9a78cfc13b Add new file. 2001-09-23 04:17:20 +00:00
Bruce Momjian 484a0fa454 please apply attached patch to current CVS.
Changes:

 1. Added support for boolean queries (indexable operator @@, looks like
       a @@ '1|(2&3)'
 2. Some code cleanup and optimization

        Regards,
                Oleg
2001-09-23 04:16:16 +00:00
Bruce Momjian ab56022864 Big thanks to Solar Designer who pointed out a bug in bcrypt
salt generation code.  He also urged using better random source
and making possible to choose using bcrypt and xdes rounds more
easily.  So, here's patch:

* For all salt generation, use Solar Designer's own code.  This
  is mostly due fact that his code is more fit for get_random_bytes()
  style interface.
* New function: gen_salt(type, rounds).  This lets specify iteration
  count for algorithm.
* random.c: px_get_random_bytes() function.
  Supported randomness soure: /dev/urandom, OpenSSL PRNG, libc random()
  Default: /dev/urandom.
* Draft description of C API for pgcrypto functions.

New files: API, crypt-gensalt.c, random.c

Marko Kreen
2001-09-23 04:12:44 +00:00
Hiroshi Inoue c6cb8701db Change vacuumlo to take 'lo' type into account. 2001-09-17 02:30:54 +00:00
Peter Eisentraut 264f8f2b6c Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout
and compatibility with binary packaging standards.  Point backend's
default search location there.  The contrib modules are also
installed in the said location, giving them the benefit of the
default search path as well.  No changes in user interface
nevertheless.
2001-09-16 16:11:11 +00:00
Tatsuo Ishii ba708ea3dc Add -U, -P, -C options. See README.pgbench for more details. 2001-09-09 03:15:56 +00:00
Tom Lane 863aceb54f Get rid of PID entries in shmem hash table; there is no longer any need
for them, and making them just wastes time during backend startup/shutdown.
Also, remove compile-time MAXBACKENDS limit per long-ago proposal.
You can now set MaxBackends as high as your kernel can stand without
any reconfiguration/recompilation.
2001-09-07 00:27:30 +00:00
Peter Eisentraut 17cc78ef01 To fix the perpetually broken makefiles in the contrib tree, I have
written a generic framework of rules that the contrib makefiles can
use instead of writing their own each time.  You only need to set a few
variables and off you go.
2001-09-06 10:49:30 +00:00
Bruce Momjian 74dde13e2c This makes encrypt() parser more strict.
Marko Kreen
2001-09-06 03:21:39 +00:00
Tom Lane 29c22eec8c unixdate subdirectory is gone. 2001-09-04 19:21:42 +00:00
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