aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
Commit message (Collapse)AuthorAge
* Prevent to_char(interval) from dumping core on month-related formatsTom Lane2005-03-26
| | | | when a zero-month interval is given. Per discussion with Karel.
* array_map can't use the fn_extra field of the provided fcinfo struct asTom Lane2005-03-24
| | | | | its private storage, because that belongs to the function that it is supposed to call. Per report from Ezequiel Tolnay.
* interval_out failed to mention 'ago' for negative intervals in SQL andTom Lane2005-01-11
| | | | GERMAN datestyles. Ancient bug reported by Terry Lee Tucker.
* Make array_cat more paranoid about checking datatypes in empty arrays.Tom Lane2004-12-17
|
* array_map failed to insert correct result type in an empty array.Tom Lane2004-12-17
| | | | Per example from Florian Pflug.
* Avoid generating excess (and illegal) parentheses around an aliased JOINTom Lane2004-12-13
| | | | in prettyprint mode. Andreas Pflug
* Teach regex_fixed_prefix() the correct handling of advanced regexTom Lane2004-12-02
| | | | | | escapes --- they aren't simply quoted characters. Problem noted by Antti Salmela. Also fix problem with incorrect handling of multibyte characters when followed by a quantifier.
* Fix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332.Tom Lane2004-12-01
|
* Our interface code for Spencer's regexp package was checking for regexpTom Lane2004-11-24
| | | | | | | error conditions during regexp compile, but not during regexp execution; any sort of "can't happen" errors would be treated as no-match instead of being reported as they should be. Noticed while trying to duplicate a reported Tcl bug.
* Repair possible failure to update hint bits back to disk, perTom Lane2004-10-13
| | | | | | http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php. I plan a more permanent fix in HEAD, but for the back branches it seems best to just touch the places that actually have a problem.
* Convert pg_stat_get_backend_idset to use the existing SRF support.Tom Lane2004-10-01
| | | | | | This seems the cleanest way of fixing its lack of a shutdown callback, which was preventing it from working correctly in a query that didn't run it to completion. Per bug report from Szima GÄbor.
* Fix broken logic for pretty-printing parenthesis-suppression in UNIONTom Lane2004-07-06
| | | | et al.
* Suppress compile warnings on machines where the INT64CONST() decorationTom Lane2004-06-13
| | | | is actually needed. Backport of Oliver Elphick's recent patch.
* Add missing check for too-few-inputs when replacing a zero-dimensionalTom Lane2004-06-08
| | | | array.
* I think I've finally identified the cause of the off-by-one-secondTom Lane2004-05-31
| | | | | | | | | | issue in timestamp conversion that we hacked around for so long by ignoring the seconds field from localtime(). It's simple: you have to watch out for platform-specific roundoff error when reducing a possibly-fractional timestamp to integral time_t form. In particular we should subtract off the already-determined fractional fsec field. This should be enough to get an exact answer with int64 timestamps; with float timestamps, throw in a rint() call just to be sure.
* Tighten up overflow check in path_recv, pursuant to code review inspiredTom Lane2004-05-12
| | | | | | by Ken Ashcraft's report. I think there is no actual bug here since if the int32 value does wrap a little bit, palloc will still reject it. Still it's better that the code be obviously correct.
* NATURAL CROSS JOIN is a contradiction in terms, not to mention disallowedTom Lane2004-05-07
| | | | | by the SQL spec and by our parser. Thanks to Jonathan Scott for finding this longstanding error.
* Don't assume that struct timeval's tv_sec field is the same datatype asTom Lane2004-05-05
| | | | time_t; on some platforms they are not the same width. Per Manfred Koizar.
* genericcostestimate() neglected to include qual startup cost inTom Lane2004-02-27
| | | | | indexTotalCost. I think this may not make any real difference in 7.4, but it definitely is a problem with CVS tip's new equation.
* Implement a solution to the 'Turkish locale downcases I incorrectly'Tom Lane2004-02-21
| | | | | | problem, per previous discussion. Make some additional changes to centralize the knowledge of just how identifier downcasing is done, in hopes of simplifying any future tweaking in this area.
* Ensure that memcmp() does not run off the end of memory, per Kurt Roeckx.Tom Lane2004-02-03
| | | | (Same patch committed to HEAD but I fat-fingered the commit message...)
* Avoid generating invalid character encoding sequences in make_greater_string.Tom Lane2004-02-02
| | | | Not sure how this mistake evaded detection for so long.
* Fix text_position to not scan past end of source string in multibyteTom Lane2004-01-31
| | | | case, per report from Korea PostgreSQL Users' Group.
* Make to_hex() behave portably on negative input values (treat them asTom Lane2003-12-19
| | | | unsigned integers). Per report from Jim Crate.
* Fix DecodeInterval to handle '-0.1' sanely, per gripe from Tilo Schwarz.Tom Lane2003-12-17
|
* Repair indexed bytea like operations, and related selectivityJoe Conway2003-12-07
| | | | | functionality. Per bug report by Alvar Freude: http://archives.postgresql.org/pgsql-bugs/2003-12/msg00022.php
* netmask() and hostmask() functions should return maximum-length masklen,Tom Lane2003-12-01
| | | | per gripe from Joe Sunday.
* Make PQescapeBytea and byteaout consistent with each other, andJoe Conway2003-11-30
| | | | | | octal escape all octets outside the range 0x20 to 0x7e. This fixes the problem pointed out by Sergey Yatskevich here: http://archives.postgresql.org/pgsql-bugs/2003-11/msg00140.php
* Fix datetime input parsing to accept YYYY-MONTHNAME-DD and related syntaxes,Tom Lane2003-11-16
| | | | | | which had been unintentionally broken by recent changes to tighten up the DateStyle rules for all-numeric date input. Add documentation and regression tests for this, too.
* Fix for possible referential integrity violation when a qualified ON INSERTJan Wieck2003-10-31
| | | | | | | | rule split the query into one INSERT and one UPDATE where the UPDATE then hit's the just created row without modifying the key fields again. In this special case, the new key slipped in totally unchecked. Jan
* Fix some corner cases in ACL manipulation: don't foul up on an emptyTom Lane2003-10-29
| | | | | | ACL array, and force languages to be treated as owned by the bootstrap user ID. (pg_language should have a lanowner column, but until it does this will have to do as a workaround.)
* Avoid division by zero in estimate_num_groups() when table has no rows.Tom Lane2003-10-16
|
* During ALTER TABLE ADD FOREIGN KEY, try to check the existing rows usingTom Lane2003-10-06
| | | | | | a single LEFT JOIN query instead of firing the check trigger for each row individually. Stephan Szabo, with some kibitzing from Tom Lane and Jan Wieck.
* Fix pg_get_constraintdef() to ensure CHECK constraints are always shownTom Lane2003-10-04
| | | | | | | with required outer parentheses. Breakage seems to be leftover from domain-constraint patches. This could be smarter about suppressing extra parens, but at this stage of the release cycle I want certainty not cuteness.
* When dumping CREATE INDEX, must show opclass name if the opclass isn'tTom Lane2003-10-02
| | | | | | in the schema search path. Otherwise pg_dump doesn't correctly dump scenarios where a custom opclass is created in 'public' and then used by indexes in other schemas.
* Repair RI trigger visibility problems (this time for sure ;-)) per recentTom Lane2003-10-01
| | | | | | | discussion on pgsql-hackers: in READ COMMITTED mode we just have to force a QuerySnapshot update in the trigger, but in SERIALIZABLE mode we have to run the scan under a current snapshot and then complain if any rows would be updated/deleted that are not visible in the transaction snapshot.
* The brackets aren't put on the CHECK constraints properly.Bruce Momjian2003-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before patch: test=# select pg_get_constraintdef(oid) from pg_constraint; pg_get_constraintdef ------------------------------------------------------------------------------------------------- CHECK (VALUE >= 0) CHECK ((((a)::text = 'asdf'::text) OR ((a)::text = 'fdsa'::text)) OR ((a)::text = 'dfd'::text)) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) test=# select pg_get_constraintdef(oid, true) from pg_constraint; pg_get_constraintdef ----------------------------------------------------------------------------------- CHECK VALUE >= 0 CHECK a::text = 'asdf'::text OR a::text = 'fdsa'::text OR a::text = 'dfd'::text PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) After patch: test=# select pg_get_constraintdef(oid) from pg_constraint; pg_get_constraintdef ------------------------------------------------------------------------------------------------- CHECK (VALUE >= 0) CHECK ((((a)::text = 'asdf'::text) OR ((a)::text = 'fdsa'::text)) OR ((a)::text = 'dfd'::text)) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) test=# select pg_get_constraintdef(oid, true) from pg_constraint; pg_get_constraintdef ----------------------------------------------------------------------------------- CHECK (VALUE >= 0) ` CHECK (a::text = 'asdf'::text OR a::text = 'fdsa'::text OR a::text = 'dfd'::text) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) It's important that those brackets are there to (a) match all other constraints and (b) so that people can just copy and paste them and it will work as SQL. Christopher Kings-Lynne
* More message editing, some suggested by Alvaro HerreraPeter Eisentraut2003-09-29
|
* Now that we have UPDATE tab SET col = DEFAULT, get rid of horrid hackTom Lane2003-09-28
| | | | | | in the RI triggers for ON DELETE/UPDATE SET DEFAULT. The code depended way too much on knowledge of plan structure, and yet still would fail if the generated query got rewritten by rules.
* Various message fixes, among those fixes for the previous round of fixesPeter Eisentraut2003-09-26
|
* Get rid of ReferentialIntegritySnapshotOverride by extending Executor APITom Lane2003-09-25
| | | | | | to allow es_snapshot to be set to SnapshotNow rather than a query snapshot. This solves a bug reported by Wade Klaver, wherein triggers fired as a result of RI cascade updates could misbehave.
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* OK, some of these syntax errors should be given other codes.Peter Eisentraut2003-09-15
|
* Okay, I've had it with mktime() bugs. While chasing Torello Querci'sTom Lane2003-09-13
| | | | | | | | recent gripe, I discovered not one but two undocumented, undesirable behaviors of glibc's mktime. So, stop using it entirely, and always rely on inversion of localtime() to determine the local time zone. It's not even very much slower, as it turns out that mktime (at least in the glibc implementation) also does repeated reverse-conversions.
* Some "feature not supported" errors are better syntax errors, because thePeter Eisentraut2003-09-09
| | | | | feature they complain about isn't a feature or cannot be implemented without definitional changes.
* Repair problems with to_char() overrunning its input string.Tom Lane2003-09-03
| | | | From Karel Zak.
* Adjust date/time input parsing code to correctly distinguish the fourTom Lane2003-08-27
| | | | | | | SQLSTATE error codes required by SQL99 (invalid format, datetime field overflow, interval field overflow, invalid time zone displacement value). Also emit a HINT about DateStyle in cases where it seems appropriate. Per recent gripes.
* Call it Linux, not GNU/Linux.Bruce Momjian2003-08-26
|
* Add the Brazilian time zone abbreviations BRT, BRST, FNT, FNST.Tom Lane2003-08-25
| | | | | ACT and ACST were already present. AMT and AMST conflict with the existing entries for Armenia; no change there for the moment.
* Allow parsing of time and timetz inputs to accept the documented inputTom Lane2003-08-25
| | | | | syntax '040506' for '04:05:06', as well as '0405' for '04:05:00'. This has been broken since 7.2 but was only recently complained of.