Commit Graph

5402 Commits

Author SHA1 Message Date
Peter Eisentraut 77dfb64df4 Add release notes for 8.5alpha1 2009-08-17 22:14:44 +00:00
Peter Eisentraut 42d2470c38 Make version.sgml depend on configure instead of Makefile.global. This
cheats a bit, but it avoids unsatisfied dependencies in distribution
tarballs.  (found by make distcheck)
2009-08-17 21:29:30 +00:00
Tom Lane 26a90c654f Fix imprecise documentation of random(): it never returns 1.0.
This was changed in 8.2 but the documentation was not corrected.
Per gripe from Sam Mason.
2009-08-16 19:55:21 +00:00
Tom Lane b328853733 Make sure that 'make distclean' cleans out all files that are not meant
to be shipped.  Also, allow 'make clean' to remove intermediate working files.
2009-08-15 01:56:35 +00:00
Peter Eisentraut 1a6d678f00 Clarify the documentation about PL/Perl nested subroutines, per Josh
Berkus.
2009-08-15 00:33:12 +00:00
Teodor Sigaev abd8c94ff9 Add prefix support for synonym dictionary 2009-08-14 14:53:20 +00:00
Tom Lane 5d3e2324a6 The html-stamp and man-stamp files also need to be cvsignore'd. 2009-08-12 21:03:52 +00:00
Peter Eisentraut ef7574eb01 Document the minimum required Python version.
It turns out that Python 2.2 is the oldest version that PL/Python compiles
with, apparently related to the introduction of iterators.  Might as well
document this.
2009-08-12 16:32:35 +00:00
Peter Eisentraut f4a4aec4b3 Add .cvsignore entries for documentation files 2009-08-11 22:22:15 +00:00
Peter Eisentraut 99909881fb Remove unnecessary files from distribution 2009-08-11 22:21:51 +00:00
Peter Eisentraut a16461dfad Simplify and speed up man page installation 2009-08-11 21:53:06 +00:00
Alvaro Herrera 61c4513cc9 Refactor some $(JADE.tex.call)s 2009-08-11 20:16:03 +00:00
Bruce Momjian 6f44878018 Remove tab in SGML. 2009-08-11 12:02:58 +00:00
Alvaro Herrera 6c157684c7 Fix URL to "The Hitch-Hiker's Guide to Evolutionary Computation".
Per Andreas Wenk, Andres Freund and Rob Wultsh.  Thanks, Robert Haas, for the
patch.
2009-08-10 22:41:38 +00:00
Alvaro Herrera 59ab8c6c73 Fix number of columns declared for pg_user_mappings description table. 2009-08-10 22:13:50 +00:00
Tom Lane e61fd4ac74 Support EEEE (scientific notation) in to_char().
Pavel Stehule, Brendan Jurd
2009-08-10 18:29:27 +00:00
Tom Lane f3f6737af9 Adjust extract(epoch) example to clarify that it includes fractional
seconds, per gripe from Richard Neill.  Also, add a cross-reference to
the to_timestamp function.
2009-08-10 16:10:19 +00:00
Tom Lane 9bd27b7c9e Extend EXPLAIN to support output in XML or JSON format.
There are probably still some adjustments to be made in the details
of the output, but this gets the basic structure in place.

Robert Haas
2009-08-10 05:46:50 +00:00
Andrew Dunstan 18894c401f Re-add documentation for --no-readline option of psql, mistakenly removed a decade ago. Backpatch to release 7.4. 2009-08-10 02:39:04 +00:00
Peter Eisentraut ed9208829a Ship documentation without intermediate tarballs
Documentation files in HTML and man formats are now prepared for
distribution using the distprep make target, like everything else.  They
are placed in doc/src/sgml/html and manX and installed from there by
make install, if present.  The business with the tarballs in the tarball
is gone.
2009-08-09 22:47:59 +00:00
Alvaro Herrera 05f43650fc Document that autovacuum may run ANALYZE 2009-08-07 20:54:31 +00:00
Peter Eisentraut 7798147a76 Expand test coverage support to entire tree
Test coverage support now covers the entire source tree, including
contrib, instead of just src/backend.  In a related but independent
development, the commands make coverage and make coverage-html can be run
in any directory.

This turned out to be much easier than feared.  Besides a few ad hoc fixes
to pass the make target down the tree, change all affected makefiles to
list their directories in the SUBDIRS variable, changed from variants like
DIRS and WANTED_DIRS.  MSVC build fix was attempted as well.
2009-08-07 20:50:22 +00:00
Alvaro Herrera 6403c35ee6 Fix manpages related to SPI functions.
This patch adds declaration so that they end up in section 3, and adds
them to the Makefiles to install them.

