Commit Graph

5013 Commits

Author SHA1 Message Date
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
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
Peter Eisentraut b0c3c48eb3 Assemble portability modules into libpgport library.
Some makefile simplifications.
2002-07-27 20:10:05 +00:00
Tatsuo Ishii 0345f58496 Implement DROP CONVERSION
Add regression test
2002-07-25 10:07:13 +00:00
Peter Eisentraut 43515ba3f8 Remove _deadcode. 2002-07-24 19:16:43 +00:00
Peter Eisentraut 739adf32ee Remove unused system table columns:
pg_language.lancompiler
pg_operator.oprprec
pg_operator.oprisleft
pg_proc.proimplicit
pg_proc.probyte_pct
pg_proc.properbyte_cpu
pg_proc.propercall_cpu
pg_proc.prooutin_ratio
pg_shadow.usetrace
pg_type.typprtlen
pg_type.typreceive
pg_type.typsend

Attempts to use the obsoleted attributes of pg_operator or pg_proc
in the CREATE commands will be greeted by a warning.  For pg_type,
there is no warning (yet) because pg_dump scripts still contain these
attributes.

Also remove new but already obsolete spellings
isVolatile, isStable, isImmutable in WITH clause.  (Use new syntax
instead.)
2002-07-24 19:11:14 +00:00
Tatsuo Ishii 19a20e04bd Add Japanese README explaining how to add new conversion.
English README will come soon...
2002-07-24 07:05:41 +00:00
Peter Eisentraut e9c013f4bd Add unique index on pg_cast.oid, and document pg_cast table. 2002-07-22 20:23:19 +00:00
Tom Lane b70b78656b Tweak CreateTrigger() so that the OID used in the name of an
RI_ConstraintTrigger is the same OID assigned to the pg_trigger row.
This reduces consumption of OIDs and may ease debugging.
2002-07-20 19:55:38 +00:00
Tom Lane c33a6343cd Code review for SHOW output changes; fix horology expected files for
new SHOW output format.
2002-07-20 15:12:56 +00:00
Bruce Momjian 63cfc6a8e8 Fix problems caused by code drift of API for without-oids. 2002-07-20 06:17:43 +00:00
Bruce Momjian b34cbe006f The attached patch fixes 2 trivial warnings generated by bison 1.35,
as a result of Peter's recent CREATE CAST changes.

Neil Conway
2002-07-20 05:58:34 +00:00
Bruce Momjian 1ce03603cc > 2. This patch includes the same Table Function API fixes that I
>    submitted on July 9:
>
>    http://archives.postgresql.org/pgsql-patches/2002-07/msg00056.php
>
>    Please disregard that one *if* this one is applied. If this one is
>    rejected please go ahead with the July 9th patch.

The July 9th Table Function API patch mentioned above is now in CVS, so
here is an updated version of the guc patch which should apply cleanly
against CVS tip.

Joe Conway
2002-07-20 05:49:28 +00:00
Bruce Momjian dcbacde2e3 Patch problems caused by code drift since OID patch creation. 2002-07-20 05:37:45 +00:00
Bruce Momjian e36f9cd440 Manually apply part of oid patch that didn't apply cleanly. 2002-07-20 05:29:01 +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
Bruce Momjian 38dd3ae7d0 The attached patch fixes a build problem with GEQO when using the
PX recombination operator, changes some elog() messages from LOG
to DEBUG1, puts some debugging functions inside the appropriate
#ifdef (not enabled by default), and makes a few other minor
cleanups.

BTW, the elog() change is motivated by at least one user who
has sent a concerned email to -general asking exactly what the
"ERX recombination operator" is, and what it is doing to their
DBMS.

Neil Conway
2002-07-20 04:59:10 +00:00
Bruce Momjian e77054e029 This patch fixes a regression caused by my recent changes to heap
tuple header.  The fix is based on the thought that HEAP_MOVED_IN is
not needed any more as soon as HEAP_XMIN_COMMITTED has been set.  So
in tqual.c and vacuum.c the HEAP_MOVED bits are cleared when
HEAP_XMIN_COMMITTED is set.

