aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.c
Commit message (Collapse)AuthorAge
...
* Fix crash when reading 'timezone = unknown' from postgresql.conf duringTom Lane2005-08-08
| | | | | SIGHUP; it's not OK for an assign_hook to return a non-malloc'd string. Problem was introduced during timezone library rewrite.
* Add SET ROLE. This is a partial commit of Stephen Frost's recent patch;Tom Lane2005-07-25
| | | | I'm still working on the has_role function and information_schema changes.
* Add time/date macros for code clarity:Bruce Momjian2005-07-21
| | | | | | | #define DAYS_PER_YEAR 365.25 #define MONTHS_PER_YEAR 12 #define DAYS_PER_MONTH 30 #define HOURS_PER_DAY 24
* Add 'day' field to INTERVAL so 1 day interval can be distinguished fromBruce Momjian2005-07-20
| | | | | | | | | | | | | | | | 24 hours. This is very helpful for daylight savings time: select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours'; ?column? ---------------------- 2005-05-04 01:00:00-04 select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day'; ?column? ---------------------- 2005-05-04 01:00:00-04 Michael Glaesemann
* Replace pg_shadow and pg_group by new role-capable catalogs pg_authidTom Lane2005-06-28
| | | | | | | | and pg_auth_members. There are still many loose ends to finish in this patch (no documentation, no regression tests, no pg_dump support for instance). But I'm going to commit it now anyway so that Alvaro can make some progress on shared dependencies. The catalog changes should be pretty much done.
* Fix assign_datestyle() so that it doesn't misleadingly complain aboutTom Lane2005-06-09
| | | | | 'conflicting datestyle specifications' for input that's actually only redundant, such as SET DATESTYLE = MDY, MDY. Per recent gripe.
* Code for SET/SHOW TIME ZONE with a fixed-interval timezone was notTom Lane2005-06-05
| | | | prepared for HAVE_INT64_TIMESTAMP. Per report from Guillaume Beaudoin.
* Attached patch gets rid of the global timezone in the following steps:Bruce Momjian2005-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changes the APIs to the timezone functions to take a pg_tz pointer as an argument, representing the timezone to use for the selected operation. * Adds a global_timezone variable that represents the current timezone in the backend as set by SET TIMEZONE (or guc, or env, etc). * Implements a hash-table cache of loaded tables, so we don't have to read and parse the TZ file everytime we change a timezone. While not necesasry now (we don't change timezones very often), I beleive this will be necessary (or at least good) when "multiple timezones in the same query" is eventually implemented. And code-wise, this was the time to do it. There are no user-visible changes at this time. Implementing the "multiple zones in one query" is a later step... This also gets rid of some of the cruft needed to "back out a timezone change", since we previously couldn't check a timezone unless it was activated first. Passes regression tests on win32, linux (slackware 10) and solaris x86. Magnus Hagander
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-31
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* GUC assign hooks that look at external state in deciding whether aTom Lane2004-09-24
| | | | | | | setting is valid must ignore that state and permit the assignment anyway when source is PGC_S_OVERRIDE. Otherwise they may disallow a rollback at transaction abort, which is The Wrong Thing. Per example from Michael Fuhr 12-Sep-04.
* Code review for various recent GUC hacking. Don't elog(ERROR) whenTom Lane2004-08-31
| | | | | | | not supposed to (fixes problem with postmaster aborting due to mistaken postgresql.conf change); don't call superuser() when not inside a transaction (fixes coredump when, eg, try to set log_statement from PGOPTIONS); some message style guidelines enforcement.
* Another pgindent run with lib typedefs added.Bruce Momjian2004-08-30
|
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Avoid crashing when restoring a saved GUC session_authorization valueTom Lane2004-08-11
| | | | that refers to a now-deleted userid. Per gripe from Chris Ochs.
* Nested transactions. There is still much left to do, especially on theTom Lane2004-07-01
| | | | | | | performance front, but with feature freeze upon us I think it's time to drive a stake in the ground and say that this will be in 7.5. Alvaro Herrera, with some help from Tom Lane.
* Reimplement the linked list data structure used throughout the backend.Neil Conway2004-05-26
| | | | | | | | | | | | | | | | In the past, we used a 'Lispy' linked list implementation: a "list" was merely a pointer to the head node of the list. The problem with that design is that it makes lappend() and length() linear time. This patch fixes that problem (and others) by maintaining a count of the list length and a pointer to the tail node along with each head node pointer. A "list" is now a pointer to a structure containing some meta-data about the list; the head and tail pointers in that structure refer to ListCell structures that maintain the actual linked list of nodes. The function names of the list API have also been changed to, I hope, be more logically consistent. By default, the old function names are still available; they will be disabled-by-default once the rest of the tree has been updated to use the new API names.
* Avoid calling select_default_timezone() when backing out an unwanted TZTom Lane2004-05-23
| | | | | setting. This is a temporary kluge to keep Alvaro happy; eventually we should fix the TZ library API to make the problem really go away.
* Integrate src/timezone library for all platforms. There is more we canTom Lane2004-05-21
| | | | | | and should do now that we control our own destiny for timezone handling, but this commit gets the bulk of the picayune diffs in place. Magnus Hagander and Tom Lane.
* Solve the 'Turkish problem' with undesirable locale behavior for caseTom Lane2004-05-07
| | | | | | | | | | | | | conversion of basic ASCII letters. Remove all uses of strcasecmp and strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp; remove most but not all direct uses of toupper and tolower in favor of pg_toupper and pg_tolower. These functions use the same notions of case folding already developed for identifier case conversion. I left the straight locale-based folding in place for situations where we are just manipulating user data and not trying to match it to built-in strings --- for example, the SQL upper() function is still locale dependent. Perhaps this will prove not to be what's wanted, but at the moment we can initdb and pass regression tests in Turkish locale.
* Repair problem identified by Olivier Prenant: ALTER DATABASE SET search_pathTom Lane2004-01-19
| | | | | | | | | | | should not be too eager to reject paths involving unknown schemas, since it can't really tell whether the schemas exist in the target database. (Also, when reading pg_dumpall output, it could be that the schemas don't exist yet, but eventually will.) ALTER USER SET has a similar issue. So, reduce the normal ERROR to a NOTICE when checking search_path values for these commands. Supporting this requires changing the API for GUC assign_hook functions, which causes the patch to touch a lot of places, but the changes are conceptually trivial.
* Back out:Bruce Momjian2003-12-21
| | | | | | | > Attached is a patch that addressed all the discussed issues > that did not break backward compatability, including the > ability to output ISO-8601 compliant intervals by setting > datestyle to iso8601basic.
* In my mind there were two categories of open issuesBruce Momjian2003-12-20
| | | | | | | | | | | | | | | | | | | | | | | | a) ones that are 100% backward (such as the comment about outputting this format) and b) ones that aren't (such as deprecating the current postgresql shorthand of '1Y1M'::interval = 1 year 1 minute in favor of the ISO-8601 'P1Y1M'::interval = 1 year 1 month. Attached is a patch that addressed all the discussed issues that did not break backward compatability, including the ability to output ISO-8601 compliant intervals by setting datestyle to iso8601basic. Interval values can now be written as ISO 8601 time intervals, using the "Format with time-unit designators". This format always starts with the character 'P', followed by a string of values followed by single character time-unit designators. A 'T' separates the date and time parts of the interval. Ron Mayer
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Implement isolation levels read uncommitted and repeatable read as actingPeter Eisentraut2003-11-06
| | | | like the next higher one.
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* Apply (a somewhat revised version of) Greg Mullane's patch to eliminateTom Lane2003-07-29
| | | | | | | | | heuristic determination of day vs month in date/time input. Add the ability to specify that input is interpreted as yy-mm-dd order (which formerly worked, but only for yy greater than 31). DateStyle's input component now has the preferred spellings DMY, MDY, or YMD; the older keywords European and US are now aliases for the first two of these. Per recent discussions on pgsql-general.
* A visit from the message-style police ...Tom Lane2003-07-28
|
* Another round of error message editing, covering backend/commands/.Tom Lane2003-07-20
|
* Make EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE follow the SQL conventionTom Lane2003-07-17
| | | | | | for the sign of timezone offsets, ie, positive is east from UTC. These were previously out of step with other operations that accept or show timezones, such as I/O of timestamptz values.
* Now that I look, SHOW TRANSACTION_ISOLATION isn't quite consistentTom Lane2003-07-15
| | | | with SET TRANSACTION_ISOLATION, either.
* Cause SHOW DATESTYLE to produce a string that will be accepted by SETTom Lane2003-07-15
| | | | | | DATESTYLE, for instance 'SQL, European' instead of 'SQL with European conventions'. Per gripe a month or two back from Barry Lind.
* Add is_superuser parameter reporting, soon to be used by psql.Tom Lane2003-06-27
|
* Add defense in assign_session_authorization() against trying to doTom Lane2003-06-06
| | | | | | catalog lookups when not in a transaction. This prevents bizarre failures if someone tries to set a value for session_authorization in postgresql.conf. Per report from Fernando Nasser.
* Add defense against possibility that tzname[] doesn't exist.Tom Lane2003-05-22
|
* Add code to test for unknown timezone names (following some ideas fromTom Lane2003-05-18
| | | | | | | | Ross Reedstrom, a couple months back) and to detect timezones that are using leap-second timekeeping. The unknown-zone-name test is pretty heuristic and ugly, but it seems better than the old behavior of just switching to GMT given a bad name. Also make DecodePosixTimezone() a tad more robust.
* Clean up some problems in SetClientEncoding: failed to honor doit flagTom Lane2003-04-27
| | | | | | | in all cases, leaked TopMemoryContext memory in others. Make the interaction between SetClientEncoding and InitializeClientEncoding cleaner and better documented. I suspect these changes should be back-patched into 7.3, but will wait on Tatsuo's verification.
* In the continuing saga of FE/BE protocol revisions, add reporting ofTom Lane2003-04-25
| | | | | | | | | | | | | initial values and runtime changes in selected parameters. This gets rid of the need for an initial 'select pg_client_encoding()' query in libpq, bringing us back to one message transmitted in each direction for a standard connection startup. To allow server version to be sent using the same GUC mechanism that handles other parameters, invent the concept of a never-settable GUC parameter: you can 'show server_version' but it's not settable by any GUC input source. Create 'lc_collate' and 'lc_ctype' never-settable parameters so that people can find out these settings without need for pg_controldata. (These side ideas were all discussed some time ago in pgsql-hackers, but not yet implemented.)
* Fix assign_session_authorization() to not be confused by all-numericTom Lane2003-02-01
| | | | user names. Per recent reports.
* More cleanup of userid to be AclId rather than Oid.Bruce Momjian2002-12-05
|
* pgindent run.Bruce Momjian2002-09-04
|
* I have committed many support files for CREATE CONVERSION. DefaultTatsuo Ishii2002-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversion procs and conversions are added in initdb. Currently supported conversions are: UTF-8(UNICODE) <--> SQL_ASCII, ISO-8859-1 to 16, EUC_JP, EUC_KR, EUC_CN, EUC_TW, SJIS, BIG5, GBK, GB18030, UHC, JOHAB, TCVN EUC_JP <--> SJIS EUC_TW <--> BIG5 MULE_INTERNAL <--> EUC_JP, SJIS, EUC_TW, BIG5 Note that initial contents of pg_conversion system catalog are created in the initdb process. So doing initdb required is ideal, it's possible to add them to your databases by hand, however. To accomplish this: psql -f your_postgresql_install_path/share/conversion_create.sql your_database So I did not bump up the version in cataversion.h. TODO: Add more conversion procs Add [CASCADE|RESTRICT] to DROP CONVERSION Add tuples to pg_depend Add regression tests Write docs Add SQL99 CONVERT command? -- Tatsuo Ishii
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Katherine Ward wrote:Jan Wieck2002-06-11
| | | | | | | | | | | | | | > 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
* 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.
* Accept SET SESSION AUTHORIZATION DEFAULT and RESET SESSION AUTHORIZATIONTom Lane2002-05-06
| | | | | | | | to reset session userid to the originally-authenticated name. Also, relax SET SESSION AUTHORIZATION to allow specifying one's own username even if one is not superuser, so as to avoid unnecessary error messages when loading a pg_dump file that uses this command. Per discussion from several months ago.
* Convert GUC parameters back to strings if input as integers.Thomas G. Lockhart2002-04-22
| | | | | Change elog(ERROR) messages to say that a variable takes one parameter, rather than saying that it does not take multiple parameters.
* Check for multiple arguments on parameters which do not allow them.Thomas G. Lockhart2002-04-22
| | | | | The last version caught this with an assert because I wasn't sure whether we should elog(ERROR) or just loop through the parameters.