summaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAgeFilesLines
* Update WIN32 branch from CVS HEAD.Bruce Momjian2003-09-072-11/+1
|
* Update this branch to match CVS head, includes WIN32 improvements.Bruce Momjian2003-09-0727-64291/+64735
|
* Rewrite array_cmp to not depend on deconstruct_array. Should be a littleTom Lane2003-08-151-37/+46
| | | | | faster, but more importantly does not leak memory. Still needs more work though, per my recent note to pgsql-hackers.
* Handle double-quotes correctly in user names in ACL lists.Tom Lane2003-08-141-17/+31
| | | | Christopher Kings-Lynne
* Rewriter and planner should use only resno, not resname, to identifyTom Lane2003-08-113-47/+52
| | | | | | | target columns in INSERT and UPDATE targetlists. Don't rely on resname to be accurate in ruleutils, either. This fixes bug reported by Donald Fraser, in which renaming a column referenced in a rule did not work very well.
* Code cleanup inspired by recent resname bug report (doesn't fix the bugTom Lane2003-08-112-6/+7
| | | | | | | | yet, though). Avoid using nth() to fetch tlist entries; provide a common routine get_tle_by_resno() to search a tlist for a particular resno. This replaces a couple uses of nth() and a dozen hand-coded search loops. Also, replace a few uses of nth(length-1, list) with llast().
* Another pgindent run with updated typedefs.Bruce Momjian2003-08-089-45/+46
|
* Conversion functions must be STRICT to prevent them from getting null inputs.Tom Lane2003-08-081-2/+2
|
* Fix floating-point timestamp comparisons to not go nuts if NaN isTom Lane2003-08-082-89/+67
| | | | | | encountered; per bug report from Christian van der Leeden 8/7/03. Also, adjust larger/smaller routines (MAX/MIN) to share code with comparisons for timestamp, interval, timetz.
* Improve documentation of ParseDateTime(). Reorder tests to preventTom Lane2003-08-051-22/+37
| | | | | | writing one more value into return arrays than will fit. This is potentially a stack smash, though I do not think it is a problem in current uses of the routine, since a failure return causes elog anyway.
* Fix several places where fractional-second inputs were misprocessedTom Lane2003-08-051-33/+38
| | | | | | in HAVE_INT64_TIMESTAMP cases, including two potential stack smashes when more than six fractional digits were supplied. Per bug report from Philipp Reisner.
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-0426-54/+54
| | | | so it won't miss 'em again.
* Remove --enable-recode feature, since it's been broken by IPv6 changes,Tom Lane2003-08-043-323/+3
| | | | and seems to have too few users to justify maintaining.
* Update copyrights to 2003.Bruce Momjian2003-08-0485-170/+170
|
* pgindent run.Bruce Momjian2003-08-0461-1768/+1950
|
* Reconsider context for calling callback functions --- original ideaTom Lane2003-08-031-13/+11
| | | | that they aren't part of error processing is clearly faulty.
* inet_recv() wasn't IPv6-ready.Tom Lane2003-08-011-13/+10
|
* Fix inconsistent static-vs-not-static declarations.Tom Lane2003-08-011-2/+2
|
* Fix my own mistake in GUC variable annotation.Tom Lane2003-08-011-4/+4
|
* Adjust 'permission denied' messages to be more useful and consistent.Tom Lane2003-08-012-8/+8
|
* Cause library-preload feature to report error if specified initializationTom Lane2003-07-311-2/+2
| | | | | function is not found. Also, make all the PL libraries have initialization functions with standard names. Patch from Joe Conway.
* Add pretty-printing variants of pg_get_viewdef and related functions.Tom Lane2003-07-301-183/+870
| | | | Patch from Andreas Pflug.
* Fix numeric_smaller, numeric_larger, float4smaller, float4larger,Tom Lane2003-07-302-57/+31
| | | | | | | | float8smaller, float8larger (and thereby the MIN/MAX aggregates on these datatypes) to agree with the datatypes' comparison operations as regards NaN handling. In all these datatypes, NaN is arbitrarily considered larger than any normal value ... but MIN/MAX had not gotten the word. Per recent discussion on pgsql-sql.
* Apply (a somewhat revised version of) Greg Mullane's patch to eliminateTom Lane2003-07-295-108/+140
| | | | | | | | | 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.
* Code review for recent GUC changes --- try to make it less obvious thatTom Lane2003-07-282-93/+118
| | | | | these things were added at different times by different people ;-). Includes Aizaz Ahmed's patch to remove duplicate array in help_config.c.
* There was enough code drift since this patch, that a couple of bugsBruce Momjian2003-07-281-2/+4
| | | | | | | | | | | materialized. New items have been added to GucContext and GucSource enums, but of course they were not added to the corresponding GucContextName[] and GucSourceName[] arrays in the patch. Here's a new patch to fix the resulting bugs. Joe Conway
* A visit from the message-style police ...Tom Lane2003-07-288-31/+31
|
* elog mop-up: bring some straggling fprintf(stderr)'s into the elog world.Tom Lane2003-07-272-47/+34
|
* Tom, happier with the attached patch?Bruce Momjian2003-07-271-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd have to disagree with regards to the memory leaks not being worth a mention - any such leak can cause problems when the PostgreSQL installation is either unattended, long-living andor has very high connection levels. Half a kilobyte on start-up isn't negligible in this light. Regards, Lee. Tom Lane writes: > Lee Kindness <lkindness@csl.co.uk> writes: > > Guys, attached is a patch to fix two memory leaks on start-up. > > I do not like the changes to miscinit.c. In the first place, it is not > a "memory leak" to do a one-time allocation of state for a proc_exit > function. A bigger complaint is that your proposed change introduces > fragile coupling between CreateLockFile and its callers, in order to > save no resources worth mentioning. More, it introduces an assumption > that the globals directoryLockFile and socketLockFile don't change while > the postmaster is running. UnlinkLockFile should unlink the file that > it was originally told to unlink, regardless of what happens to those > globals. > > If you are intent on spending code to free stuff just before the > postmaster exits, a better fix would be for UnlinkLockFile to free its > string argument after using it. Lee Kindness
* Error message editing in utils/adt. Again thanks to Joe Conway for doingTom Lane2003-07-2742-947/+1998
| | | | the bulk of the heavy lifting ...
* > Joe Conway <mail@joeconway.com> writes:Bruce Momjian2003-07-271-32/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >>ISTM that "source" is worth knowing. > > Hm, possibly. Any other opinions? This version has the seven fields I proposed, including "source". Here's an example that shows why I think it's valuable: regression=# \x Expanded display is on. regression=# select * from pg_settings where name = 'enable_seqscan'; -[ RECORD 1 ]----------- name | enable_seqscan setting | on context | user vartype | bool source | default min_val | max_val | regression=# update pg_settings set setting = 'off' where name = 'enable_seqscan'; -[ RECORD 1 ]--- set_config | off regression=# select * from pg_settings where name = 'enable_seqscan'; -[ RECORD 1 ]----------- name | enable_seqscan setting | off context | user vartype | bool source | session min_val | max_val | regression=# alter user postgres set enable_seqscan to 'off'; ALTER USER (log out and then back in again) regression=# \x Expanded display is on. regression=# select * from pg_settings where name = 'enable_seqscan'; -[ RECORD 1 ]----------- name | enable_seqscan setting | off context | user vartype | bool source | user min_val | max_val | In the first case, enable_seqscan is set to its default value. After setting it to off, it is obvious that the value has been changed for the session only. In the third case, you can see that the value has been set specifically for the user. Joe Conway
* This makes the initcap function compatible with Oracle 9i, it has beenBruce Momjian2003-07-271-2/+3
| | | | | | tested on both redhat 8 and FreebSD. -- Mike Nolan
* I corecting date_trunc('quarter',...) and friends because orig versionBruce Momjian2003-07-261-5/+5
| | | | | | doing '2003-07-30' -> '2003-04-01', '2003-11-30' ->'2003-07-01' B?jthe Zolt?n
* Error message editing in backend/utils (except /adt).Tom Lane2003-07-2526-516/+731
|
* Fix timestamp_date for HAVE_INT64_TIMESTAMP case.Tom Lane2003-07-241-2/+2
|
* Repair 7.3 breakage in timestamp-to-date conversion for dates before 2000.Tom Lane2003-07-241-8/+8
|
* Error message editing for foreign-key triggers.Tom Lane2003-07-221-284/+212
|
* Add GUC parameter to control rendezvous name.Bruce Momjian2003-07-222-1/+11
|
* Error message editing in backend/libpq, backend/postmaster, backend/tcop.Tom Lane2003-07-221-1/+37
| | | | | Along the way, fix some logic problems in pgstat_initstats, notably the bogus assumption that malloc returns zeroed memory.
* Another round of error message editing, covering backend/parser/.Tom Lane2003-07-191-2/+2
|
* First bits of work on error message editing.Tom Lane2003-07-182-17/+117
|
* Add cleaner formatting to config file.Bruce Momjian2003-07-181-38/+50
|
* Oh, for crying in a bucket ... relax Assert so that glibc's strxfrmTom Lane2003-07-171-2/+7
| | | | does not dump core.
* Work around buggy strxfrm() present in some Solaris releases.Tom Lane2003-07-171-15/+16
|
* Make EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE follow the SQL conventionTom Lane2003-07-173-19/+23
| | | | | | 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.
* Cause SHOW DATESTYLE to produce a string that will be accepted by SETTom Lane2003-07-151-2/+2
| | | | | | DATESTYLE, for instance 'SQL, European' instead of 'SQL with European conventions'. Per gripe a month or two back from Barry Lind.
* The default values for shared_buffers and max_connections are now 1000Tom Lane2003-07-142-6/+6
| | | | | | | | | and 100 respectively, if the platform will allow it. initdb selects values that are not too large to allow the postmaster to start, and places these values in the installed postgresql.conf file. This allows us to continue to start up out-of-the-box on platforms with small SHMMAX, while having somewhat-realistic default settings on platforms with reasonable SHMMAX. Per recent pghackers discussion.
* Fix a *second* buffer overrun bug in to_ascii(). Grumble.Tom Lane2003-07-141-48/+35
|
* Add description for new GUC context.Bruce Momjian2003-07-091-1/+2
| | | | Aizaz Ahmed
* Add special checks for non-super-user setting LOG_MIN_DURATION_STATEMENTBruce Momjian2003-07-091-4/+5
| | | | to zero.