Also, some synopses needed reflowing so that they look nice in 80-column
terminals.
2009-08-05 19:31:50 +00:00
Tom Lane 25bd9ce31b Add matchorig, matchsynonyms, and keepsynonyms options to contrib/dict_xsyn.
Sergey Karpov
2009-08-05 18:06:49 +00:00
Joe Conway f4095b4c4b Implement dblink_get_notify().
Adds the ability to retrieve async notifications using dblink,
via the addition of the function dblink_get_notify(). Original patch
by Marcus Kempe, suggestions by Tom Lane and Alvaro Herrera, patch
review and adjustments by Joe Conway.
2009-08-05 16:11:07 +00:00
Peter Eisentraut c29d7f02c2 Use DocBook XSL stylesheets for man page building
This switches the man page building process to use the DocBook XSL stylesheet
toolchain.  The previous targets for Docbook2X are removed. configure has been
updated to look for the new tools.  The Documentation appendix contains the
new build instructions.  There are also a few isolated tweaks in the
documentation to improve places that came out strangely in the man pages.
2009-08-04 22:04:37 +00:00
Tom Lane a2a8c7a662 Support hex-string input and output for type BYTEA.
Both hex format and the traditional "escape" format are automatically
handled on input.  The output format is selected by the new GUC variable
bytea_output.

As committed, bytea_output defaults to HEX, which is an *incompatible
change*.  We will keep it this way for awhile for testing purposes, but
should consider whether to switch to the more backwards-compatible
default of ESCAPE before 8.5 is released.

