summaryrefslogtreecommitdiff
path: root/src/include/commands
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanup of user name and user id handling in the backend. The currentPeter Eisentraut2000-09-061-2/+2
| | | | | | | | | | | user is now defined in terms of the user id, the user name is only computed upon request (for display purposes). This is kind of the opposite of the previous state, which would maintain the user name and compute the user id for permission checks. Besides perhaps saving a few cycles (integer vs string), this now creates a single point of attack for changing the user id during a connection, for purposes of "setuid" functions, etc.
* Revert removal of signed, volatile, and signal handler arg type tests.Peter Eisentraut2000-08-291-2/+2
|
* Remove configure tests for `signed', `volatile', and signal handler args;Peter Eisentraut2000-08-271-2/+2
| | | | the harm potential outweighs the possible benefits.
* SQL-language functions are now callable in ordinary fmgr contexts ...Tom Lane2000-08-241-2/+1
| | | | | | for example, an SQL function can be used in a functional index. (I make no promises about speed, but it'll work ;-).) Clean up and simplify handling of functions returning sets.
* 'const' decorations are fine, but not when they're inserted withoutTom Lane2000-07-181-2/+2
| | | | bothering to clean up the resulting warnings ...
* Cleanup of code for creating index entries. Functional indexes withTom Lane2000-07-141-12/+3
| | | | | | | | | | | | | pass-by-ref data types --- eg, an index on lower(textfield) --- no longer leak memory during index creation or update. Clean up a lot of redundant code ... did you know that copy, vacuum, truncate, reindex, extend index, and bootstrap each basically duplicated the main executor's logic for extracting information about an index and preparing index entries? Functional indexes should be a little faster now too, due to removal of repeated function lookups. CREATE INDEX 'opt_type' clause is deimplemented by these changes, but I haven't removed it from the parser yet (need to merge with Thomas' latest change set first).
* Bugfix in ALTER TABLE CREATE TOAST TABLEJan Wieck2000-07-051-2/+3
| | | | | | | Automatically create toast table at CREATE TABLE if new table has toastable attributes. Jan
* TOASTJan Wieck2000-07-031-1/+3
| | | | | | | | WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
* First phase of memory management rewrite (see backend/utils/mmgr/READMETom Lane2000-06-281-2/+1
| | | | | | | | | | | | | for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.
* Second pass over run-time configuration system. Adjust priorities on somePeter Eisentraut2000-06-221-2/+1
| | | | | | | | | | | | | | | | | | | option settings. Sort out SIGHUP vs BACKEND -- there is no total ordering here, so make explicit checks. Add comments explaining all of this. Removed permissions check on SHOW command. Add examine_subclass to the game, rename to SQL_inheritance to fit the official data model better. Adjust documentation. Standalone backend needs to reset all options before it starts. To facilitate that, have IsUnderPostmaster be set by the postmaster itself, don't wait for the magic -p switch. Also make sure that all environment variables and argv's survive init_ps_display(). Use strdup where necessary. Have initdb make configuration files (postgresql.conf, pg_hba.conf) mode 0600 -- having configuration files is no fun if you can't edit them.
* Clean up #include's.Bruce Momjian2000-06-152-3/+1
|
* #include cleanupsBruce Momjian2000-06-151-0/+2
|
* Update sequence-related functions to new fmgr style. Remove downcasing,Tom Lane2000-06-111-4/+6
| | | | | | | | quote-stripping, and acl-checking tasks for these functions from the parser, and do them at function execution time instead. This fixes the failure of pg_dump to produce correct output for nextval(Foo) used in a rule, and also eliminates the restriction that the argument of these functions must be a parse-time constant.
* Inheritance overhaul by Chris Bitmead <chris@bitmead.com>Bruce Momjian2000-06-091-1/+2
|
* Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian2000-06-082-8/+4
|
* The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut2000-05-312-6/+8
| | | | | | | | | | | | | That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
* Split vacuum and analyze into separate filesBruce Momjian2000-05-291-1/+2
|
* More vacuum cleanupBruce Momjian2000-05-291-19/+19
|
* more cleanupBruce Momjian2000-05-291-2/+2
|
* Allow vacuum to perform analyze with shared lock. Update cvs manual.Bruce Momjian2000-05-291-3/+1
|
* Second round of fmgr changes: triggers are now invoked in new style,Tom Lane2000-05-292-6/+15
| | | | CurrentTriggerData is history.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-126-39/+43
|
* Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.Tom Lane2000-02-191-21/+5
| | | | | | | | | 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-181-1/+4
|
* contrib-array.patchBruce Momjian2000-02-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix problems seen in parallel regress tests when SI buffer overruns (causingTom Lane2000-01-311-0/+10
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Add:Bruce Momjian2000-01-2612-24/+36
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* added ALTER TABLE DROP COLUMN, early versionPeter Eisentraut2000-01-221-3/+3
|
* Included all yacc and lex files into the distribution.Peter Eisentraut2000-01-161-5/+22
|
* Fix a passel of problems with incorrect calls to typinput and typoutputTom Lane2000-01-151-1/+2
| | | | | | | 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().
* * User management commands no longer user pg_exec_query_dest -> more robustPeter Eisentraut2000-01-142-9/+9
| | | | | | | | | | | | * 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.
* Fixed everything in and surrounding createdb and dropdb to make it morePeter Eisentraut2000-01-131-12/+3
| | | | error-proof. Rearranged some old code and removed dead sections.
* Changed "triggered data change violation" detection codeJan Wieck2000-01-061-1/+9
| | | | | | in trigger manager. Jan
* update_pg_pwd() is an AR trigger. Corrected return type.Jan Wieck1999-12-211-1/+1
| | | | Jan
* Clean up some minor gcc warnings.Tom Lane1999-12-201-0/+2
|
* Here's the Create/Alter/Drop Group stuff that's been really overdue. IBruce Momjian1999-12-161-0/+4
| | | | | | | | | didn't have time for documentation yet, but I'll write some. There are still some things to work out what happens when you alter or drop users, but the group stuff in and by itself is done. -- Peter Eisentraut Sernanders väg 10:115
* Depending on my interpreting (and programming) skills, this might solveBruce Momjian1999-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | anywhere from zero to two TODO items. * Allow flag to control COPY input/output of NULLs I got this: COPY table .... [ WITH NULL AS 'string' ] which does what you'd expect. The default is \N, otherwise you can use empty strings, etc. On Copy In this acts like a filter: every data item that looks like 'string' becomes a NULL. Pretty straightforward. This also seems to be related to * Make postgres user have a password by default If I recall this discussion correctly, the problem was actually that the default password for the postgres (or any) user is in fact "\N", because of the way copy is used. With this change, the file pg_pwd is copied out with nulls as empty strings, so if someone doesn't have a password, the password is just '', which one would expect from a new account. I don't think anyone really wants a hard-coded default password. Peter Eisentraut Sernanders väg 10:115
* Rename several destroy* functions/tags to drop*.Bruce Momjian1999-12-101-2/+2
|
* Change backend-side COPY to write files with permissions 644 not 666Tom Lane1999-11-211-3/+3
| | | | | | | | | (whoever thought world-writable files were a good default????). Modify the pg_pwd code so that pg_pwd is created with 600 permissions. Modify initdb so that permissions on a pre-existing PGDATA directory are not blindly accepted: if the dir is already there, it does chmod go-rwx to be sure that the permissions are OK and the dir actually is owned by postgres.
* Hello.Bruce Momjian1999-10-262-2/+32
| | | | | | | | | | | | | | | | | | | The following patch extends the COMMENT ON functionality to the rest of the database objects beyond just tables, columns, and views. The grammer of the COMMENT ON statement now looks like: COMMENT ON [ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <objname> | COLUMN <relation>.<attribute> | AGGREGATE <aggname> <aggtype> | FUNCTION <funcname> (arg1, arg2, ...) | OPERATOR <op> (leftoperand_typ rightoperand_typ) | TRIGGER <triggername> ON relname> Mike Mascari (mascarim@yahoo.com)
* This patch implements ORACLE's COMMENT SQL command.Bruce Momjian1999-10-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >From the ORACLE 7 SQL Language Reference Manual: ----------------------------------------------------- COMMENT Purpose: To add a comment about a table, view, snapshot, or column into the data dictionary. Prerequisites: The table, view, or snapshot must be in your own schema or you must have COMMENT ANY TABLE system privilege. Syntax: COMMENT ON [ TABLE table ] | [ COLUMN table.column] IS 'text' You can effectively drop a comment from the database by setting it to the empty string ''. ----------------------------------------------------- Example: COMMENT ON TABLE workorders IS 'Maintains base records for workorder information'; COMMENT ON COLUMN workorders.hours IS 'Number of hours the engineer worked on the task'; to drop a comment: COMMENT ON COLUMN workorders.hours IS ''; The current patch will simply perform the insert into pg_description, as per the TODO. And, of course, when the table is dropped, any comments relating to it or any of its attributes are also dropped. I haven't looked at the ODBC source yet, but I do know from an ODBC client standpoint that the standard does support the notion of table and column comments. Hopefully the ODBC driver is already fetching these values from pg_description, but if not, it should be trivial. Hope this makes the grade, Mike Mascari (mascarim@yahoo.com)
* This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.Jan Wieck1999-09-291-0/+49
| | | | | | | | | | | | Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan
* Add TRUNCATE command, with psql help and sgml additions.Bruce Momjian1999-09-231-1/+2
|
* Add new vpl_num_allocated_pages member to VPageListData.Tatsuo Ishii1999-08-251-1/+2
| | | | | | | It will keep track the number of pages allocated so that vacuum could allocate twice of the previous allocation. This will greatly reduce the total memory consumption of vacuum.
* First step in fixing selectivity-estimation code. eqsel andTom Lane1999-08-011-5/+6
| | | | | | | | | | neqsel now behave as per my suggestions in pghackers a few days ago. selectivity for < > <= >= should work OK for integral types as well, but still need work for nonintegral types. Since these routines have never actually executed before :-(, this may result in some significant changes in the optimizer's choices of execution plans. Let me know if you see any serious misbehavior. CAUTION: THESE CHANGES REQUIRE INITDB. pg_statistic table has changed.
* More cleanupBruce Momjian1999-07-163-5/+5
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-153-6/+6
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-153-7/+4
|
* Cleanup of /include #include's, for 6.6 only.Bruce Momjian1999-07-144-5/+9
|
* Another pgindent run. Sorry folks.Bruce Momjian1999-05-252-5/+5
|