summaryrefslogtreecommitdiff
path: root/src/backend/commands/user.c
AgeCommit message (Collapse)Author
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-15Remove warnings for operations that have no effect when executed repeatedly.Peter Eisentraut
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-20Another round of error message editing, covering backend/commands/.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-12Add binary I/O routines for a bunch more datatypes. Still a few to go,Tom Lane
but that was enough tedium for one day. Along the way, move the few support routines for types xid and cid into a more logical place.
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-10-21Make CREATE/ALTER/DROP USER/GROUP transaction-safe, or at least prettyTom Lane
nearly so, by postponing write of flat password file until transaction commit.
2002-09-14Translation updatesPeter Eisentraut
2002-09-04pgindent run.Bruce Momjian
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-08-30Group-manipulating code neglected to fill in array element type,Tom Lane
which is now required.
2002-08-25Clean up comments to be careful about the distinction between variable-Tom Lane
width types and varlena types, since with the introduction of CSTRING as a more-or-less-real type, these concepts aren't identical. I've tried to use varlena consistently to denote datatypes with typlen = -1, ie, they have a length word and are potentially TOASTable; while the term variable width covers both varlena and cstring (and, perhaps, someday other types with other rules for computing the actual width). No code changes in this commit except for renaming a couple macros.
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-24Remove unused system table columns:Peter Eisentraut
pg_language.lancompiler pg_operator.oprprec pg_operator.oprisleft pg_proc.proimplicit pg_proc.probyte_pct pg_proc.properbyte_cpu pg_proc.propercall_cpu pg_proc.prooutin_ratio pg_shadow.usetrace pg_type.typprtlen pg_type.typreceive pg_type.typsend Attempts to use the obsoleted attributes of pg_operator or pg_proc in the CREATE commands will be greeted by a warning. For pg_type, there is no warning (yet) because pg_dump scripts still contain these attributes. Also remove new but already obsolete spellings isVolatile, isStable, isImmutable in WITH clause. (Use new syntax instead.)
2002-06-20Update copyright to 2002.Bruce Momjian
2002-06-11Katherine Ward wrote:Jan Wieck
> Changes to avoid collisions with WIN32 & MFC names... > 1. Renamed: > a. PROC => PGPROC > b. GetUserName() => GetUserNameFromId() > c. GetCurrentTime() => GetCurrentDateTime() > d. IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim > > 2. Added _P to some lex/yacc tokens: > CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT Jan
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-28Minor code cleanup.Tom Lane
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-27Fix write of pg_pwd file for multiple users. Broken recently by myBruce Momjian
pg_hba.conf changes.
2002-04-26Move renametrig() from tablecmds.c to trigger.c --- if we're going toTom Lane
divide backend/commands by object type, let's try to pay at least minimal attention to respecting that structure, eh? Also reorder the contents of tablecmds.c; it seems odd to me to put ALTER commands before creation/deletion commands.
2002-04-18Make PUBLIC an unreserved word (in fact, not a keyword at all),Tom Lane
per previous discussion.
2002-04-04Authentication improvements:Bruce Momjian
A new pg_hba.conf column, USER Allow specifiction of lists of users separated by commas Allow group names specified by + Allow include files containing lists of users specified by @ Allow lists of databases, and database files Allow samegroup in database column to match group name matching dbname Removal of secondary password files Remove pg_passwd utility Lots of code cleanup in user.c and hba.c New data/global/pg_pwd format New data/global/pg_group file
2002-03-26pg_class has a relnamespace column. You can create and access tablesTom Lane
in schemas other than the system namespace; however, there's no search path yet, and not all operations work yet on tables outside the system namespace.
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-02Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian
now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
2002-03-01User and database-specific session defaults for run-time configurationPeter Eisentraut
variables. New commands ALTER DATABASE ... SET and ALTER USER ... SET.
2001-11-05New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian
initdb/regression tests pass.
2001-11-04Merge three existing ways of signaling postmaster from child processes,Tom Lane
so that only one signal number is used not three. Flags in shared memory tell the reason(s) for the current signal. This method is extensible to handle more signal reasons without chewing up even more signal numbers, but the immediate reason is to keep pg_pwd reloads separate from SIGHUP processing in the postmaster. Also clean up some problems in the postmaster with delayed response to checkpoint status changes --- basically, it wouldn't schedule a checkpoint if it wasn't getting connection requests on a regular basis.
2001-11-02Fix pg_pwd caching mechanism, which was broken by changes to forkTom Lane
postmaster children before client auth step. Postmaster now rereads pg_pwd on receipt of SIGHUP, the same way that pg_hba.conf is handled. No cycles need be expended to validate password cache validity during connection startup.
2001-11-01Reject tabs and linefeeds in usernames and passwords that are beingTom Lane
stored in pg_pwd, to guard against failures of the sort observed by Tom Yackel. Note: in the case of encrypted passwords this is no restriction, since the string we are interested in is the MD5 hash.
2001-10-28Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian
spacing. Also adds space for one-line comments.
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-09-19Replace useless strcasecmp's by strcmp's.Peter Eisentraut
2001-09-08Make the world somewhat safe for (not from) DELETE FROM pg_shadow;Peter Eisentraut
Assign the fixed user id 1 to the user created by initdb. A stand-alone backend will always set the user id to 1. (Consequently, the name of that user is no longer important.) In stand-alone mode, the user id 1 will have implicit superuser status, to allow repairs even if there are no users defined. Print a warning message when starting in stand-alone mode when no users are defined. Disallow dropping the current user and session user. Granting/revoking superuser status also grants/revokes usecatupd. (Previously, it would never grant it back. This could lead to "deadlocks".) CREATE USER and CREATE GROUP will start allocating user ids at 100 (unless explicitly specified), to prevent accidental creation of a superuser (plus some room for future extensions).
2001-08-17Add 4-byte MD5 salt.Bruce Momjian
2001-08-15Move md5.h contents to crypt.h.Bruce Momjian
2001-08-15Use MD5 for wire protocol encryption for >= 7.2 client/server.Bruce Momjian
Allow pg_shadow to be MD5 encrypted. Add ENCRYPTED/UNENCRYPTED option to CREATE/ALTER user. Add password_encryption postgresql.conf option. Update wire protocol version to 2.1.
2001-07-12Remove grammar restrictions on order of optional clauses in CREATE GROUP.Tom Lane
From Vince Vielhaber.
2001-07-10Changes from Vince Vielhaber to allow the optional clauses of CREATETom Lane
USER and ALTER USER to appear in any order, not only the fixed order they used to be required to appear in. Also, some changes from Tom Lane to create a FULL option for VACUUM; it doesn't do anything yet, but I needed to change many of the same files to make that happen, so now seemed like a good time.