Peter Eisentraut
2009-08-04 16:08:37 +00:00
Tom Lane f192e4a5d0 Cause pg_proc.probin to be declared as text, not bytea. Everything was
already treating it as text anyway, to the point that I couldn't find anything
to change except the datatype markings in catalog/*.h.  The only effect that
the bytea declaration had was to cause byteaout() to be invoked when pg_dump
(or another client program) inspected the column value.  Since pg_dump wasn't
expecting that, but just treating what it got as text, the net result is that
dump and reload would mangle any backslashes or non-ASCII characters in the
filename string for a C-language function.  That is a very long-standing bug,
but given the lack of field complaints it doesn't seem worth trying to find
a back-patchable fix.  We'll just make this change to fix it going forward.

This change will also forestall problems after the planned change to let bytea
emit hex output instead of escaped characters.
2009-08-04 04:04:12 +00:00
Joe Conway be6bca23b3 Implement has_sequence_privilege()
Add family of functions that did not exist earlier,
mainly due to historical omission. Original patch by
Abhijit Menon-Sen, with review and modifications by
Joe Conway. catversion.h bumped.
2009-08-03 21:11:40 +00:00
Tom Lane 7ffb14f9db Portability and documentation fixes for threaded pgbench patch. 2009-08-03 18:30:55 +00:00
Tatsuo Ishii 3da0dfb4b1 Multi-threaded version of pgbench contributed by ITAGAKI Takahiro,
reviewed by Greg Smith and Josh Williams.

Following is the proposal from ITAGAKI Takahiro:

Pgbench is a famous tool to measure postgres performance, but nowadays
it does not work well because it cannot use multiple CPUs. On the other
hand, postgres server can use CPUs very well, so the bottle-neck of
workload is *in pgbench*.

Multi-threading would be a solution. The attached patch adds -j
(number of jobs) option to pgbench. If the value N is greater than 1,
pgbench runs with N threads. Connections are equally-divided into
them (ex. -c64 -j4 => 4 threads with 16 connections each). It can
run on POSIX platforms with pthread and on Windows with win32 threads.

Here are results of multi-threaded pgbench runs on Fedora 11 with intel
core i7 (8 logical cores = 4 physical cores * HT). -j8 (8 threads) was
the best and the tps is 4.5 times of -j1, that is a traditional result.

$ pgbench -i -s10
$ pgbench -n -S -c64 -j1   =>  tps = 11600.158593
$ pgbench -n -S -c64 -j2   =>  tps = 17947.100954
$ pgbench -n -S -c64 -j4   =>  tps = 26571.124001
$ pgbench -n -S -c64 -j8   =>  tps = 52725.470403
$ pgbench -n -S -c64 -j16  =>  tps = 38976.675319
$ pgbench -n -S -c64 -j32  =>  tps = 28998.499601
$ pgbench -n -S -c64 -j64  =>  tps = 26701.877815

Is it acceptable to use pthread in contrib module?
If ok, I will add the patch to the next commitfest.
2009-08-03 15:18:14 +00:00
Tom Lane 9072592946 Add ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT
Robert Haas
2009-08-02 22:14:53 +00:00
Tom Lane 25d9bf2e3e Support deferrable uniqueness constraints.
The current implementation fires an AFTER ROW trigger for each tuple that
looks like it might be non-unique according to the index contents at the
time of insertion.  This works well as long as there aren't many conflicts,
but won't scale to massive unique-key reassignments.  Improving that case
is a TODO item.

Dean Rasheed
2009-07-29 20:56:21 +00:00
Tom Lane c1b9ec24ef Add system catalog columns pg_constraint.conindid and pg_trigger.tgconstrindid.
conindid is the index supporting a constraint.  We can use this not only for
unique/primary-key constraints, but also foreign-key constraints, which
depend on the unique index that constrains the referenced columns.
tgconstrindid is just copied from the constraint's conindid field, or is
zero for triggers not associated with constraints.

This is mainly intended as infrastructure for upcoming patches, but it has
some virtue in itself, since it exposes a relationship that you formerly
had to grovel in pg_depend to determine.  I simplified one information_schema
view accordingly.  (There is a pg_dump query that could also use conindid,
but I left it alone because it wasn't clear it'd get any faster.)
2009-07-28 02:56:31 +00:00
Tom Lane d4382c4ae7 Extend EXPLAIN to allow generic options to be specified.
The original syntax made it difficult to add options without making them
into reserved words.  This change parenthesizes the options to avoid that
problem, and makes provision for an explicit (and perhaps non-Boolean)
value for each option.  The original syntax is still supported, but only
for the two original options ANALYZE and VERBOSE.

As a test case, add a COSTS option that can suppress the planner cost
estimates.  This may be useful for including EXPLAIN output in the regression
tests, which are otherwise unable to cope with cross-platform variations in
cost estimates.

Robert Haas
2009-07-26 23:34:18 +00:00
Tom Lane a07e5acebb Code review for FORCE QUOTE * patch: fix error checking to consider FORCE
QUOTE * as a variety of FORCE QUOTE, and update psql documentation to include
the option.  (The actual psql code doesn't seem to need any changes.)
2009-07-25 17:04:19 +00:00
Andrew Dunstan de7531a971 Allow * as parameter for FORCE QUOTE for COPY CSV. Itagaki Takahiro. 2009-07-25 00:07:14 +00:00
Peter Eisentraut 5e22994127 Document \dg+ and \du+
The fact that \dg and \du take the + option was missing in the documentation.

backpatched to 8.4

Author: Andreas Wenk <a.wenk@netzmeister-st-pauli.de>
2009-07-24 19:35:44 +00:00
Andrew Dunstan 00f0b47539 Update location to download flex for building on Windows. 2009-07-23 17:06:48 +00:00
Peter Eisentraut 2afa73a9e8 Clarify NULLIF example
found by "Vesa-Matti J Kari" <vmkari@cc.helsinki.fi>
2009-07-22 18:07:26 +00:00
Tom Lane ca7c8168de Tweak TOAST code so that columns marked with MAIN storage strategy are
not forced out-of-line unless that is necessary to make the row fit on a
page.  Previously, they were forced out-of-line if needed to get the row
down to the default target size (1/4th page).

Kevin Grittner
2009-07-22 01:21:22 +00:00
Peter Eisentraut 7405f2cc85 Small additional clean from the rearrangement of the HTML index build rules 2009-07-20 18:34:58 +00:00
Andrew Dunstan e73131a16a DROP IF EXISTS for columns and constraints. Andres Freund. 2009-07-20 02:42:28 +00:00
Tom Lane f5bc74192d Make GEQO's planning deterministic by having it start from a predictable
random number seed each time.  This is how it used to work years ago, but
we got rid of the seed reset because it was resetting the main random()
sequence and thus having undesirable effects on the rest of the system.
To fix, establish a private random number state for each execution of
geqo(), and initialize the state using the new GUC variable geqo_seed.
People who want to experiment with different random searches can do so
by changing geqo_seed, but you'll always get the same plan for the same
value of geqo_seed (if holding all other planner inputs constant, of course).

The new state is kept in PlannerInfo by adding a "void *" field reserved
for use by join_search hooks.  Most of the rather bulky code changes in
this commit are just arranging to pass PlannerInfo around to all the GEQO
functions (many of which formerly didn't receive it).

Andres Freund, with some editorialization by Tom
2009-07-16 20:55:44 +00:00
Peter Eisentraut 4ef8dc7a75 Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build.  The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that.  The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro).  The second jade run
includes bookindex.sgml, but does not recreate HTML.index.  That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied.  Omitting the html output in the first stage also makes the full
build a lot faster.

When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands.  If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.

The draft and check targets for quick builds and syntax verification are still
there.
2009-07-14 22:16:38 +00:00
Peter Eisentraut d1ba29420b Update information schema to SQL:2008
- yes_or_no domain for "boolean" data
 - new columns for VIEWS view
 - slight section renumbering
2009-07-13 20:25:57 +00:00
Tom Lane da4b900176 Advance the minimum required version of "flex" from 2.5.4 to 2.5.31, and
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).
2009-07-13 01:51:56 +00:00
Peter Eisentraut 23d830bd9a Alter some gratuitous uses of "ANSI" when "SQL standard" might have been
meant or the reference to a standard was unnecessary.
2009-07-11 21:15:32 +00:00
Peter Eisentraut c95db342e7 Correct what ISO stands for 2009-07-11 21:13:21 +00:00
Tom Lane 53e7229258 Add missing HOUR TO SECOND option to list of possible INTERVAL field sets,
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.
2009-07-08 17:21:55 +00:00