Vacuum robustness is enhanced by rearranging ifs, so that we have a
chance to elog(ERROR, ...) before an assertion fails.

A new regression test is included.

Manfred Koizar
2002-07-20 04:57:13 +00:00
Tom Lane 009d593c48 Small performance improvement --- use indexscan not heapscan to find
pg_statistic rows to delete while dropping a relation.
2002-07-19 22:21:17 +00:00
Bruce Momjian 33b3c95200 Complete TODO item:
* -Add BSD-licensed qsort() for Solaris
2002-07-19 17:35:11 +00:00
Tatsuo Ishii 86270024ff Oops. Too much ifdef out. 2002-07-19 11:09:25 +00:00
Tatsuo Ishii 248cbb5796 Temporary ifdef out migrating functions to avoid compiler warnings. 2002-07-19 00:22:24 +00:00
Bruce Momjian b75fcf9326 Complete TODO item:
* -HOLDER/HOLDERTAB rename to PROCLOCK/PROCLOCKTAG
2002-07-19 00:17:40 +00:00
Peter Eisentraut 97377048b4 pg_cast table, and standards-compliant CREATE/DROP CAST commands, plus
extension to create binary compatible casts.  Includes dependency tracking
as well.

pg_proc.proimplicit is now defunct, but will be removed in a separate
commit.

pg_dump provides a migration path from the previous scheme to declare
casts.  Dumping binary compatible casts is currently impossible, though.
2002-07-18 23:11:32 +00:00
Bruce Momjian 981d045e88 Complete TODO item:
* Merge LockMethodCtl and LockMethodTable into one shared structure (Bruce)
2002-07-18 23:06:20 +00:00
Peter Eisentraut 85d2a629c6 Create directory before installing files. 2002-07-18 22:58:08 +00:00
Bruce Momjian 7d78bac108 Back out BETWEEN node patch, was causing initdb failure. 2002-07-18 17:14:20 +00:00
Tom Lane 11333426f1 Implement DROP SCHEMA. It lacks support for dropping conversions and
operator classes, both of which are schema-local and so should really
be droppable.
2002-07-18 16:47:26 +00:00
Bruce Momjian e6f02c8231 REVOKE ALL ON FUNCTION nonexistant() FROM PUBLIC;
Used to report that GRANT could not find function nonexistant.

Rod Taylor
2002-07-18 04:50:10 +00:00
Bruce Momjian a90db34b54 The attached patch (against HEAD) implements
COPY x (a,d,c,b) from stdin;
  COPY x (a,c) to stdout;

as well as the corresponding changes to pg_dump to use the new
functionality.  This functionality is not available when using
the BINARY option.  If a column is not specified in the COPY FROM
statement, its default values will be used.

In addition to this functionality, I tweaked a couple of the
error messages emitted by the new COPY <options> checks.

Brent Verner
2002-07-18 04:43:51 +00:00
Bruce Momjian 3e22406ec6 Finished the Between patch Christopher started.
Implements between (symmetric / asymmetric) as a node.

Executes the left or right expression once, makes a Const out of the
resulting Datum and executes the >=, <= portions out of the Const sets.

Of course, the parser does a fair amount of preparatory work for this to
happen.

Rod Taylor
2002-07-18 04:41:46 +00:00
Bruce Momjian 7ea5f1d7f1 Here is a patch for the Table Function API. It fixes a bug found by Neil
Conway (BuildTupleFromCStrings sets NULL for pass-by-value types when
intended value is 0). It also implements some other improvements
suggested by Neil.

Joe Conway
2002-07-18 04:40:30 +00:00
Bruce Momjian 404e9a12a5 Move libc replacement files from src/backend/port to src/port. 2002-07-18 04:13:59 +00:00
Tatsuo Ishii eb335a034b I have committed many support files for CREATE CONVERSION. Default
conversion procs and conversions are added in initdb. Currently
supported conversions are:

