aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
Commit message (Collapse)AuthorAge
...
* Improve COPY syntax to use WITH clause, keep backward compatibility.Bruce Momjian2002-06-20
|
* Change CREATE DATABASE to use DefElem instead of constructing structureBruce Momjian2002-06-18
| | | | | members in gram.y. This is the prefered method for WITH and arbitrary param/value pairs.
* AlterDatabaseSet() forgot to update the indexes on pg_database.Tom Lane2002-05-25
|
* Remove global variable scanCommandId in favor of storing a command IDTom Lane2002-05-21
| | | | | | | | | | | in snapshots, per my proposal of a few days ago. Also, tweak heapam.c routines (heap_insert, heap_update, heap_delete, heap_mark4update) to be passed the command ID to use, instead of doing GetCurrentCommandID. For catalog updates they'll still get passed current command ID, but for updates generated from the main executor they'll get passed the command ID saved in the snapshot the query is using. This should fix some corner cases associated with functions and triggers that advance current command ID while an outer query is still in progress.
* Restructure indexscan API (index_beginscan, index_getnext) perTom Lane2002-05-20
| | | | | | | yesterday's proposal to pghackers. Also remove unnecessary parameters to heap_beginscan, heap_rescan. I modified pg_proc.h to reflect the new numbers of parameters for the AM interface routines, but did not force an initdb because nothing actually looks at those fields.
* Merge the last few variable.c configuration variables into the genericTom Lane2002-05-17
| | | | | | | | | GUC support. It's now possible to set datestyle, timezone, and client_encoding from postgresql.conf and per-database or per-user settings. Also, implement rollback of SET commands that occur in a transaction that later fails. Create a SET LOCAL var = value syntax that sets the variable only for the duration of the current transaction. All per previous discussions in pghackers.
* Support toasting of shared system relations, and provide toast tables forTom Lane2002-04-27
| | | | | | | | | pg_database, pg_shadow, pg_group, all of which now have potentially-long fields. Along the way, get rid of SharedSystemRelationNames list: shared rels are now identified in their include/pg_catalog/*.h files by a BKI_SHARED_RELATION macro, while indexes and toast rels inherit sharedness automatically from their parent table. Fix some bugs with failure to detoast pg_group.grolist during ALTER GROUP.
* Restructure AclItem representation so that we can have more than eightTom Lane2002-04-21
| | | | | | | | | different privilege bits (might as well make use of the space we were wasting on padding). EXECUTE and USAGE bits for procedures, languages now are separate privileges instead of being overlaid on SELECT. Add privileges for namespaces and databases. The GRANT and REVOKE commands work for these object types, but we don't actually enforce the privileges yet...
* Make sure that usesuper is always accessed through superuser(), so that thePeter Eisentraut2002-04-11
| | | | single-user escape path always works.
* Change made to elog:Bruce Momjian2002-03-06
| | | | | | | | | | | | | | | | | | | o Change all current CVS messages of NOTICE to WARNING. We were going to do this just before 7.3 beta but it has to be done now, as you will see below. o Change current INFO messages that should be controlled by client_min_messages to NOTICE. o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc. to always go to the client. o Remove INFO from the client_min_messages options and add NOTICE. Seems we do need three non-ERROR elog levels to handle the various behaviors we need for these messages. Regression passed.
* User and database-specific session defaults for run-time configurationPeter Eisentraut2002-03-01
| | | | variables. New commands ALTER DATABASE ... SET and ALTER USER ... SET.
* Add OWNER option to CREATE DATABASE, so superusers can create databasesTom Lane2002-02-24
| | | | | on behalf of unprivileged users. Also, make '=' optional in CREATE DATABASE syntax. From Gavin Sherry, with kibitzing and docs by Tom Lane.
* Guard against createdb --location=PGDATA foo; without this, the codeTom Lane2002-02-23
| | | | | tries to create a symlink pointing at itself. Per trouble report from Kenneth McDowell.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Commit Karel's patch.Tatsuo Ishii2001-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------- Subject: Re: [PATCHES] encoding names From: Karel Zak <zakkr@zf.jcu.cz> To: Peter Eisentraut <peter_e@gmx.net> Cc: pgsql-patches <pgsql-patches@postgresql.org> Date: Fri, 31 Aug 2001 17:24:38 +0200 On Thu, Aug 30, 2001 at 01:30:40AM +0200, Peter Eisentraut wrote: > > - convert encoding 'name' to 'id' > > I thought we decided not to add functions returning "new" names until we > know exactly what the new names should be, and pending schema Ok, the patch not to add functions. > better > > ...(): encoding name too long Fixed. I found new bug in command/variable.c in parse_client_encoding(), nobody probably never see this error: if (pg_set_client_encoding(encoding)) { elog(ERROR, "Conversion between %s and %s is not supported", value, GetDatabaseEncodingName()); } because pg_set_client_encoding() returns -1 for error and 0 as true. It's fixed too. IMHO it can be apply. Karel PS: * following files are renamed: src/utils/mb/Unicode/KOI8_to_utf8.map --> src/utils/mb/Unicode/koi8r_to_utf8.map src/utils/mb/Unicode/WIN_to_utf8.map --> src/utils/mb/Unicode/win1251_to_utf8.map src/utils/mb/Unicode/utf8_to_KOI8.map --> src/utils/mb/Unicode/utf8_to_koi8r.map src/utils/mb/Unicode/utf8_to_WIN.map --> src/utils/mb/Unicode/utf8_to_win1251.map * new file: src/utils/mb/encname.c * removed file: src/utils/mb/common.c -- Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
* Transaction IDs wrap around, per my proposal of 13-Aug-01. MoreTom Lane2001-08-26
| | | | documentation to come, but the code is all here. initdb forced.
* Make OIDs optional, per discussions in pghackers. WITH OIDS is still theTom Lane2001-08-10
| | | | | | | | | | | | default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
* Fix handling of SIGCHLD, per recent pghackers discussion: on someTom Lane2001-08-04
| | | | | | | platforms system(2) gets confused unless the signal handler is set to SIG_DFL, not SIG_IGN. pgstats.c now uses pqsignal() as it should, not signal(). Also, arrange for the stats collector process to show a reasonable ID in 'ps', rather than looking like a postmaster.
* First non-stub implementation of shared free space map. It's not superTom Lane2001-07-02
| | | | | | useful as yet, since its primary source of information is (full) VACUUM, which makes a concerted effort to get rid of free space before telling the map about it ... next stop is concurrent VACUUM ...
* Clean up various to-do items associated with system indexes:Tom Lane2001-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pg_database now has unique indexes on oid and on datname. pg_shadow now has unique indexes on usename and on usesysid. pg_am now has unique index on oid. pg_opclass now has unique index on oid. pg_amproc now has unique index on amid+amopclaid+amprocnum. Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache. Remove index on pg_listener and associated syscache for performance reasons (caching rows that are certain to change before you need 'em again is rather pointless). Change pg_attrdef's nonunique index on adrelid into a unique index on adrelid+adnum. Fix various incorrect settings of pg_class.relisshared, make that the primary reference point for whether a relation is shared or not. IsSharedSystemRelationName() is now only consulted to initialize relisshared during initial creation of tables and indexes. In theory we might now support shared user relations, though it's not clear how one would get entries for them into pg_class &etc of multiple databases. Fix recently reported bug that pg_attribute rows created for an index all have the same OID. (Proof that non-unique OID doesn't matter unless it's actually used to do lookups ;-)) There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstrap relations. Convert them into plain system catalogs without hardwired entries in pg_class and friends. Unify global.bki and template1.bki into a single init script postgres.bki, since the alleged distinction between them was misleading and pointless. Not to mention that it didn't work for setting up indexes on shared system relations. Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to use AccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do). Also, hold locks until transaction commit where necessary.
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Fix all the places that called heap_update() and heap_delete() withoutTom Lane2001-01-23
| | | | | | | | | | | bothering to check the return value --- which meant that in case the update or delete failed because of a concurrent update, you'd not find out about it, except by observing later that the transaction produced the wrong outcome. There are now subroutines simple_heap_update and simple_heap_delete that should be used anyplace that you're not prepared to do the full nine yards of coping with concurrent updates. In practice, that seems to mean absolutely everywhere but the executor, because *noplace* else was checking.
* Need to do BufferSync at end of DROP DATABASE as well as CREATE DATABASE.Tom Lane2001-01-14
| | | | | Otherwise, newly connecting backends will still think the deleted DB is valid, and will generate unexpected error messages.
* No more #ifdef XLOG.Vadim B. Mikheev2000-11-30
|
* Put back BufferSync() for WAL after database creation.Tom Lane2000-11-18
| | | | Also, add some comments about what it's for...
* Change SearchSysCache coding conventions so that a reference count isTom Lane2000-11-16
| | | | | | | maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
* Extend CREATE DATABASE to allow selection of a template database to beTom Lane2000-11-14
| | | | | | | | | | cloned, rather than always cloning template1. Modify initdb to generate two identical databases rather than one, template0 and template1. Connections to template0 are disallowed, so that it will always remain in its virgin as-initdb'd state. pg_dumpall now dumps databases with restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0. This allows proper behavior when there is user-added data in template1. initdb forced!
* Keep track of the last active slot in the shared ProcState array, soTom Lane2000-11-12
| | | | | | | | | that search loops only have to scan that far and not through all maxBackends entries. This eliminates a performance penalty for setting maxBackends much higher than the average number of active backends. Also, eliminate no-longer-used 'backend tag' concept. Remove setting of environment variables at backend start (except for CYR_RECODE), since none of them are being examined by the backend any longer.
* Clean up compiler warnings.Tom Lane2000-11-08
|
* Reimplement alternative database locations with symlinks. No changes inPeter Eisentraut2000-11-08
| | | | user interface.
* WALVadim B. Mikheev2000-10-28
|
* Add new datlastsysoid to pg_database.Philip Warner2000-10-22
| | | | | This field stores the last allocated OID after the database was created. Used by pg_dump in deciding what is user-defined vs. system-defined.
* New file naming. Database OID is used as "tablespace" id andVadim B. Mikheev2000-10-16
| | | | | relation OID is used as file node on creation but may be changed later if required. Regression Tests Approved (c) -:)))
* Code cleanup of user name and user id handling in the backend. The currentPeter Eisentraut2000-09-06
| | | | | | | | | | | 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.
* More functions updated to new fmgr style --- money, name, tid datatypes.Tom Lane2000-08-03
| | | | | We're reaching the mopup stage here (good thing too, this is getting tedious).
* Update textin() and textout() to new fmgr style. This is just phaseTom Lane2000-07-05
| | | | | one of updating the whole text datatype, but there are so dang many calls of these two routines that it seems worth a separate commit.
* If create/drop database are going to call closeAllVfds(), they oughtTom Lane2000-06-02
| | | | | to do it at the last moment before calling system() ... not at some randomly-chosen earlier point in the routine ...
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-30
|
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-28
| | | | | | | 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.
* On solaris, createdb/dropdb fails because of strange behavior of system().Tatsuo Ishii2000-05-25
| | | | | (it returns error with errno ECHILD upon successful completion of commands). This fix ignores an error from system() if errno == ECHILD.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Updated user's guide to match new psql's output formatPeter Eisentraut2000-03-26
| | | | Fixed bug in createdb/alternative location
* Remove gratuitous and incorrect begin/commit transaction calls inTom Lane2000-03-15
| | | | | | | | 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.
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Fixed everything in and surrounding createdb and dropdb to make it morePeter Eisentraut2000-01-13
| | | | error-proof. Rearranged some old code and removed dead sections.
* Clean up some minor gcc warnings.Tom Lane1999-12-20
|
* Meanwhile, database names with single quotes in names don't work very wellBruce Momjian1999-12-12
| | | | | | | | | | | | | | | | | | | | | at all, and because of shell quoting rules this can't be fixed, so I put in error messages to that end. Also, calling create or drop database in a transaction block is not so good either, because the file system mysteriously refuses to roll back rm calls on transaction aborts. :) So I put in checks to see if a transaction is in progress and signal an error. Also I put the whole call in a transaction of its own to be able to roll back changes to pg_database in case the file system operations fail. The alternative location issues I posted recently were untouched, awaiting the outcome of that discussion. Other than that, this should be much more fool-proof now. The docs I cleaned up as well. Peter Eisentraut Sernanders väg 10:115
* Rename several destroy* functions/tags to drop*.Bruce Momjian1999-12-10
|
* Add pg_statistic index, add missing Hiroshi file.Bruce Momjian1999-11-24
|