summaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAgeFilesLines
* Add CREATE OR REPLACE FUNCTION syntax to allow replacing a functionTom Lane2001-10-021-1/+2
| | | | | definition without changing the function's OID, thereby not breaking rules, views, triggers, etc that depend on it. From Gavin Sherry.
* Extend pg_get_indexdef() to know about index predicates. Also, tweakTom Lane2001-10-011-104/+84
| | | | | | | | it to suppress index opclass output for opclasses that are the default for their datatype; only non-default opclasses are shown explicitly. This is expected to improve portability of the CREATE INDEX command across future versions of Postgres --- we've changed index opclasses too often in the past to think we won't do so again.
* Another round of cleanups for dynahash.c (maybe it's finally clean ofTom Lane2001-10-015-463/+316
| | | | | | | | | portability issues). Caller-visible data structures are now allocated on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'. Rejigger hash_create API so that caller specifies size of key and total size of entry, not size of key and size of rest of entry. This simplifies life considerably since each number is just a sizeof(), and padding issues etc. are taken care of automatically.
* Remove C++ style comment. Some compilers won't accept it.Tatsuo Ishii2001-10-011-2/+4
|
* Clean up encode/decode functions a little bit.Tom Lane2001-09-301-26/+22
|
* pg_stat_get_backend_idset should reset fmgr_info->fn_extra at end ofTom Lane2001-09-301-16/+12
| | | | execution, so that it restarts correctly if query tree is used again.
* Allow the postmaster to accept changes in PGC_BACKEND GUC variablesTom Lane2001-09-301-30/+42
| | | | | | from the config file, so that these changes will propagate to backends started later. Already-started backends continue to ignore changes in these variables.
* Create a GUC parameter max_files_per_process that is a configurableTom Lane2001-09-302-3/+8
| | | | | | | | | upper limit on what we will believe from sysconf(_SC_OPEN_MAX). The default value is 1000, so that under ordinary conditions it won't affect the behavior. But on platforms where the kernel promises far more than it can deliver, this can be used to prevent running out of file descriptors. See numerous past discussions, eg, pgsql-hackers around 23-Dec-2000.
* Cope with the likelihood that setlocale and localeconv will returnTom Lane2001-09-291-28/+70
| | | | | | pointers to data that will be changed by any later call to setlocale. Must copy what they return to be sure we get the right answer. Karel Zak, further tweaks by Tom Lane.
* Implement new 'lightweight lock manager' that's intermediate betweenTom Lane2001-09-293-7/+8
| | | | | | | | | existing lock manager and spinlocks: it understands exclusive vs shared lock but has few other fancy features. Replace most uses of spinlocks with lightweight locks. All remaining uses of spinlocks have very short lock hold times (a few dozen instructions), so tweak spinlock backoff code to work efficiently given this assumption. All per my proposal on pghackers 26-Sep-01.
* Measure the current transaction time to milliseconds.Thomas G. Lockhart2001-09-286-976/+1665
| | | | | | | | | | | | | | Define a new function, GetCurrentTransactionStartTimeUsec() to get the time to this precision. Allow now() and timestamp 'now' to use this higher precision result so we now have fractional seconds in this "constant". Add timestamp without time zone type. Move previous timestamp type to timestamp with time zone. Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss (note the "T" separating the day from hours information). Remove 'current' from date/time types; convert to 'now' in input. Separate time and timetz regression tests. Separate timestamp and timestamptz regression test.
* Remove useless LockDisable() function and associated overhead, per myTom Lane2001-09-271-6/+1
| | | | proposal of 26-Aug.
* Improve postgresql.conf descriptions.Bruce Momjian2001-09-271-6/+6
|
* Fix bug in mic2ascii(). It does not handle correctly if none ASCIITatsuo Ishii2001-09-251-2/+2
| | | | chars are in the input.
* Rename collect_* options to more user-friendly names.Peter Eisentraut2001-09-232-11/+11
|
* Make lpad/rpad/translate multibyte aware. Also add Copright notice etc.Tatsuo Ishii2001-09-231-5/+142
|
* Add pg_database_encoding_max_length() function.Tatsuo Ishii2001-09-231-1/+11
|
* Remove test driversTatsuo Ishii2001-09-226-405/+3
| | | | Also fix comment in conv.c.
* Make trim/ltrim/rtrim/btrim multibyte awareTatsuo Ishii2001-09-221-3/+1
| | | | (previous commit was missing commit messages)
* *** empty log message ***Tatsuo Ishii2001-09-221-4/+145
|
* Add an overall timeout on the client authentication cycle, so thatTom Lane2001-09-212-1/+10
| | | | | | | a hung client or lost connection can't indefinitely block a postmaster child (not to mention the possibility of deliberate DoS attacks). Timeout is controlled by new authentication_timeout GUC variable, which I set to 60 seconds by default ... does that seem reasonable?
* Fix type_maximum_size() to give the right answer in MULTIBYTE cases.Tom Lane2001-09-213-24/+52
| | | | Avoid use of prototype-less function pointers in MB code.
* Give VACUUM its own GUC parameter for memory usage, rather thanTom Lane2001-09-213-8/+13
| | | | | piggybacking on SortMem. Add documentation for some recently-added GUC parameters that had so far escaped it.
* Quick-and-dirty fix for recursive plpgsql functions, per bug report fromTom Lane2001-09-211-24/+8
| | | | | | | | Frank Miles 7-Sep-01. This is really just sticking a finger in the dike. Frank's case works now, but we still couldn't support a recursive function returning a set. Really need to restructure querytrees and execution state so that the querytree is *read only*. We've run into this over and over and over again ... it has to happen sometime soon.
* Provide tunable knob for x = NULL -> x IS NULL transformation, default to off.Peter Eisentraut2001-09-201-4/+2
|
* Remove old file.Peter Eisentraut2001-09-191-130/+0
|
* Suppress compiler warning.Tom Lane2001-09-171-6/+10
|
* Install dynamically loadable modules into a private subdirectoryPeter Eisentraut2001-09-162-13/+6
| | | | | | | | | under libdir, for a cleaner separation in the installation layout and compatibility with binary packaging standards. Point backend's default search location there. The contrib modules are also installed in the said location, giving them the benefit of the default search path as well. No changes in user interface nevertheless.
* > Here's a revised patch. Changes:Bruce Momjian2001-09-145-25/+680
| | | | | | | | | | | | | | | | | | | | | | | | > > 1. Now outputs '\\' instead of '\134' when using encode(bytea, 'escape') > Note that I ended up leaving \0 as \000 so that there are no ambiguities > when decoding something like, for example, \0123. > > 2. Fixed bug in byteain which allowed input values which were not valid > octals (e.g. \789), to be parsed as if they were octals. > > Joe > Here's rev 2 of the bytea string support patch. Changes: 1. Added missing declaration for MatchBytea function 2. Added PQescapeBytea to fe-exec.c 3. Applies cleanly on cvs tip from this afternoon I'm hoping that someone can review/approve/apply this before beta starts, so I guess I'd vote (not that it counts for much) to delay beta a few days :-) Joe Conway
* max_locks_per_transaction seems to be a more consistent name thanPeter Eisentraut2001-09-122-3/+3
| | | | max_locks_per_xact.
* It is not fixed and I doubt that it is working fine in current CVS. TheBruce Momjian2001-09-121-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bugfix is in the attached patch. Please apply it. Thanks. Output must be: test=# SELECT to_char(485, 'RN'); to_char ----------------- CDLXXXV (1 row) test=# SELECT to_char(485, 'FMRN'); to_char --------- CDLXXXV (1 row) test=# SELECT to_char(1000, 'RN'); to_char ----------------- M (1 row) test=# SELECT to_char(7.2, '"Welcome to"9.9 "release! :-)"'); to_char ----------------------------- Welcome to 7.2 release! :-) (1 row) Karel Zak
* Implement following item in TODO:Tatsuo Ishii2001-09-112-2/+22
| | | | * Reject character sequences those are not valid in their charset
* Implement following item in TODO:Tatsuo Ishii2001-09-112-55/+120
| | | | * Reject character sequences those are not valid in their charset
* Backout Karel's patchTatsuo Ishii2001-09-091-22/+6
|
* Apply 7.1.3 changes to the current tree also.Hiroshi Inoue2001-09-081-1/+11
|
* Make the world somewhat safe for (not from) DELETE FROM pg_shadow;Peter Eisentraut2001-09-083-6/+63
| | | | | | | | | | | | | | | | | | | | | 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).
* > > A simple and robus solution is in the begin of mbutils.c set defaultBruce Momjian2001-09-081-7/+11
| | | | | | | | | | > > ClientEncoding to SQL_ASCII (like default DatabaseEncoding). Bruce, can > > you change it? It's one line change. Again thanks. Forget it! A default client encoding must be set by actual database encoding... Please apply the small attached patch that solve it better. Karel Zak
* Clean up some confusion about where and how to set whereToSendOutput.Tom Lane2001-09-081-5/+2
| | | | | | | | We will no longer try to send elog messages to the client before we have initialized backend libpq (oops); however, reporting bogus commandline switches via elog does work now (not irrelevant, because of PGOPTIONS). Fix problem with inappropriate sending of checkpoint-process messages to stderr.
* Remove file, per Karel.Bruce Momjian2001-09-071-130/+0
|
* Remove variable length macros used in debugging, per Karel.Bruce Momjian2001-09-071-28/+10
|
* Remove unused files for Karel's patch.Bruce Momjian2001-09-074-519/+0
|
* Remove common.c, removed in Karal's patch.Bruce Momjian2001-09-071-99/+0
|
* Add missing files.Tatsuo Ishii2001-09-078-0/+1117
|
* Revise overflow test in int84() to avoid codegen bug in some olderTom Lane2001-09-071-5/+6
| | | | | versions of gcc. We don't really need to explicitly test the limits anyway, just reverse-convert and see if we get the same answer.
* Missed a few places that referred to a compile-time limit onTom Lane2001-09-071-8/+5
| | | | max_connections.
* Get rid of PID entries in shmem hash table; there is no longer any needTom Lane2001-09-072-4/+4
| | | | | | | for them, and making them just wastes time during backend startup/shutdown. Also, remove compile-time MAXBACKENDS limit per long-ago proposal. You can now set MaxBackends as high as your kernel can stand without any reconfiguration/recompilation.
* Commit Karel's patch.Tatsuo Ishii2001-09-068-214/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------- 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
* - new to_char(interval, text)Bruce Momjian2001-09-062-300/+432
| | | | | | | | | - new millisecond (ms) and microsecond (us) support - more robus parsing from string - used is separator checking for non-exact formats like to_date('2001-9-1', 'YYYY-MM-DD') - SGML docs are included Karel Zak
* Fix handling of pg_type.typdefault per bug report from Dave Blasby.Tom Lane2001-09-061-61/+31
| | | | | | If there's anyone out there who's actually using datatype-defined default values, this will be an incompatible change in behavior ... but the old behavior was so broken that I doubt anyone was using it.
* Fix confusion over static-ness of a subroutine.Tom Lane2001-08-271-2/+2
|