UTF-8(UNICODE) <--> SQL_ASCII, ISO-8859-1 to 16, EUC_JP, EUC_KR,
		    EUC_CN, EUC_TW, SJIS, BIG5, GBK, GB18030, UHC,
		    JOHAB, TCVN

EUC_JP <--> SJIS
EUC_TW <--> BIG5
MULE_INTERNAL <--> EUC_JP, SJIS, EUC_TW, BIG5

Note that initial contents of pg_conversion system catalog are created
in the initdb process. So doing initdb required is ideal, it's
possible to add them to your databases by hand, however. To accomplish
this:

psql -f your_postgresql_install_path/share/conversion_create.sql your_database

So I did not bump up the version in cataversion.h.

TODO:
Add more conversion procs
Add [CASCADE|RESTRICT] to DROP CONVERSION
Add tuples to pg_depend
Add regression tests
Write docs
Add SQL99 CONVERT command?
--
Tatsuo Ishii
2002-07-18 02:02:30 +00:00
Tom Lane 5af19e4227 Add more dependency insertions --- this completes the basic pg_depend
functionality.  Of note: dropping a table that has a SERIAL column
defined now drops the associated sequence automatically.
2002-07-16 22:12:20 +00:00
Bruce Momjian 846ea08d34 Oops, sometimes strtol isn't called in pg_atoi, so we do need that badp
check.
2002-07-16 18:34:16 +00:00
Bruce Momjian 7aee5ed3b7 Fix tid to in/out as unsigned. 2002-07-16 17:55:25 +00:00
Tatsuo Ishii 3c7798f068 Add conversion procs for CREATE CONVERSION 2002-07-16 09:25:06 +00:00
Tatsuo Ishii 743b747264 Fix typo 2002-07-16 06:58:44 +00:00
Tatsuo Ishii d49108fd73 Add FindDefaultConversionProc 2002-07-16 06:58:14 +00:00
Tom Lane 30ec31604d Add code to extract dependencies from an expression tree, and use it
to build dependencies for rules, constraint expressions, and default
expressions.  Repair some problems in the original design of
recursiveDeletion() exposed by more complex dependency sets.  Fix
regression tests that were deleting things in illegal sequences.
2002-07-16 05:53:34 +00:00
Bruce Momjian 1e07ab78cc Add DLLINIT mention in port/Makefile. 2002-07-16 05:49:38 +00:00
Bruce Momjian 3cbb9eb265 Move few remaining src/utils files to backend/port so everything is in
one place.  Everything may be moved to src/utils eventually.

Add DLLINIT variable to simplify makfiles.
2002-07-16 05:46:36 +00:00
Bruce Momjian b3341ddbf2 Mark 'line' as 'not implemented' in SGML and psql \dT, per Thomas
Lockhart.  initdb not forced.
2002-07-16 03:30:27 +00:00
Bruce Momjian b9104e3a97 Remove certain Makefile dependencies by using full pathnames in
configure.in.
2002-07-15 21:34:05 +00:00
Tom Lane 7bd631bfa4 Use the dependency mechanism to manage column defaults. We need this
so that dependencies in default expressions (on operators, functions,
etc) can be expressed properly.
2002-07-15 16:33:32 +00:00
Bruce Momjian e552e9e512 Improve relcache.c error reporting for the next guy who has to debug
this thing.
2002-07-15 01:57:51 +00:00
Tom Lane d5fa19c6ee Add COMMENT ON CONSTRAINT facility (from Rod Taylor's pg_constraint patch).
Fix comment.c to not depend on parser token values, per discussion awhile
back.
2002-07-14 23:38:13 +00:00
Tom Lane df3f5dfd19 In DeleteAttributeTuples, use a single indexscan instead of the multiple
scans that will most likely be caused by SearchSysCache probes.  Also,
share some code between index deletion and table deletion.
2002-07-14 21:08:08 +00:00