aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Although the flex documentation avers that yyalloc and yyrealloc takeTom Lane2009-07-13
| | | | | | | size_t arguments, the emitted scanner actually prototypes them with type yy_size_t, which is sometimes not the same thing depending on flex version and platform. Easiest fix seems to be to use yy_size_t. Per buildfarm results.
* Convert the core lexer and parser into fully reentrant code, by making useTom Lane2009-07-13
| | | | | | | | | | | of features added to flex and bison since this code was originally written. This change doesn't in itself offer any new capability, but it's needed infrastructure for planned improvements in plpgsql. Another feature now available in flex is the ability to make it use palloc instead of malloc, so do that to avoid possible memory leaks. (We should at some point change the other lexers likewise, but this commit doesn't touch them.)
* Advance the minimum required version of "flex" from 2.5.4 to 2.5.31, andTom Lane2009-07-13
| | | | | | | update documentation accordingly. This is required in order to have support for a reentrant scanner. I'm committing this bit separately in order to have an easy reference if we later decide to make the minimum something different (like 2.5.33).
* Stamp minor library version numbers for 8.5; sorry for the delay.Bruce Momjian2009-07-13
|
* Fix up PGDLLIMPORT marking for standard_conforming_strings. Moving itTom Lane2009-07-13
| | | | | into a header file that plpgsql's scan.l can see broke the previous kluge. Per buildfarm results.
* Move some declarations in the raw-parser header files to create a clearerTom Lane2009-07-12
| | | | | | | | | | distinction between the external API (parser.h) and declarations that only need to be visible within the raw parser code (gramparse.h, which now is only included by parser.c, gram.y, scan.l, and keywords.c). This is in preparation for the upcoming change to a reentrant lexer, which will require referencing YYSTYPE in the declarations of base_yylex and filtered_base_yylex, hence gram.h will have to be included by gramparse.h. We don't want any more files than absolutely necessary to depend on gram.h, so some cleanup is called for.
* Alter some gratuitous uses of "ANSI" when "SQL standard" might have beenPeter Eisentraut2009-07-11
| | | | meant or the reference to a standard was unnecessary.
* Correct what ISO stands forPeter Eisentraut2009-07-11
|
* Fix set_rel_width() to do something reasonable with non-Var items in aTom Lane2009-07-11
| | | | | | | | | | | | | RelOptInfo targetlist. It used to be that the only possibility other than a Var was a RowExpr representing a whole-row child Var, but as of 8.4's expanded ability to flatten appendrel members, we can get arbitrary expressions in there. Use the expression's type info and get_typavgwidth() to produce an at-least-marginally-sane result. Note that get_typavgwidth()'s fallback estimate (32 bytes) is the same as what was here before, so there will be no behavioral change for RowExprs. Noted while looking at recent gripe about constant quals pushed down to FunctionScan appendrel members ... not only were we failing to recognize the constant qual, we were getting the width estimate wrong :-(
* Fix xslt_process() to ensure that it inserts a NULL terminator after theTom Lane2009-07-10
| | | | | | | | | | | | last pair of parameter name/value strings, even when there are MAXPARAMS of them. Aboriginal bug in contrib/xml2, noted while studying bug #4912 (though I'm not sure whether there's something else involved in that report). This might be thought a security issue, since it's a potential backend crash; but considering that untrustworthy users shouldn't be allowed to get their hands on xslt_process() anyway, it's probably not worth getting excited about.
* Remove no-longer-necessary transmission of postmaster's LC_COLLATE andTom Lane2009-07-08
| | | | | | LC_CTYPE settings to children via BackendParameters. Per discussion, the postmaster is now just using system defaults anyway, so we might as well save a few cycles during backend startup.
* Need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup.Heikki Linnakangas2009-07-08
| | | | | | | | Otherwise, the LC_CTYPE/COLLATE setting gets reverted when using plperl, which leads to incorrect query results and index corruption. This was accidentally broken in the per-database locale patch in 8.4. Pointed out by Andrew Gierth.
* Add missing HOUR TO SECOND option to list of possible INTERVAL field sets,Tom Lane2009-07-08
| | | | | | as noted by Sebastien Flaesch. Also update the claim that we simply throw away fields outside this set --- that got changed later to only discard less-significant fields.
* When calling unsupported "make check" with a pgxs module, return a nonzeroPeter Eisentraut2009-07-08
| | | | exit code.
* Just a little more schema-qualification ...Tom Lane2009-07-07
|
* psql backward compatibility fixPeter Eisentraut2009-07-07
| | | | | | | For servers older than 8.3, sort display of child tables by relname instead of oid::regclass::text, because the cast from regclass to text did not work back then. The older display may be slightly worse when different schemas are involved, but that should be rare enough.
* Don't use 'return' where you should use 'PG_RETURN_xxx'.Tom Lane2009-07-07
|
* Query in SQL function still not schema-safe; add a coupleTom Lane2009-07-07
| | | | more pg_catalog. qualifications.
* Sort child tables by name instead of OID in \d+ displayPeter Eisentraut2009-07-07
| | | | This was an oversight in the recent patch. Found by Tom Lane.
* Fix typo in comment.Tom Lane2009-07-07
|
* More sensible character_octet_lengthPeter Eisentraut2009-07-07
| | | | | | | For character types with typmod, character_octet_length columns in the information schema now show the maximum character length times the maximum length of a character in the server encoding, instead of some huge value as before.
* Code review for patch to show definition of index columns in \d on index.Tom Lane2009-07-07
| | | | | | Safely schema-qualify the pg_get_indexdef call, make the query a bit prettier in -E mode, remove useless join to pg_index, make it more obvious that the header[] array is not overrun.
* Use floor() not rint() when reducing precision of fractional seconds inTom Lane2009-07-06
| | | | | | | | | | timestamp_trunc, timestamptz_trunc, and interval_trunc(). This change only affects the float-datetime case; the integer-datetime case already behaved like truncation instead of rounding. Per gripe from Mario Splivalo. This is a pre-existing issue but I'm choosing not to backpatch, because it's such a corner case and there have not been prior complaints. The issue is largely moot anyway given the trend towards integer datetimes.
* Fix ancient bug in handling of to_char modifier 'TH', when used with HH.Heikki Linnakangas2009-07-06
| | | | | In what seems like an oversight, we used to treat 'TH' the same as lowercase 'th', but only with HH/HH12.
* Fix set_append_rel_pathlist() to deal intelligently with cases whereTom Lane2009-07-06
| | | | | | | | | | | substituting a child rel's output expressions into the appendrel's restriction clauses yields a pseudoconstant restriction. We might be able to skip scanning that child rel entirely (if we get constant FALSE), or generate a one-time filter. 8.3 more or less accidentally generated plans that weren't completely stupid in these cases, but that was only because an extra recursive level of subquery_planner() always occurred and allowed const-simplification to happen. 8.4's ability to pull up appendrel members with non-Var outputs exposes the fact that we need to work harder here. Per gripe from Sergey Burladyan.
* Show definition of index columns in \d on indexPeter Eisentraut2009-07-06
| | | | | | | | | This adds a column called "Definition" to the output of psql \d on an index, which shows the full expression behind the index column. For indexes on plain columns, this is redundant, but for expression indexes, this reveals the real expression. Author: Khee Chin <kheechin@gmail.com>
* Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allowTom Lane2009-07-06
| | | | | | | parentheses around the <query expression body> that follows a WITH clause, eg with cte(foo) as ( values(0) ) ((select foo from cte)); This seems to be just an oversight/thinko in gram.y. Noted while experimenting with bug #4902.
* Fix handling of changed-Param signaling for CteScan plan nodes. We were usingTom Lane2009-07-06
| | | | | | | | | | the "cteParam" as a proxy for the possibility that the underlying CTE plan depends on outer-level variables or Params, but that doesn't work very well because it sometimes causes calling subqueries to be treated as SubPlans when they could be InitPlans. This is inefficient and also causes the outright failure exhibited in bug #4902. Instead, leave the cteParam out of it and copy the underlying CTE plan's extParams directly. Per bug #4902 from Marko Tiikkaja.
* Add log_line_prefix placeholder %e to contain the current SQL statePeter Eisentraut2009-07-03
| | | | Author: Guillaume Smet <guillaume.smet@gmail.com>
* Have \d show child tables that inherit from the specified parentPeter Eisentraut2009-07-03
| | | | | | | As per discussion, \d shows only the number of child tables, because that could be hundreds, when used for partitioning. \d+ shows the actual list. Author: Damien Clochard <damien@dalibo.info>
* Fix up pg_dump's --binary-upgrade option so that it behaves properly withTom Lane2009-07-02
| | | | inherited columns and check constraints. Per my recent trouble report.
* Upgrade to Autoconf 2.63Peter Eisentraut2009-07-02
| | | | | | | | This upgrades the configure infrastructure to the latest Autoconf version. Some notable news are: - The workaround for the broken fseeko() test is gone. - Checking for unknown options is now provided by Autoconf itself. - Fixes for Mac OS X
* Regression test for XML mapping functionalityPeter Eisentraut2009-07-02
| | | | | | I wrote this one while chasing down some bugs in the closing days of 8.4. It could be useful in the long run. This area of the code had no test coverage at all before.
* Remove useless References column for pg_listener catalog description. Per ↵Tom Lane2009-07-01
| | | | Shigehiro Honda.
* Stamp HEAD as 8.5devel.Tom Lane2009-07-01
|
* Add missed src/include/foreign subdirectory to the set installed intoTom Lane2009-06-30
| | | | INSTALLDIR/include/server/. Itagaki Takahiro
* Revert addition of "o" to tar options. This was intended to fix bug #4883,REL8_4_0Tom Lane2009-06-27
| | | | | | | | | | | but the cure appears to be worse than the disease. It turns out that GNU tar versions 1.14.x misinterpret -o as --same-owner, not --no-same-owner, leading to exactly the wrong behavior for both root and nonroot users. While that bug has been fixed for nearly five years, these tar versions are still found in the wild, notably in OS X 10.4. Given that #4883 was the first complaint we'd heard, it's definitely not worth fixing at the risk of breaking things for other users. Perhaps revisit at a later date when we're not up against a release deadline.
* Bundle v8.4.0Marc G. Fournier2009-06-27
|
* Update release notes in final preparation for 8.4.0.Tom Lane2009-06-26
|
* Add a note about SystemTap vs DTrace spelling of probe names.Tom Lane2009-06-26
|
* Marginal improvement of description of recovery_end_command.Tom Lane2009-06-26
|
* Cleanup and code review for the patch that made bgwriter active duringTom Lane2009-06-26
| | | | | | | | | | | | | archive recovery. Invent a separate state variable and inquiry function for XLogInsertAllowed() to clarify some tests and make the management of writing the end-of-recovery checkpoint less klugy. Fix several places that were incorrectly testing InRecovery when they should be looking at RecoveryInProgress or XLogInsertAllowed (because they will now be executed in the bgwriter not startup process). Clarify handling of bad LSNs passed to XLogFlush during recovery. Use a spinlock for setting/testing SharedRecoveryInProgress. Improve quite a lot of comments. Heikki and Tom
* Translation updates for 8.4 release.Peter Eisentraut2009-06-26
| | | | | File that are translated less than 80% have been removed, as per new translation team policy.
* Extract tarballs with "o" option (tar xof), to behave reasonably when runPeter Eisentraut2009-06-26
| | | | | | as root, as would usually be the case during make install. per bug #4883
* Use $(TAR) instead of tar in makefiles.Peter Eisentraut2009-06-26
|
* Add __attribute__((format_arg(1))) to the declaration of err_gettext(),Tom Lane2009-06-25
| | | | | to restore gcc's ability to crosscheck format arguments within elog.c. Noted in a test compilation with -Wformat-nonliteral enabled.
* Fix some serious bugs in archive recovery, now that bgwriter is activeHeikki Linnakangas2009-06-25
| | | | | | | | | | | | | | | | | | | | during it: When bgwriter is active, the startup process can't perform mdsync() correctly because it won't see the fsync requests accumulated in bgwriter's private pendingOpsTable. Therefore make bgwriter responsible for the end-of-recovery checkpoint as well, when it's active. When bgwriter is active (= archive recovery), the startup process must not accumulate fsync requests to its own pendingOpsTable, since bgwriter won't see them there when it performs restartpoints. Make startup process drop its pendingOpsTable when bgwriter is launched to avoid that. Update minimum recovery point one last time when leaving archive recovery. It won't be updated by the end-of-recovery checkpoint because XLogFlush() sees us as out of recovery already. This fixes bug #4879 reported by Fujii Masao.
* Man pages back to lowercase names, with additional fixup to make the .soPeter Eisentraut2009-06-25
| | | | links work.
* Make prior patch pgindent-safe.Tom Lane2009-06-25
|
* The code to unlink dropped relations in FinishPreparedTransaction() wasHeikki Linnakangas2009-06-25
| | | | | | acting like runs inside WAL recovery, but it doesn't. I must've copy-pasted this from a redo-function in the relation forks patch. Noticed by Tom Lane while he was looking through callers of smgrdounlink().