Commit Graph

24402 Commits

Author SHA1 Message Date
Bruce Momjian 4acc4aa871 Update wording:
< * Consider allowing configuration of TOAST thresholds
> * Allow user configuration of TOAST thresholds
2007-02-19 21:08:48 +00:00
Bruce Momjian bba9ec141f Add:
> * Consider allowing configuration of TOAST thresholds
>
>   http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php
>
2007-02-19 21:07:25 +00:00
Bruce Momjian 6042bb498c Add newlines. 2007-02-19 20:42:33 +00:00
Bruce Momjian 5855d2b593 Add:
> * Allow UPDATEs on only non-referential integrity columns not to conflict
>   with referential integrity locks
>
>   http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php
2007-02-19 20:41:40 +00:00
Bruce Momjian c7116a4112 Add:
> * Allow INSERT/UPDATE ... RETURNING inside a SELECT 'FROM' clause
>
>   http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php
>   http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php
>
2007-02-19 20:06:56 +00:00
Bruce Momjian 11fa6f59da Clarify documentation that initdb -A or editing pg_hba.conf is required
if you do not trust local users.
2007-02-19 18:57:18 +00:00
Bruce Momjian 70007b4dd5 Clarify documentation for "day of the week" handling for to_char() and
EXTRACT().
2007-02-19 18:20:06 +00:00
Bruce Momjian 107062e008 Done:
> * -Add ISO day of week format 'ID' to to_char() where Monday = 1
2007-02-19 17:58:32 +00:00
Bruce Momjian 3e803f7273 Add "isodow" option to EXTRACT() and date_part() where Sunday = 7. 2007-02-19 17:41:39 +00:00
Bruce Momjian 27d6ee04b8 Done:
> * -Add a field 'isoyear' to extract(), based on the ISO week
2007-02-19 17:21:24 +00:00
Bruce Momjian 68c7cb5ed5 Done:
< 	o Add long file support for binary pg_dump output
<
< 	  While Win32 supports 64-bit files, the MinGW API does not,
< 	  meaning we have to build an fseeko replacement on top of the
< 	  Win32 API, and we have to make sure MinGW handles it.  Another
< 	  option is to wait for the MinGW project to fix it, or use the
< 	  code from the LibGW32C project as a guide.
<
< 	  http://archives.postgresql.org/pgsql-hackers/2006-12/msg00551.php
<
> 	o -Add long file support for binary pg_dump output
2007-02-19 16:36:17 +00:00
Magnus Hagander 74096ed1fd Fix pg_dump on win32 to properly dump files larger than 2Gb when using
binary dump formats.
2007-02-19 15:05:06 +00:00
Magnus Hagander bc959b7bd2 Parse pg_proc.h with entries without OIDs. 2007-02-19 14:05:42 +00:00
Tom Lane 7c5e5439d2 Get rid of some old and crufty global variables in the planner. When
this code was last gone over, there wasn't really any alternative to
globals because we didn't have the PlannerInfo struct being passed all
through the planner code.  Now that we do, we can restructure things
to avoid non-reentrancy.  I'm fooling with this because otherwise I'd
have had to add another global variable for the planned compact
range table list.
2007-02-19 07:03:34 +00:00
Tom Lane 90c301aaa9 Improve plpgsql's error message when a datatype declaration is omitted.
Per example from Jeff Ross.
2007-02-19 03:18:51 +00:00
Tom Lane b8c3267792 Put function expressions and values lists into FunctionScan and ValuesScan
plan nodes, so that the executor does not need to get these items from
the range table at runtime.  This will avoid needing to include these
fields in the compact range table I'm expecting to make the executor use.
2007-02-19 02:23:12 +00:00
Tom Lane f1f2b2711a Fix portal management code to support non-default command completion tags for
portals using PORTAL_UTIL_SELECT strategy.  This is currently significant only
for FETCH queries, which are supposed to include a count in the tag.  Seems
it's been broken since 7.4, but nobody noticed before Knut Lehre.
2007-02-18 19:49:25 +00:00
Bruce Momjian aa728d5f4b Document limitation of SPI_execute() using multiple queries in a single
string.
2007-02-18 01:47:40 +00:00
Bruce Momjian 9f6ed2f47f Update wording:
<   Currently, ALTER USER and ALTER DATABASE support per-user and
>   Currently ALTER USER and ALTER DATABASE support per-user and
< 	  Currently, subtracting one date from another that crosses a
> 	  Currently subtracting one date from another that crosses a
<   Currently, SQL-language functions can only refer to parameters via $1, etc
>   Currently SQL-language functions can only refer to dollar parameters,
>   e.g. $1
<   Currently, queries prepared via the libpq API are planned on first
>   Currently queries prepared via the libpq API are planned on first
< 	  Currently, SET <tab> causes a database lookup to check all
> 	  Currently SET <tab> causes a database lookup to check all
< 	  Currently, all statement results are transferred to the libpq
> 	  Currently all statement results are transferred to the libpq
2007-02-18 01:34:35 +00:00
Bruce Momjian 0e461f275b Add:
* Allow SQL-language functions to reference parameters by parameter name

  Currently SQL-language functions can only refer to parameters via $1, etc
