aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Fix cash_in() to behave properly in locales where frac_digits is zero,Tom Lane2009-06-10
| | | | | | | eg Japan. Report and fix by Itagaki Takahiro. Also fix CASHDEBUG printout format for branches with 64-bit money type, and some minor comment cleanup. Back-patch to 7.4, because it's broken all the way back.
* Fix Linux typedef code.Bruce Momjian2009-06-10
|
* Correct/improve the datetime_precision field in the information schema.Peter Eisentraut2009-06-10
| | | | | | | | | | In particular, always show 0 for the date type instead of null, and show 6 (the default) for time, timestamp, and interval without a declared precision. This is now in fuller conformance with the SQL standard. Also clarify the documentation about this. discovered and analyzed by Konstantin Izmailov and Tom Lane
* Make handling of INTERVAL DAY TO MINUTE and INTERVAL DAY TO SECOND inputTom Lane2009-06-10
| | | | | | | | | | | | more consistent with other cases, by having an unlabeled integer field be treated as a number of minutes or seconds respectively. These cases are outside the spec (which insists on full "dd hh:mm" or "dd hh:mm:ss" input respectively), so it's not much help to us in deciding what to do. But with this change, it's uniformly the case that an unlabeled integer will be considered as being a number of the interval's rightmost field. The change also takes us back to the 8.3 behavior of throwing error for certain ambiguous inputs such as INTERVAL '1 2' DAY TO MINUTE. Per recent discussion.
* Ensure xmlFree(NULL) is a no-op instead of a core dump. Per report fromTom Lane2009-06-10
| | | | | | | | | Sergey Burladyan, there are at least some dank corners of libxml2 that assume this behavior, even though their published documentation suggests they shouldn't. This is only really a live problem in 8.3, but the code is still there for possible debugging use in HEAD, so patch both branches.
* Fix BSD find_typedef logic.Bruce Momjian2009-06-10
|
* Update pgindent instructions.Bruce Momjian2009-06-10
|
* Document new location for typedef list.Bruce Momjian2009-06-10
|
* Fix xmlattribute escaping XML special characters twice (bug #4822).Peter Eisentraut2009-06-09
| | | | Author: Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>
* Mark internal_in as not strict, so that the construct "null::internal"Tom Lane2009-06-09
| | | | | | | | | | | | | | | | | | | | will throw an error, rather than possibly allowing someone to synthesize a manual call to an internal-accepting function. As of CVS HEAD and existing releases, all such functions are either STRICT or careful about null inputs, so there is no current security issue here. But it seems like a good idea to lock this down to protect against future mistakes. In passing, similarly lock down trigger_in, language_handler_in, opaque_in, and shell_in. These are not believed to present any security risk, but there's still no good reason to allow nulls of these types to be created. I left the polymorphic pseudotypes (anyelement etc) alone, since a null of one of those types doesn't seem to be a problem --- the worst you can say about it is that it doesn't have an underlying non-polymorphic type. If we were to make this change during normal development, we'd just automatically bump catversion for a pg_proc.h change. But since this doesn't create a compatibility risk and isn't believed to be fixing a live bug, it seems better not to force a catversion bump in late beta.
* Fix typo, per TomAlvaro Herrera2009-06-09
|
* Switch order of tests to avoid possible Assert failure forTom Lane2009-06-09
| | | | | | "array_agg_finalfn(null)". We should modify pg_proc entries to prevent this query from being accepted, but let's just make the function itself secure too. Per my note of today.
* Dynamically set a lower bound on autovacuum nap time so that we don't rebuildAlvaro Herrera2009-06-09
| | | | | | | the database list too often. Per bug report from Łukasz Jagiełło and ensuing discussion on pgsql-performance.
* Fix failure to double-quote function argument names when needed, inTom Lane2009-06-09
| | | | | pg_get_function_arguments() and related functions. Per report from Andreas Nolte.
* Fix map_sql_table_to_xmlschema() with dropped attributes.Peter Eisentraut2009-06-08
| | | | also backpatched to 8.3
* Improve the IndexVacuumInfo/IndexBulkDeleteResult API to allow somewhat saneTom Lane2009-06-06
| | | | | | | | | | | | | | | | | | | behavior in cases where we don't know the heap tuple count accurately; in particular partial vacuum, but this also makes the API a bit more useful for ANALYZE. This patch adds "estimated_count" flags to both structs so that an approximate count can be flagged as such, and adjusts the logic so that approximate counts are not used for updating pg_class.reltuples. This fixes my previous complaint that VACUUM was putting ridiculous values into pg_class.reltuples for indexes. The actual impact of that bug is limited, because the planner only pays attention to reltuples for an index if the index is partial; which probably explains why beta testers hadn't noticed a degradation in plan quality from it. But it needs to be fixed. The whole thing is a bit messy and should be redesigned in future, because reltuples now has the potential to drift quite far away from reality when a long period elapses with no non-partial vacuums. But this is as good as it's going to get for 8.4.
* Move variable declaration to avoid 'unused variable' warning when theTom Lane2009-06-06
| | | | ifdef doesn't trigger. Not worth back-patching. Per buildfarm reports.
* Fix a serious bug introduced into GIN in 8.4: now that MergeItemPointers()Tom Lane2009-06-06
| | | | | | | | | is supposed to remove duplicate heap TIDs, we have to be sure to reduce the tuple size and posting-item count accordingly in addItemPointersToTuple(). Failing to do so resulted in the effective injection of garbage TIDs into the index contents, ie, whatever happened to be in the memory palloc'd for the new tuple. I'm not sure that this fully explains the index corruption reported by Tatsuo Ishii, but the test case I'm using no longer fails.
* Adjust recent PERL_SYS_INIT3 call to avoid platforms where it might fail, ↵Andrew Dunstan2009-06-05
| | | | and to remove compilation warning. Backpatch the release 7.4
* GIN's ItemPointerIsMin, ItemPointerIsMax, and ItemPointerIsLossyPage macrosTom Lane2009-06-05
| | | | | | | | | | | | should use GinItemPointerGetBlockNumber/GinItemPointerGetOffsetNumber, not ItemPointerGetBlockNumber/ItemPointerGetOffsetNumber, because the latter will Assert() on ip_posid == 0, ie a "Min" pointer. (Thus, ItemPointerIsMin has never worked at all, but it seems unused at present.) I'm not certain that the case can occur in normal functioning, but it's blowing up on me while investigating Tatsuo-san's data corruption problem. In any case it seems like a problem waiting to bite someone. Back-patch just in case this really is a problem for somebody in the field.
* Search for versioned perl library instead of using hardcoded name on ↵Andrew Dunstan2009-06-05
| | | | Windows. Backpatch to release 8.3
* Trivial code style cleanup around a couple of ngettext calls.Tom Lane2009-06-04
|
* Remove a couple of debugging messages that have been #ifdef'd out for ages.Tom Lane2009-06-04
| | | | | Seems silly to ask translators to expend work on these, especially in pluralized variants.
* Improve the recently-added support for properly pluralized error messagesTom Lane2009-06-04
| | | | | | | | | | by extending the ereport() API to cater for pluralization directly. This is better than the original method of calling ngettext outside the elog.c code because (1) it avoids double translation, which wastes cycles and in the worst case could give a wrong result; and (2) it avoids having to use a different coding method in PL code than in the core backend. The client-side uses of ngettext are not touched since neither of these concerns is very pressing in the client environment. Per my proposal of yesterday.
* Initialise perl library as documented in perl API. Backpatch to release 7.4.Andrew Dunstan2009-06-04
|
* Clean up ecpg's use of mmerror(): const-ify the format argument, add anTom Lane2009-06-03
| | | | | | __attribute__() marker so that gcc can validate the format string against the actual arguments, get rid of overcomplicated and unsafe usage in base_yyerror().
* Fix tsquerysel() to not fail on an empty TSQuery. Per report fromTom Lane2009-06-03
| | | | Tatsuo Ishii.
* Change rather bizarre code ordering in get_id(). This isn't strictlyTom Lane2009-06-03
| | | | | | cosmetic --- I'm wondering if geteuid could have side effects on errno, thus possibly resulting in a misleading error message after failure of getpwuid.
* Improve comment about 'if (1)' hack in copy.c macros.Tom Lane2009-06-03
|
* Add comment about why "((void) 0)" is used in copy macros.Bruce Momjian2009-06-03
|
* Only recycle normal files in pg_xlog as WAL segments. pg_standby createsHeikki Linnakangas2009-06-02
| | | | | | | | symbolic links with the -l option, and as Fujii Masao pointed out we ended up overwriting files in the archive directory before this patch. Patch by Aidan Van Dyk, Fujii Masao and me. Backpatch to 8.3, where pg_standby was introduced.
* Change AdjustIntervalForTypmod to not discard higher-order field values on theTom Lane2009-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | grounds that they don't fit into the specified interval qualifier (typmod). This behavior, while of long standing, is clearly wrong per spec --- for example the value INTERVAL '999' SECOND means 999 seconds and should not be reduced to less than 60 seconds. In some cases there could be grounds to raise an error if higher-order field values are not given as zero; for example '1 year 1 month'::INTERVAL MONTH should arguably be taken as an error rather than equivalent to 13 months. However our internal representation doesn't allow us to do that in a fashion that would consistently reject all and only the cases that a strict reading of the spec would suggest. Also, seeing that for example INTERVAL '13' MONTH will print out as '1 year 1 mon', we have to be careful not to create a situation where valid data will fail to dump and reload. The present patch therefore takes the attitude of not throwing an error in any such case. We might want to revisit that in future but it would take more redesign than seems prudent in late beta. Per a complaint from Sebastien Flaesch and subsequent discussion. While at other times we might have just postponed such an issue to the next development cycle, 8.4 already has changed the parsing of interval literals quite a bit in an effort to accept all spec-compliant cases correctly. This seems like a change that should be part of that rather than coming along later.
* Fix DecodeInterval to report an error for multiple occurrences of DAY, WEEK,Tom Lane2009-06-01
| | | | | | | | | | | YEAR, DECADE, CENTURY, or MILLENIUM fields, just as it always has done for other types of fields. The previous behavior seems to have been a hack to avoid defining bit-positions for all these field types in DTK_M() masks, rather than something that was really considered to be desired behavior. But there is room in the masks for these, and we really need to tighten up at least the behavior of DAY and YEAR fields to avoid unexpected behavior associated with the 8.4 changes to interpret ambiguous fields based on the interval qualifier (typmod) value. Per my example and proposed patch.
* Update obsolete comment in index_drop(). When the comment was written,Tom Lane2009-05-31
| | | | | | queries frequently took no lock at all on individual indexes. That's not true any more, but we still need lock on the parent table to make it safe to use cached lists of index OIDs.
* Change macros to make gcc quiet when parsing.Michael Meskes2009-05-29
|
* When archiving is enabled, rotate the last WAL segment at shutdown so thatHeikki Linnakangas2009-05-28
| | | | | | all transactions are archived. Original patch by Guillaume Smet.
* Properly return the usermap result when doing gssapi authentication. WithoutMagnus Hagander2009-05-27
| | | | | this, the username was in practice never matched against the kerberos principal used to log in.
* Fix to use the same format specifiers in both branches of a ngettext().Peter Eisentraut2009-05-27
| | | | Zdenek Kotala
* Ignore RECHECK in CREATE OPERATOR CLASS, just throwing a NOTICE, instead ofTom Lane2009-05-27
| | | | | | throwing an error as 8.4 had been doing. The error interfered with porting old database definitions (particularly for pg_migrator) without really buying any safety. Per bug #4817 and subsequent discussion.
* Fix compiler warnings on Sun Studio of the sortPeter Eisentraut2009-05-27
| | | | | | "tsquery_op.c", line 193: warning: syntax error: empty declaration Zdenek Kotala
* Reverting patch just in case a compiler treats this enum as signed.Michael Meskes2009-05-27
|
* Allow the second argument of pg_get_expr() to be just zero when deparsingTom Lane2009-05-26
| | | | | | | an expression that's not supposed to contain variables. Per discussion with Gevik Babakhani, this eliminates the need for an ugly kluge (namely, specifying some unrelated relation name). Remove one such kluge from pg_dump.
* Remove the useless and rather inconsistent return values of EncodeDateOnly,Tom Lane2009-05-26
| | | | | EncodeTimeOnly, EncodeDateTime, EncodeInterval. These don't have any good reason to fail, and their callers were mostly not checking anyway.
* Remove unused declarations of EncodeTimeOnly and DecodeTimeOnly.Tom Lane2009-05-26
|
* Add range checks to time_recv() and timetz_recv(), to prevent binary inputTom Lane2009-05-26
| | | | | | | | of time values that would not be accepted via textual input. Per gripe from Andrew McNamara. This is potentially a back-patchable bug fix, but for the moment it doesn't seem sufficiently high impact to justify doing that.
* Use more-portable coding for the check on handing out the last availableTom Lane2009-05-24
| | | | relopt_kind value in add_reloption_kind(). Per Zdenek Kotala.
* Fix LIKE's special-case code for % followed by _. I'm not entirely sure thatTom Lane2009-05-24
| | | | | | | | | | | this case is worth a special code path, but a special code path that gets the boundary condition wrong is definitely no good. Per bug #4821 from Andrew Gierth. In passing, clean up some minor code formatting issues (excess parentheses and blank lines in odd places). Back-patch to 8.3, where the bug was introduced.
* Resort tsvector's lexemes in tsvectorrecv instead of emmiting an error.Teodor Sigaev2009-05-21
| | | | | | | Basically, it's needed to support binary dump from 8.3 because ordering rule was changed. Per discussion with Bruce.
* Removed comparison of unsigned expression < 0.Michael Meskes2009-05-21
|
* Convert some messages to use ngettext().Peter Eisentraut2009-05-21
| | | | Author: Euler Taveira de Oliveira <euler@timbira.com>