summaryrefslogtreecommitdiff
path: root/src/backend/commands
AgeCommit message (Collapse)Author
2000-03-26Updated user's guide to match new psql's output formatPeter Eisentraut
Fixed bug in createdb/alternative location
2000-03-23Hmm, absolute pathnames for the copy makes sense. I'll whip up thatBruce Momjian
patch in a second. Should be sufficent to just make sure the first character is a '/', right? Ross J. Reedstrom
2000-03-17Add safety check on expression nesting depth. Default value is set byTom Lane
a config.h #define, and the runtime value can be controlled via SET.
2000-03-17Fix a bunch of minor portability problems and maybe-bugs revealed byTom Lane
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...
2000-03-15Remove another incorrect UserAbortTransactionBlock() call.Tom Lane
2000-03-15Remove gratuitous and incorrect begin/commit transaction calls inTom Lane
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.
2000-03-14Implement column aliases on views "CREATE VIEW name (collist)".Thomas G. Lockhart
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.
2000-03-09Trial implementation of ALTER DROP COLUMN.Hiroshi Inoue
They are #ifdef'd. Add -D_DROP_COLUMN_HACK__ compile option to evaluate it.
2000-03-08Repair access-to-already-freed-memory error recently introduced intoTom Lane
VACUUM.
2000-02-29Changed execution time of ON <event> RESTRICT referentialJan Wieck
integrity triggers to after statement allways. Ignores deferred state now, closer to SQL3 semantics. Jan
2000-02-27Looks like I broke SET variable = DEFAULT awhile ago. Ooops.Tom Lane
2000-02-25Fix longstanding bug that kept functional indexes from working when youTom Lane
defaulted the opclass. This addresses TODO item * Allow creation of functional indexes to use default types (Does that make it a feature? Oh dear...)
2000-02-24Add the check CommonSpecialPortal in use(my fault)Hiroshi Inoue
2000-02-21Fix "Invalid XID in t_cmin" error in vacuum.Hiroshi Inoue
2000-02-19Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.Tom Lane
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.
2000-02-18Implement reindex commandHiroshi Inoue
2000-02-15New cost model for planning, incorporating a penalty for random pageTom Lane
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.
2000-02-15Silence gcc warning about uninitialized var.Tom Lane
2000-02-15Removed unused var to silence gcc warning.Tom Lane
2000-02-15Carry column aliases from the parser frontend. Enables queries likeThomas G. Lockhart
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.
2000-02-13contrib-array.patchBruce Momjian
this is an old patch which I have already submitted and never seen in the sources. It corrects the datatype oids used in some iterator functions. This bug has been reported to me by many other people. contrib-datetime.patch some code contributed by Reiner Dassing <dassing@wettzell.ifag.de> contrib-makefiles.patch fixes all my contrib makefiles which don't work with some compilers, as reported to me by another user. contrib-miscutil.patch an old patch for one of my old contribs. contrib-string.patch a small change to the c-like text output functions. Now the '{' is escaped only at the beginning of the string to distinguish it from arrays, and the '}' is no more escaped. elog-lineno.patch adds the current lineno of CopyFrom to elog messages. This is very useful when you load a 1 million tuples table from an external file and there is a bad value somehere. Currently you get an error message but you can't know where is the bad data. The patch uses a variable which was declared static in copy.c. The variable is now exported and initialized to 0. It is always cleared at the end of the copy or at the first elog message or when the copy is canceled. I know this is very ugly but I can't find any better way of knowing where the copy fails and I have this problem quite often. plperl-makefile.patch fixes a typo in a makefile, but the error must be elsewhere because it is a file generated automatically. Please have a look. tprintf-timestamp.patch restores the original 2-digit year format, assuming that the two century digits don't carry much information and that '000202' is easier to read than 20000202. Being only a log file it shouldn't break anything. Please apply the patches before the next scheduled code freeze. I also noticed that some of the contribs don't compile correcly. Should we ask people to fix their code or rename their makefiles so that they are ignored by the top makefile? -- Massimo Dal Zotto
2000-02-132. trigger.c fails to compile due to a syntax error. It containsBruce Momjian
a switch statement that has an empty default label. A label of a switch statement must be followed by a statement (or a label which is followed by a statement (or a label which ...)). 3. Files include stringinfo.h failed to compile. The macro, 'appendStringInfoCharMacro' is implemented with a '?:' operation that returns a void expression for the true part and a char expresion for the false part. Both the true and false parts of the '?:' oper- ator must return the same type. Billy G. Allie
2000-02-09Ooops ... 'char c' can hold a char, but it can't hold EOF ...Tom Lane
2000-02-06Removed special hack causing ON UPDATE NO ACTION trigger toJan Wieck
be suppressed. Jan
2000-02-04Small bugfix for DROP TABLE if table is self-referenced byJan Wieck
a FOREIGN KEY constraint. Jan
2000-02-04Added ALTER TABLE ... ADD CONSTRAINT (provided by Stephan Szabo).Jan Wieck
Added constraint dumping capability to pg_dump (also from Stephan) Fixed DROP TABLE -> RelationBuildTriggers: 2 record(s) not found for rel error. Fixed little error in gram.y I made the last days. Jan
2000-01-31Fix problems seen in parallel regress tests when SI buffer overruns (causingTom Lane
syscache and relcache flushes). Relcache entry rebuild now preserves original tupledesc, rewrite rules, and triggers if possible, so that pointers to these things remain valid --- if these things change while relcache entry has positive refcount, we elog(ERROR) to avoid later crash. Arrange for xact-local rels to be rebuilt when an SI inval message is seen for them, so that they are updated by CommandCounterIncrement the same as regular rels. (This is useful because of Hiroshi's recent changes to process our own SI messages at CommandCounterIncrement time.) This allows simplification of some routines that previously hacked around the lack of an automatic update. catcache now keeps its own copy of tupledesc for its relation, rather than depending on the relcache's copy; this avoids needing to reinitialize catcache during a cache flush, which saves some cycles and eliminates nasty circularity problems that occur if a cache flush happens while trying to initialize a catcache. Eliminate a number of permanent memory leaks that used to happen during catcache or relcache flush; not least of which was that catcache never freed any cached tuples! (Rule parsetree storage is still leaked, however; will fix that separately.) Nothing done yet about code that uses tuples retrieved by SearchSysCache for longer than is safe.
2000-01-29A few minor psql enhancementsPeter Eisentraut
Initdb help correction Changed end/abort to commit/rollback and changed related notices Commented out way old printing functions in libpq Fixed a typo in alter table / alter column
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
2000-01-24Removed alter table drop column.Peter Eisentraut
2000-01-22Revise handling of index-type-specific indexscan cost estimation, perTom Lane
pghackers discussion of 5-Jan-2000. The amopselect and amopnpages estimators are gone, and in their place is a per-AM amcostestimate procedure (linked to from pg_am, not pg_amop).
2000-01-22added ALTER TABLE DROP COLUMN, early versionPeter Eisentraut
2000-01-22Change a few routines into macros to improve speed of COPY IN inner loop.Tom Lane
2000-01-20Cleanup vacuum names.Bruce Momjian
2000-01-20Bruce,Bruce Momjian
Attached is a small fix for a stupid mistake I made in comment.c - an attempt to drop a non-existent comment would dump core :-(. Sometimes, I'm as sharp as a marble. Sorry, Mike Mascari
2000-01-19Fix handling of NULL constraint conditions: per SQL92 spec, a NULL resultTom Lane
from a constraint condition does not violate the constraint (cf. discussion on pghackers 12/9/99). Implemented by adding a parameter to ExecQual, specifying whether to return TRUE or FALSE when the qual result is really NULL in three-valued boolean logic. Currently, ExecRelCheck is the only caller that asks for TRUE, but if we find any other places that have the wrong response to NULL, it'll be easy to fix them.
2000-01-19Update vacuum comments.Bruce Momjian
2000-01-19Removed MBFLAGS from makefiles since it's now done in include/config.h.Peter Eisentraut
2000-01-18Bruce,Bruce Momjian
Attached is a patch which patches cleanly against the Sunday afternoon snapshot. It modifies pg_dump to dump COMMENT ON statements for user-definable descriptions. In addition, it also modifies comment.c so that the operator behavior is as Peter E. would like: a comment on an operator is applied to the underlying function. Thanks, Mike Mascari
2000-01-17setheapoverride() is history. Uses replaced with CommandCounterIncrement()Tom Lane
where necessary --- several of them didn't really need it, though. tqual-checking macros simplified accordingly.
2000-01-16Rearrange coding in COPY so that expansible string buffer for data beingTom Lane
read is reused for successive attributes, instead of being deleted and recreated from scratch for each value read in. This reduces palloc/pfree overhead a lot. COPY IN still seems to be noticeably slower than it was in 6.5 --- we need to figure out why. This change takes care of the only major performance loss I can see in copy.c itself, so the performance problem is at a lower level somewhere.
2000-01-16Included all yacc and lex files into the distribution.Peter Eisentraut
2000-01-15Fix a passel of problems with incorrect calls to typinput and typoutputTom Lane
functions, which would lead to trouble with datatypes that paid attention to the typelem or typmod parameters to these functions. In particular, incorrect code in pg_aggregate.c explains the platform-specific failures that have been reported in NUMERIC avg().
2000-01-15Fixed all elog related warnings, as well as a few others.Peter Eisentraut
2000-01-14* User management commands no longer user pg_exec_query_dest -> more robustPeter Eisentraut
* Let unprivileged users change their own passwords. * The password is now an Sconst in the parser, which better reflects its text datatype and also forces users to quote them. * If your password is NULL you won't be written to the password file, meaning you can't connect until you have a password set up (if you use password authentication). * When you drop a user that owns a database you get an error. The database is not gone.
2000-01-13Fixed everything in and surrounding createdb and dropdb to make it morePeter Eisentraut
error-proof. Rearranged some old code and removed dead sections.
2000-01-12RemoveFunction didn't defend against too many args.Tom Lane
2000-01-12Defend against > INDEX_MAX_KEYS keys in an index.Tom Lane
2000-01-12CommentProc was careless about too many arguments.Tom Lane
2000-01-11Another FUNC_MAX_ARGS tweak.Tom Lane