Commit Graph

13042 Commits

Author SHA1 Message Date
Tom Lane ce7565ab91 Instead of having a configure-time DEFAULT_ATTSTATTARGET, store -1 in
attstattarget to indicate 'use the default'.  The default is now a GUC
variable default_statistics_target, and so may be changed on the fly.  Along
the way we gain the ability to have pg_dump dump the per-column statistics
target when it's not the default.  Patch by Neil Conway, with some kibitzing
from Tom Lane.
2002-07-31 17:19:54 +00:00
Bruce Momjian 8be3cfbbd5 Done:
> * -Remove LockMethodTable.prio field, not used (Bruce)
2002-07-31 03:13:16 +00:00
Bruce Momjian 52457ca6af Move backend_pid to functions/misc. 2002-07-31 02:27:29 +00:00
Bruce Momjian 1107531c91 Rename pid function to backend_pid(). 2002-07-31 01:49:13 +00:00
Bruce Momjian f67cb71961 Add function to access backend pid, pg_stat_get_backend_mypid. 2002-07-31 00:40:40 +00:00
Bruce Momjian b8efa8755c Done:
> * -Add getpid() function to backend
2002-07-31 00:40:20 +00:00
Tom Lane 4ad658cac9 Teach pg_dump to dump user-defined operator classes. For the moment,
this only works against 7.3 or later databases; the pushups required
to do it without regprocedure/regtype/etc seem more trouble than they're
worth, considering that existing users aren't expecting pg_dump support
for this.
2002-07-30 21:56:04 +00:00
Bruce Momjian 2c2c43d05f Updated:
< 	o ALTER TABLE ADD COLUMN column SET DEFAULT should fill existing
> 	o ALTER TABLE ADD COLUMN column DEFAULT should fill existing
2002-07-30 19:47:09 +00:00
Bruce Momjian b30ccbe32a Clarification from Tom:
< 	o ALTER TABLE ALTER COLUMN column SET DEFAULT should fill existing
> 	o ALTER TABLE ADD COLUMN column SET DEFAULT should fill existing
2002-07-30 19:43:20 +00:00
Bruce Momjian f514bb3e25 Would it be wise to have the plsql.sgml file renamed to plpgsql.sgml?
All of the internal tags are of the latter.

The other thing I noticed is that most of the quick examples in the file
use a para and synopsis.  Is there a reason we're not using <example/> ?

Rod Taylor
2002-07-30 19:36:13 +00:00
Bruce Momjian 6c01708c46 Added for Neil Conway:
> * Use CHECK constraints to improve optimizer decisions
2002-07-30 19:34:05 +00:00
Tom Lane 76099408f6 If we're cleaning out _deadcode, might as well zap this one too. 2002-07-30 18:54:59 +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
Bruce Momjian ad63a551b2 Remove last recipe file. 2002-07-30 18:44:01 +00:00
Tom Lane 937aef3545 Ensure that src/tutorial gets cleaned by top-level make clean. 2002-07-30 17:47:58 +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 620abeb271 Done:
> 	o -Generate failure on short COPY lines rather than pad NULLs
2002-07-30 16:56:15 +00:00
Bruce Momjian 6e9893047e The attached patch removes the last remnants of support for
'tioga recipes', whatever those are -- Peter E. killed most
of it a couple days ago, but this patch removes the rest. Most
of it was #ifdef'ed out anyway.

Neil Conway
2002-07-30 16:55:45 +00:00
Bruce Momjian 874148fe34 IMPROVED VERSION APPLIED:
The attached patch completes the following TODO item:

    * Generate failure on short COPY lines rather than pad NULLs

I also restructed a lot of the existing COPY code, did some code
review on the column list patch sent in by Brent Verner a little
while ago, and added some regression tests. I also added an
explicit check (and resultant error) for extra data before
the end-of-line.

Neil Conway
2002-07-30 16:55:06 +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
Bruce Momjian 210e64fe08 Added support for schemas and quotes in tab-complete.c, as well as
a few other things:

* Made all references to the pg_* tables absolute, by specifying
  the pg_catalog schema.

* Added SCHEMA as a create/delete completion option.

* Added SCHEMA completion as: SELECT nspname FROM
pg_catalog.pg_namespace
  WHERE substr(nspname,1,%d)='%s'

* Added completion of "INSERT INTO <table> (" with attribute names.

* Added completion of "INSERT INTO <table> (attribs)" with
  VALUES or SELECT

* Added limited locking completion: only for one table:
  "LOCK" and "LOCK TABLE" now both get a completion list of tables
  Complete with "IN" for LOCK [TABLE] <table>
  Complete LOCK [TABLE] <table> IN with a lock mode

* Added a very simple WHERE finisher that uses the previous word
  as a table lookup for attributes.