2007-02-18 01:32:55 +00:00
Bruce Momjian 9b9cd9c205 Update "Conflicting lock modes" to show as conflict, add
current/requested headings, add link to table from text.
2007-02-18 01:21:49 +00:00
Tom Lane 49451ae03e Add code so that when COPY_PARSE_PLAN_TREES is defined, the copy and
equal functions are checked for raw parse trees as well as post-analysis
trees.  This was never very important before, but the upcoming plan cache
control module will need to be able to do copyObject() on raw parse trees.
2007-02-17 19:33:32 +00:00
Bruce Momjian 4fe1a12c54 Remove rint() for to_char MS and US output. We can't us rint() because
we can't overflow to the next higher units, and we might print the lower
units for MS.
2007-02-17 03:11:32 +00:00
Bruce Momjian 37a22932f2 Add:
> * Allow holdable cursors in SPI
2007-02-17 02:01:02 +00:00
Bruce Momjian f7a51b7a0d Cleanup of to_char() patch.
Brendan Jurd
2007-02-17 01:51:42 +00:00
Bruce Momjian c6ed4ead01 Add:
>
> 		o Allow row and record variables to be set to NULL constants,
> 		  and allow NULL tests on such variables
>
> 		  Because a row is not scalar, do not allow assignment
> 		  from NULL-valued scalars.
2007-02-17 01:35:41 +00:00
Bruce Momjian 0bc81a5b58 Remove installation mention that integer timestamps is less stable that
floating point.
2007-02-17 01:26:24 +00:00
Bruce Momjian 89a624439e Create AVG() aggregates for int8 and NUMERIC which do not compute X^2,
as a performance enhancement.

