summaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
AgeCommit message (Collapse)Author
2004-02-10Restructure smgr API as per recent proposal. smgr no longer depends onTom Lane
the relcache, and so the notion of 'blind write' is gone. This should improve efficiency in bgwriter and background checkpoint processes. Internal restructuring in md.c to remove the not-very-useful array of MdfdVec objects --- might as well just use pointers. Also remove the long-dead 'persistent main memory' storage manager (mm.c), since it seems quite unlikely to ever get resurrected.
2004-01-07More janitorial work: remove the explicit casting of NULL literals to aNeil Conway
pointer type when it is not necessary to do so. For future reference, casting NULL to a pointer type is only necessary when (a) invoking a function AND either (b) the function has no prototype OR (c) the function is a varargs function.
2003-12-15Add mention with might need to use cp -R someday for portability.Bruce Momjian
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-11-19Background writer processJan Wieck
This first part of the background writer does no syncing at all. It's only purpose is to keep the LRU heads clean so that regular backends seldom to never have to call write(). Jan
2003-11-12Cross-data-type comparisons are now indexable by btrees, pursuant to myTom Lane
pghackers proposal of 8-Nov. All the existing cross-type comparison operators (int2/int4/int8 and float4/float8) have appropriate support. The original proposal of storing the right-hand-side datatype as part of the primary key for pg_amop and pg_amproc got modified a bit in the event; it is easier to store zero as the 'default' case and only store a nonzero when the operator is actually cross-type. Along the way, remove the long-since-defunct bigbox_ops operator class.
2003-11-09Add operator strategy and comparison-value datatype fields to ScanKey.Tom Lane
Remove the 'strategy map' code, which was a large amount of mechanism that no longer had any use except reverse-mapping from procedure OID to strategy number. Passing the strategy number to the index AM in the first place is simpler and faster. This is a preliminary step in planned support for cross-datatype index operations. I'm committing it now since the ScanKeyEntryInitialize() API change touches quite a lot of files, and I want to commit those changes before the tree drifts under me.
2003-09-29More message editing, some suggested by Alvaro HerreraPeter Eisentraut
2003-09-25Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
2003-09-10Improve error message for cp or rm failur during create/drop database,Tom Lane
per recent discussions.
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-08-01Adjust 'permission denied' messages to be more useful and consistent.Tom Lane
2003-07-28A visit from the message-style police ...Tom Lane
2003-07-18First bits of work on error message editing.Tom Lane
2003-06-27First batch of object rename commands.Peter Eisentraut
2003-05-15Add copydir() function because xcopy doesn't work in XP without aBruce Momjian
window.
2003-05-07Change alternate database location patch to test for symlink() ratherBruce Momjian
than WIN32.
2003-05-04Disable alternate locations on Win32 because it doesn't support symlinks.Bruce Momjian
2003-04-04Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian
2003-04-04Handle cp, rm, and exec for Win32.Bruce Momjian
2003-01-27Get rid of last few unadorned 'permission denied' messages.Tom Lane
2002-12-05More cleanup of userid to be AclId rather than Oid.Bruce Momjian
2002-12-02Repair core dump when trying to delete an entry from an already-NULLTom Lane
datconfig or useconfig field. Per report from Dustin Sallings.
2002-11-02Remove encoding lookups from grammar stage, push them back to placesTom Lane
where it's safe to do database access. Along the way, fix core dump for 'DEFAULT' parameters to CREATE DATABASE. initdb forced due to change in pg_proc entry.
2002-10-21Fix places that were using IsTransactionBlock() as an (inadequate) checkTom Lane
that they'd get to commit immediately on finishing. There's now a centralized routine PreventTransactionChain() that implements the necessary tests.
2002-09-04pgindent run.Bruce Momjian
2002-09-03Arrange for the default permissions on a database to allow temp tableTom Lane
creation to world, but disallow temp table creation in template1. Per latest round of pghackers discussion. I did not force initdb, but the permissions lockdown on template1 will not take effect unless you do one (or manually REVOKE TEMP ON DATABASE template1 FROM public).
2002-09-03Remove all traces of multibyte and locale options. Clean up commentsPeter Eisentraut
referring to "multibyte" where it really means character encoding.
2002-09-02Remove sys/types.h in files that include postgres.h, and hence c.h,Bruce Momjian
because c.h has sys/types.h.
2002-09-02Code review for HeapTupleHeader changes. Add version number to page headersTom Lane
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask, per earlier discussion. Simplify scheme for overlaying fields in tuple header (no need for cmax to live in more than one place). Don't try to clear infomask status bits in tqual.c --- not safe to do it there. Don't try to force output table of a SELECT INTO to have OIDs, either. Get rid of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which has already caused one recent failure. Improve documentation.
2002-08-29Remove #ifdef MULTIBYTE per hackers list discussion.Tatsuo Ishii
2002-08-09has_table_privilege spawns scions has_database_privilege, ↵Tom Lane
has_function_privilege, has_language_privilege, has_schema_privilege to let SQL queries test all the new privilege types in 7.3. Also, add functions pg_table_is_visible, pg_type_is_visible, pg_function_is_visible, pg_operator_is_visible, pg_opclass_is_visible to test whether objects contained in schemas are visible in the current search path. Do some minor cleanup to centralize accesses to pg_database, as well.
2002-08-05Restructure system-catalog index updating logic. Instead of havingTom Lane
hardwired lists of index names for each catalog, use the relcache's mechanism for caching lists of OIDs of indexes of any table. This reduces the common case of updating system catalog indexes to a single line, makes it much easier to add a new system index (in fact, you can now do so on-the-fly if you want to), and as a nice side benefit improves performance a little. Per recent pghackers discussion.
2002-07-20oid is needed, it is added at the end of the struct (after the nullBruce Momjian
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-12Second phase of committing Rod Taylor's pg_depend/pg_constraint patch.Tom Lane
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY constraints all have real live entries in pg_constraint. pg_depend exists, and RESTRICT/CASCADE options work on most kinds of DROP; however, pg_depend is not yet very well populated with dependencies. (Most of the ones that are present at this point just replace formerly hardwired associations, such as the implicit drop of a relation's pg_type entry when the relation is dropped.) Need to add more logic to create dependency entries, improve pg_dump to dump constraints in place of indexes and triggers, and add some regression tests.
2002-06-20Update copyright to 2002.Bruce Momjian
2002-06-20Improve COPY syntax to use WITH clause, keep backward compatibility.Bruce Momjian
2002-06-18Change CREATE DATABASE to use DefElem instead of constructing structureBruce Momjian
members in gram.y. This is the prefered method for WITH and arbitrary param/value pairs.
2002-05-25AlterDatabaseSet() forgot to update the indexes on pg_database.Tom Lane
2002-05-21Remove global variable scanCommandId in favor of storing a command IDTom Lane
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.
2002-05-20Restructure indexscan API (index_beginscan, index_getnext) perTom Lane
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.
2002-05-17Merge the last few variable.c configuration variables into the genericTom Lane
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.
2002-04-27Support toasting of shared system relations, and provide toast tables forTom Lane
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.
2002-04-21Restructure AclItem representation so that we can have more than eightTom Lane
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...
2002-04-11Make sure that usesuper is always accessed through superuser(), so that thePeter Eisentraut
single-user escape path always works.
2002-03-06Change made to elog:Bruce Momjian
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.
2002-03-01User and database-specific session defaults for run-time configurationPeter Eisentraut
variables. New commands ALTER DATABASE ... SET and ALTER USER ... SET.
2002-02-24Add OWNER option to CREATE DATABASE, so superusers can create databasesTom Lane
on behalf of unprivileged users. Also, make '=' optional in CREATE DATABASE syntax. From Gavin Sherry, with kibitzing and docs by Tom Lane.
2002-02-23Guard against createdb --location=PGDATA foo; without this, the codeTom Lane
tries to create a symlink pointing at itself. Per trouble report from Kenneth McDowell.