summaryrefslogtreecommitdiff
path: root/src/backend/commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Add analyze log messages for verbose mode.Bruce Momjian2000-05-291-1/+3
|
* cleanupBruce Momjian2000-05-291-7/+1
|
* Allow vacuum to perform analyze with shared lock. Update cvs manual.Bruce Momjian2000-05-291-375/+440
|
* Generated header files parse.h and fmgroids.h are now copied intoTom Lane2000-05-292-15/+4
| | | | | the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
* Second round of fmgr changes: triggers are now invoked in new style,Tom Lane2000-05-293-87/+97
| | | | CurrentTriggerData is history.
* More vacuum cleanupsBruce Momjian2000-05-291-17/+17
|
* More vacuum renaming.Bruce Momjian2000-05-291-163/+163
|
* Miscellaneous cleanups of places that needed to account for newTom Lane2000-05-282-9/+13
| | | | pg_language entries.
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-2811-67/+75
| | | | | | | key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.
* Do table renaming in a sane order: physical file rename must happenTom Lane2000-05-251-28/+36
| | | | | | | *last*, after all updating of system catalogs. In old code, an error detected during TypeRename left the relation hosed. Also, add a call to flush the relation's relcache entry, rather than trusting to shared cache invalidation to flush it for us.
* On solaris, createdb/dropdb fails because of strange behavior of system().Tatsuo Ishii2000-05-251-1/+13
| | | | | (it returns error with errno ECHILD upon successful completion of commands). This fix ignores an error from system() if errno == ECHILD.
* Revise FlushRelationBuffers/ReleaseRelationBuffers per discussion withTom Lane2000-05-192-6/+8
| | | | | | | | | | | | | | | | | | | | | Hiroshi. ReleaseRelationBuffers now removes rel's buffers from pool, instead of merely marking them nondirty. The old code would leave valid buffers for a deleted relation, which didn't cause any known problems but can't possibly be a good idea. There were several places which called ReleaseRelationBuffers *and* FlushRelationBuffers, which is now unnecessary; but there were others that did not. FlushRelationBuffers no longer emits a warning notice if it finds dirty buffers to flush, because with the current bufmgr behavior that's not an unexpected condition. Also, FlushRelationBuffers will flush out all dirty buffers for the relation regardless of block number. This ensures that pg_upgrade's expectations are met about tuple on-row status bits being up-to-date on disk. Lastly, tweak BufTableDelete() to clear the buffer's tag so that no one can mistake it for being a still-valid buffer for the page it once held. Formerly, the buffer would not be found by buffer hashtable searches after BufTableDelete(), but it would still be thought to belong to its old relation by the routines that sequentially scan the shared-buffer array. Again I know of no bugs caused by that, but it still can't be a good idea.
* Change remove function warning for built-ins.Bruce Momjian2000-05-181-2/+2
|
* Throw NOTICE on built-in function removalBruce Momjian2000-05-181-2/+2
|
* Reduce COPY IN lock from AccessExclusive to a more reasonableTom Lane2000-05-181-6/+8
| | | | | | | RowExclusive (my fault). Also, install a check to prevent people from trying COPY BINARY to stdout/from stdin. No way that will work unless we redesign the frontend COPY protocol ... which is not worth the trouble in the near future ...
* Finally fix LISTEN problem.Bruce Momjian2000-05-141-1/+10
|
* This is the second time I've answered this exact same problem in twoBruce Momjian2000-05-121-2/+12
| | | | | | | | | | | | | | | | | | | | | days. It seems to be a FAQ, and I think I know why. When creating a 'c' language function, CREATE FUNCTION is fed the shared object filename, and seems to succeed. Only when trying to use the function is an error thrown, by which time the coder thinks something's wrong with executing the code, not with loading it. I think I once saw it proposed to load shared objects at function creation time, but that idea was shot down on the grounds of resident memory bloat, ISTR. Here's a patch for a compromise: all it does is stat() the file, just like the loader code does, so that the errors caused by non existent files, and no directory 'x' permissions (the most common ones, it seems), get caught while the developer is still thinking about code loading. It doesn't catch all errors (like the code not being readable by the postgres user) but seems to catch the most common, without actually opening the file. What do you think? Ross
* Squash some more CLUSTER bugs. Never has worked on multiple-columnTom Lane2000-05-121-5/+18
| | | | | | | | | | | | indexes, apparently, nor on functional indexes with more than one input column (force of natts = 1 was in the wrong branch of IF statement). Coredumped if source relation contained any uncommitted tuples, due to failure to test for success return from heap_fetch. Fetched tuple was passed directly to heap_insert, which clobbers the TID and commit status in the tuple header it's given, which meant that the source relation's tuples all got trashed as the copy proceeded. Abort partway through, and you're left with a lot of missing tuples. I wonder what else is lurking here ...
* Fix CLUSTER ... or at least undo the bit-rot it's suffered since 6.5.Tom Lane2000-05-112-38/+41
| | | | | It's still pretty fundamentally bogus :-(. Freebie side benefit: ALTER TABLE RENAME works on indexes now.
* Don't leak a file descriptor when updating pg_pwd file. Also, check forTom Lane2000-05-041-11/+21
| | | | failure of rename() call.
* change reindex ERROR/NOTICE messageHiroshi Inoue2000-04-251-5/+7
|
* Check that user-specified opclass in CREATE INDEX corresponds to operatorsTom Lane2000-04-251-2/+41
| | | | that will actually work on the column datatype.
* Produce an appropriate error message when opclass is not supported byTom Lane2000-04-231-37/+86
| | | | | specified index access method. Clean up wording of some existing error messages, too.
* Allow COPY WITH OIDS to system OID values --- rely on unique indexes toTom Lane2000-04-161-15/+17
| | | | | prevent duplicate OIDs from being added. Clean up redundant error messages.
* Show failing OID in 'cache lookup failed' messages.Tom Lane2000-04-161-3/+3
|
* Fixed CREATE TYPE to recognize changed parsenodesJan Wieck2000-04-131-3/+6
| | | | Jan
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-1218-1975/+2144
|
* Add transcendental math functions (sine, cosine, etc)Thomas G. Lockhart2000-04-072-14/+63
| | | | | | | | | | | | | | | | Add a random number generator and seed setter (random(), SET SEED) Fix up the interval*float8 math to carry partial months into the time field. Add float8*interval so we have symmetry in the available math. Fix the parser and define.c to accept SQL92 types as field arguments. Fix the parser to accept SQL92 types for CREATE TYPE, etc. This is necessary to allow... Bit/varbit support in contrib/bit cleaned up to compile and load cleanly. Still needs some work before final release. Implement the "SOME" keyword as a synonym for "ANY" per SQL92. Implement ascii(text), ichar(int4), repeat(text,int4) to help support the ODBC driver. Enable the TRUNCATE() function mapping in the ODBC driver.
* Allow vacuum of temporary tablesBruce Momjian2000-04-061-3/+10
|
* Repair assert failure in tuple-chain-moving logic (introduced by yoursTom Lane2000-04-061-10/+26
| | | | truly, I'm afraid).
* Updated user's guide to match new psql's output formatPeter Eisentraut2000-03-261-12/+15
| | | | Fixed bug in createdb/alternative location
* Hmm, absolute pathnames for the copy makes sense. I'll whip up thatBruce Momjian2000-03-231-1/+6
| | | | | | | patch in a second. Should be sufficent to just make sure the first character is a '/', right? Ross J. Reedstrom
* Add safety check on expression nesting depth. Default value is set byTom Lane2000-03-171-1/+47
| | | | a config.h #define, and the runtime value can be controlled via SET.
* Fix a bunch of minor portability problems and maybe-bugs revealed byTom Lane2000-03-172-15/+16
| | | | | | running gcc and HP's cc with warnings cranked way up. Signed vs unsigned comparisons, routines declared static and then defined not-static, that kind of thing. Tedious, but perhaps useful...
* Remove another incorrect UserAbortTransactionBlock() call.Tom Lane2000-03-151-2/+1
|
* Remove gratuitous and incorrect begin/commit transaction calls inTom Lane2000-03-151-48/+29
| | | | | | | | CREATE DB/DROP DB. If you didn't think they were wrong, try what happens when you compile with -DCLOBBER_FREED_MEMORY --- database name displayed in error messages is trashed, because transaction abort freed it. Also, remove trailing periods in error messages, per our prevailing style.
* Implement column aliases on views "CREATE VIEW name (collist)".Thomas G. Lockhart2000-03-141-4/+28
| | | | | | | | | | | | | | | | | | Implement TIME WITH TIME ZONE type (timetz internal type). Remap length() for character strings to CHAR_LENGTH() for SQL92 and to remove the ambiguity with geometric length() functions. Keep length() for character strings for backward compatibility. Shrink stored views by removing internal column name list from visible rte. Implement min(), max() for time and timetz data types. Implement conversion of TIME to INTERVAL. Implement abs(), mod(), fac() for the int8 data type. Rename some math functions to generic names: round(), sqrt(), cbrt(), pow(), etc. Rename NUMERIC power() function to pow(). Fix int2 factorial to calculate result in int4. Enhance the Oracle compatibility function translate() to work with string arguments (from Edwin Ramirez). Modify pg_proc system table to remove OID holes.
* Trial implementation of ALTER DROP COLUMN.Hiroshi Inoue2000-03-093-3/+428
| | | | | | They are #ifdef'd. Add -D_DROP_COLUMN_HACK__ compile option to evaluate it.
* Repair access-to-already-freed-memory error recently introduced intoTom Lane2000-03-081-12/+25
| | | | VACUUM.
* Changed execution time of ON <event> RESTRICT referentialJan Wieck2000-02-291-2/+6
| | | | | | | integrity triggers to after statement allways. Ignores deferred state now, closer to SQL3 semantics. Jan
* Looks like I broke SET variable = DEFAULT awhile ago. Ooops.Tom Lane2000-02-271-3/+9
|
* Fix longstanding bug that kept functional indexes from working when youTom Lane2000-02-251-95/+114
| | | | | | defaulted the opclass. This addresses TODO item * Allow creation of functional indexes to use default types (Does that make it a feature? Oh dear...)
* Add the check CommonSpecialPortal in use(my fault)Hiroshi Inoue2000-02-241-1/+4
|
* Fix "Invalid XID in t_cmin" error in vacuum.Hiroshi Inoue2000-02-211-2/+2
|
* Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.Tom Lane2000-02-191-116/+165
| | | | | | | | | variable, instead calling same code in variable.c that is used to parse SET DATESTYLE. Fix bug: although backend's startup datestyle had been changed to ISO, 'RESET DATESTYLE' and 'SET DATESTYLE TO DEFAULT' didn't know about it. For consistency I have made the latter two reset to the PGDATESTYLE-defined initial value, which may not be the same as the compiled-in default of ISO.
* Implement reindex commandHiroshi Inoue2000-02-183-81/+326
|
* New cost model for planning, incorporating a penalty for random pageTom Lane2000-02-152-162/+510
| | | | | | | | | | | | | | | | | | | | | | | | | accesses versus sequential accesses, a (very crude) estimate of the effects of caching on random page accesses, and cost to evaluate WHERE- clause expressions. Export critical parameters for this model as SET variables. Also, create SET variables for the planner's enable flags (enable_seqscan, enable_indexscan, etc) so that these can be controlled more conveniently than via PGOPTIONS. Planner now estimates both startup cost (cost before retrieving first tuple) and total cost of each path, so it can optimize queries with LIMIT on a reasonable basis by interpolating between these costs. Same facility is a win for EXISTS(...) subqueries and some other cases. Redesign pathkey representation to achieve a major speedup in planning (I saw as much as 5X on a 10-way join); also minor changes in planner to reduce memory consumption by recycling discarded Path nodes and not constructing unnecessary lists. Minor cleanups to display more-plausible costs in some cases in EXPLAIN output. Initdb forced by change in interface to index cost estimation functions.
* Silence gcc warning about uninitialized var.Tom Lane2000-02-151-1/+5
|
* Removed unused var to silence gcc warning.Tom Lane2000-02-151-2/+2
|
* Carry column aliases from the parser frontend. Enables queries likeThomas G. Lockhart2000-02-152-8/+11
| | | | | | | SELECT a FROM t1 tx (a); Allow join syntax, including queries like SELECT * FROM t1 NATURAL JOIN t2; Update RTE structure to hold column aliases in an Attr structure.