Mark Kirkwood
2007-02-17 00:55:58 +00:00
Tom Lane 72a070a365 Teach find_nonnullable_rels to handle OR cases: if every arm of an OR
forces a particular relation nonnullable, then we can say that the OR does.
This is worth a little extra trouble since it may allow reduction of
outer joins to plain joins.
2007-02-16 23:32:08 +00:00
Bruce Momjian 46bd3bff62 Add:
> 	o Consider reducing on-disk varlena length from four to two
> 	  because a heap row cannot be more than 64k in length
2007-02-16 22:20:02 +00:00
Tom Lane 9f28ac0dd3 Fix new RI operator selection code to do the right thing when working with
an opclass for a generic type such as ANYARRAY.  The original coding failed
to check that PK and FK columns were of the same array type.  Per discussion
with Tom Dunstan.  Also, make the code a shade more readable by not trying
to economize on variables.
2007-02-16 22:04:02 +00:00
Bruce Momjian 1d722cf18c Reduce the amount of memory "clobbered" for every process title change,
on platforms that need this.  This is done by only writing past the
previously stored message, if it was longer.
2007-02-16 21:34:04 +00:00
Tom Lane 8249409bc1 Adjust the definition of is_pushed_down so that it's always true for INNER
JOIN quals, just like WHERE quals, even if they reference every one of the
join's relations.  Now that we can reorder outer and inner joins, it's
possible for such a qual to end up being assigned to an outer join plan node,
and we mustn't have it treated as a join qual rather than a filter qual for
the node.  (If it were, the join could produce null-extended rows that it
shouldn't.)  Per bug report from Pelle Johansson.
2007-02-16 20:57:19 +00:00
Peter Eisentraut e472f13f99 Better fix for determining minimum and maximum int64 values that doesn't
require stdint.h and works for "busted" int64.
2007-02-16 18:37:43 +00:00
Alvaro Herrera 8d2b05df9a Install a more correct fix in the timestamp and timestamptz regression tests:
remove duplicated tests in timestamp, and complete timestamptz with the tests
that were missing to more closely mirror timestamp.
2007-02-16 17:49:15 +00:00
Tom Lane b6c9165ea0 Code review for SSLKEY patch. 2007-02-16 17:07:00 +00:00
Tom Lane 5ce7599bcd Fix markup, spelling, grammar, and explanations for SSLKEY patch. 2007-02-16 16:37:29 +00:00
Alvaro Herrera 7f1d68a400 Fix the timestamptz test problem, by moving the tests that use the
timestamp_tbl table into the timestamp test.  Also, restore a test that
used to exist as a valid test in the timestamptz test.
2007-02-16 15:42:42 +00:00
Peter Eisentraut 89b18bdd2a Fix // comment 2007-02-16 10:55:47 +00:00
Peter Eisentraut cf3aeb2f8b Add stdint.h include 2007-02-16 10:42:31 +00:00
Peter Eisentraut 355e05ab41 Functions for mapping table data and table schemas to XML (a.k.a. XML export) 2007-02-16 07:46:55 +00:00
Bruce Momjian bb0a8a3ad4 Remove extra character erroneously added. 2007-02-16 03:56:45 +00:00
Bruce Momjian 4ab7ea5ace Remove tabs from SGML files to help tag alingment and improve
detection of tabs are added in the future.
2007-02-16 03:50:29 +00:00
Tom Lane 7ea758b0b1 Fix another problem in 8.2 changes that allowed "one-time" qual conditions to
be checked at plan levels below the top; namely, we have to allow for Result
nodes inserted just above a nestloop inner indexscan.  Should think about
using the general Param mechanism to pass down outer-relation variables, but
for the moment we need a back-patchable solution.  Per report from Phil Frost.
2007-02-16 03:49:04 +00:00
Bruce Momjian 4ebb0cf9c3 Add two new format fields for use with to_char(), to_date() and
to_timestamp():
    - ID for day-of-week
    - IDDD for day-of-year

This makes it possible to convert ISO week dates to and from text
fully represented in either week ('IYYY-IW-ID') or day-of-year
('IYYY-IDDD') format.

I have also added an 'isoyear' field for use with extract / date_part.

Brendan Jurd
2007-02-16 03:39:46 +00:00
Bruce Momjian c7b08050d9 SSL improvements:
o read global SSL configuration file
	o add GUC "ssl_ciphers" to control allowed ciphers
	o add libpq environment variable PGSSLKEY to control SSL hardware keys

Victor B. Wagner
2007-02-16 02:59:41 +00:00
Alvaro Herrera 68046a20c7 Remove useless database name from bootstrap argument processing (including
startup and bgwriter processes), and the -y flag.  It's not used anywhere.
2007-02-16 02:10:07 +00:00
Tom Lane 6bef118b01 Restructure code that is responsible for ensuring that clauseless joins are
considered when it is necessary to do so because of a join-order restriction
(that is, an outer-join or IN-subselect construct).  The former coding was a
bit ad-hoc and inconsistent, and it missed some cases, as exposed by Mario
Weilguni's recent bug report.  His specific problem was that an IN could be
turned into a "clauseless" join due to constant-propagation removing the IN's
joinclause, and if the IN's subselect involved more than one relation and
there was more than one such IN linking to the same upper relation, then the
only valid join orders involve "bushy" plans but we would fail to consider the
specific paths needed to get there.  (See the example case added to the join
regression test.)  On examining the code I wonder if there weren't some other
problem cases too; in particular it seems that GEQO was defending against a
different set of corner cases than the main planner was.  There was also an
efficiency problem, in that when we did realize we needed a clauseless join
because of an IN, we'd consider clauseless joins against every other relation
whether this was sensible or not.  It seems a better design is to use the
outer-join and in-clause lists as a backup heuristic, just as the rule of
joining only where there are joinclauses is a heuristic: we'll join two
relations if they have a usable joinclause *or* this might be necessary to
satisfy an outer-join or IN-clause join order restriction.  I refactored the
code to have just one place considering this instead of three, and made sure
that it covered all the cases that any of them had been considering.

Backpatch as far as 8.1 (which has only the IN-clause form of the disease).
By rights 8.0 and 7.4 should have the bug too, but they accidentally fail
to fail, because the joininfo structure used in those releases preserves some
memory of there having once been a joinclause between the inner and outer
sides of an IN, and so it leads the code in the right direction anyway.
I'll be conservative and not touch them.
2007-02-16 00:14:01 +00:00
Alvaro Herrera 1820650934 Restructure autovacuum in two processes: a dummy process, which runs
continuously, and requests vacuum runs of "autovacuum workers" to postmaster.
The workers do the actual vacuum work.  This allows for future improvements,
like allowing multiple autovacuum jobs running in parallel.

For now, the code keeps the original behavior of having a single autovac
process at any time by sleeping until the previous worker has finished.
2007-02-15 23:23:23 +00:00
Tom Lane eecbb33267 Add ORDER BY to a query on information_schema.views, to avoid possible
platform-specific result ordering.  Per buildfarm results.
2007-02-15 05:05:03 +00:00