* Added quote support when parsing "previous words". In other words,
  hitting tab after INSERT INTO "foo bar baby"
  now does the right thing and recognizes "foo bar baby" as one word.

Letting tab-complete quote things that should be quoted seems to be
temporarily ifdef'ed out due to readline compatibility problems.
Can anyone elaborate on this?

Greg Sabino Mullane
2002-07-30 16:35:05 +00:00
Bruce Momjian 578e71fee5 This should fix a bug where a row that was updated or
deleted that had another row inserted/updated to its old
value during the same statement or other statements before the
integrity check for noaction would incorrectly error.  This
could happen in deferred constraints or due to triggers or
functions. It's effectively a reworking of the previous patch that
did a not exists to instead do a separate check.

Stephan Szabo
2002-07-30 16:33:21 +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
Bruce Momjian 23a8b77d42 Here are two patches. The guc_and_tablefunc patch addresses the two
changes mentioned above, and also adds a new function to the tablefunc
API. The tablefunc API change adds the following function:

* Oid foidGetTypeId(Oid foid) - Get a function's typeid given the
* function Oid. Use this together with TypeGetTupleDesc() to get a
* TupleDesc which is derived from the function's declared return type.

In the next post I'll send the contrib/tablefunc patch, which
illustrates the usage of this new function. Also attached is a doc patch
for this change. The doc patch also adds a function that I failed to
document previously.

Joe Conway
2002-07-30 16:20:03 +00:00
Bruce Momjian ceb438ed8c This patch fixes one serious bug (runaway INSERT) and a few rare (and
hard to reproduce) error conditions.

Manfred Koizar
2002-07-30 16:08:33 +00:00
Bruce Momjian bf7d8e4299 Update contributions link. 2002-07-30 15:05:17 +00:00
Dave Cramer 79d35b41aa added tests for crossReferences 2002-07-30 13:22:38 +00:00
Dave Cramer 55695148df changed test user back to test 2002-07-30 13:22:02 +00:00
Dave Cramer c82fed3d87 Added DataSource code and tests submitted by Aaron Mulder 2002-07-30 11:41:10 +00:00
Dave Cramer 6410c22265 changes for new Datasource 2002-07-30 11:38:13 +00:00
Bruce Momjian 6bdbe4ca2c Move alarm timers to proper location. 2002-07-30 05:35:53 +00:00
Tom Lane c2d0ebce75 Rewrite xindex.sgml for CREATE OPERATOR CLASS. catalogs.sgml finally
contains descriptions of every single system table.  Update 'complex'
tutorial example too.
2002-07-30 05:24:56 +00:00
Bruce Momjian b6440a7ece Make statement_timeout apply to entire query string, not per statement. 2002-07-30 05:13:06 +00:00
Bruce Momjian a89fc4e6de --enable-syslog no longer required to use syslog. 2002-07-30 04:24:54 +00:00
Bruce Momjian 5bf55525c3 Move item:
< * Allow logging of query durations
2002-07-30 03:12:37 +00:00
Bruce Momjian 122b0cd86f Update FAQ. 2002-07-30 01:35:29 +00:00
Hiroshi Inoue 67d0cb2d77 Fix a bug about automatic client_encoding setting. 2002-07-30 00:48:02 +00:00
Bruce Momjian be347dcba6 Update FAQ. 2002-07-29 23:56:53 +00:00
Tom Lane b5eebc1fd4 Centralize code for interpreting schema references, which had gotten
copied more places than I first thought it would.  This fixes a bug:
a couple of these places were neglecting to enforce USAGE access on
explicitly-referenced schemas.
2002-07-29 23:46:35 +00:00
Tom Lane 7b970bc1bc Use aclcheck_error() in place of ad-hoc permissions complaints. 2002-07-29 23:44:44 +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
Bruce Momjian b9459c6adb Fix from Neil Conway:
< 	o ALTER TABLE ADD COLUMN column SET DEFAULT should fill existing
> 	o ALTER TABLE ALTER COLUMN column SET DEFAULT should fill existing
2002-07-29 21:41:19 +00:00
Tom Lane a28375140c Fix minor coding error: don't ReleaseSysCache until after last use of
cache entry.
2002-07-29 20:45:44 +00:00
Tatsuo Ishii c6b2838685 Fix typo. Remove #ifdef MULTIBYTE 2002-07-29 08:04:55 +00:00
Peter Eisentraut 06ad580f75 Structure reference pages consistently. Document that structure.
Add information about environment variables.
2002-07-28 15:22:21 +00:00
Peter Eisentraut b02c56f584 Clean documentation subtree during make clean. 2002-07-28 15:19:59 +00:00
Peter Eisentraut b0c3c48eb3 Assemble portability modules into libpgport library.
Some makefile simplifications.
2002-07-27 20:10:05 +00:00