Commit Graph

10799 Commits

Author SHA1 Message Date
Bruce Momjian 773b5e0efa Add another URL for HTML entity codes. 2012-05-08 23:17:52 -04:00
Bruce Momjian 8b77e226fb Document how to find non-ASCII characters in the release notes. 2012-05-08 22:51:32 -04:00
Peter Eisentraut db84ba65ab psql: Add variable to control keyword case in tab completion
This adds the variable COMP_KEYWORD_CASE, which controls in what case
keywords are completed.  This is partially to let users configure the
change from commit 69f4f1c357, but it
also offers more behaviors than were available before.
2012-05-08 21:06:08 +03:00
Bruce Momjian 65b110703b Document that it is the pgsql version we are matching for psqlrc
version-specific files, not the server version.
2012-05-06 21:43:55 -04:00
Bruce Momjian 0a3a674b98 Revert typo fix 768c3affd44d1dcb4e43e2e006c642524714c2a4; I was wrong. 2012-05-06 08:10:55 -04:00
Bruce Momjian 768c3affd4 Fix psql doc typo. 2012-05-05 12:00:06 -04:00
Tom Lane 71b9549d05 Overdue code review for transaction-level advisory locks patch.
Commit 62c7bd31c8 had assorted problems, most
visibly that it broke PREPARE TRANSACTION in the presence of session-level
advisory locks (which should be ignored by PREPARE), as per a recent
complaint from Stephen Rees.  More abstractly, the patch made the
LockMethodData.transactional flag not merely useless but outright
dangerous, because in point of fact that flag no longer tells you anything
at all about whether a lock is held transactionally.  This fix therefore
removes that flag altogether.  We now rely entirely on the convention
already in use in lock.c that transactional lock holds must be owned by
some ResourceOwner, while session holds are never so owned.  Setting the
locallock struct's owner link to NULL thus denotes a session hold, and
there is no redundant marker for that.

PREPARE TRANSACTION now works again when there are session-level advisory
locks, and it is also able to transfer transactional advisory locks to the
prepared transaction, but for implementation reasons it throws an error if
we hold both types of lock on a single lockable object.  Perhaps it will be
worth improving that someday.

Assorted other minor cleanup and documentation editing, as well.

Back-patch to 9.1, except that in the 9.1 branch I did not remove the
LockMethodData.transactional flag for fear of causing an ABI break for
any external code that might be examining those structs.
2012-05-04 17:44:31 -04:00
Peter Eisentraut 1715ff1128 doc: Fix for too many brackets in command synopses on man pages
The default for the choice attribute of the <arg> element is "opt",
which would normally put the argument inside brackets.  But the DSSSL
stylesheets contain a hack that treats <arg> directly inside <group>
specially, so that <group><arg>-x</arg><arg>-y</arg></group> comes out
as [ -x | -y ] rather than [ [-x] | [-y] ], which it would technically
be.  But when building man pages, this doesn't work, and so the
command synopses on the man pages contain lots of extra brackets.

By putting choice="opt" or choice="plain" explicitly on every <arg>
and <group> element, we avoid any toolchain dependencies like that,
and it also makes it clearer in the source code what is meant.

In passing, make some small corrections in the documentation about
which arguments are really optional or not.
2012-05-03 22:58:00 +03:00
Bruce Momjian ebcaa5fcde Remove BSD/OS (BSDi) port. There are no known users upgrading to
Postgres 9.2, and perhaps no existing users either.
2012-05-03 10:58:44 -04:00
Peter Eisentraut f2f9439fbf Remove dead ports
Remove the following ports:

- dgux
- nextstep
- sunos4
- svr4
- ultrix4
- univel

These are obsolete and not worth rescuing.  In most cases, there is
circumstantial evidence that they wouldn't work anymore anyway.
2012-05-01 22:11:12 +03:00
Peter Eisentraut 4266509c57 Improve markup of cmdsynopsis elements
Add more markup in particular so that the command options appear
consistently in monospace in the HTML output.

On the vacuumdb reference page, remove listing all the possible
options in the synopsis.  They have become too many now; we have the
detailed options list for that.
2012-04-30 21:18:03 +03:00
Peter Eisentraut 61c84b4761 Fix display of <command> elements on man pages
We had changed this from the default bold to monospace for all output
formats, but for man pages, this creates visual inconsistencies, so
revert to the default for man pages.
2012-04-30 21:18:03 +03:00
Tom Lane 809e7e21af Converge all SQL-level statistics timing values to float8 milliseconds.
This patch adjusts the core statistics views to match the decision already
taken for pg_stat_statements, that values representing elapsed time should
be represented as float8 and measured in milliseconds.  By using float8,
we are no longer tied to a specific maximum precision of timing data.
(Internally, it's still microseconds, but we could now change that without
needing changes at the SQL level.)

The columns affected are
pg_stat_bgwriter.checkpoint_write_time
pg_stat_bgwriter.checkpoint_sync_time
pg_stat_database.blk_read_time
pg_stat_database.blk_write_time
pg_stat_user_functions.total_time
pg_stat_user_functions.self_time
pg_stat_xact_user_functions.total_time
pg_stat_xact_user_functions.self_time

The first four of these are new in 9.2, so there is no compatibility issue
from changing them.  The others require a release note comment that they
are now double precision (and can show a fractional part) rather than
bigint as before; also their underlying statistics functions now match
the column definitions, instead of returning bigint microseconds.
2012-04-30 14:03:33 -04:00
Tom Lane 1dd89eadcd Rename I/O timing statistics columns to blk_read_time and blk_write_time.
This seems more consistent with the pre-existing choices for names of
other statistics columns.  Rename assorted internal identifiers to match.
2012-04-29 18:13:33 -04:00
Tom Lane 309c64745e Rename track_iotiming GUC to track_io_timing.
This spelling seems significantly more readable to me.
2012-04-29 16:23:54 -04:00
Tom Lane 5f2b089387 Further editorialization on the new documentation for statistics views.
Get rid of the per-column documentation of underlying functions, which did
far more to clutter the view descriptions than it did to be helpful, and
was rather incomplete and typo-ridden anyway.  Instead suggest that people
consult the definitions of the standard views to see the underlying
functions.

The older functions for obtaining individual facts about backends are now
somewhat obsoleted by pg_stat_get_activity, which means that they are not
documented by any standard view.  So I put that information into a separate
table.  (Maybe we should just deprecate them instead?)

In passing, fix a couple more documentation errors.
2012-04-29 15:36:04 -04:00
Tom Lane aebe989477 Make a copy-editing pass over the new documentation for statistics views.
Fix a bunch of typos, improve markup, make wording more uniform, rearrange
some material.  No substantive changes.
2012-04-29 13:24:44 -04:00
Tom Lane 93f94e356d Adjust timing units in pg_stat_statements.
Display total time and I/O timings in milliseconds, for consistency with
the units used for timings in the core statistics views.  The columns
remain of float8 type, so that sub-msec precision is available.  (At some
point we will probably want to convert the core views to use float8 type
for the same reason, but this patch does not touch that issue.)

This is a release-note-requiring change in the meaning of the total_time
column.  The I/O timing columns are new as of 9.2, so there is no
compatibility impact from redefining them.

Do some minor copy-editing in the documentation, too.
2012-04-28 16:03:57 -04:00
Peter Eisentraut 05dd9fb18d PL/Python: Update list of supported environment variables 2012-04-28 13:34:06 +03:00
Tom Lane 92df220343 Improve documentation around historical calendar rules.
Get rid of section 8.5.6 (Date/Time Internals), which appears to confuse
people more than it helps, and anyway discussion of Postgres' internal
datetime calculation methods seems pretty out of place here.  Instead,
make datatype.sgml just say that we follow the Gregorian calendar (a bit
of specification not previously present anywhere in that chapter :-()
and link to the History of Units appendix for more info.  Do some mild
editorialization on that appendix, too, to make it clearer that we are
following proleptic Gregorian calendar rules rather than anything more
historically accurate.

Per a question from Florence Cousin and subsequent discussion in
pgsql-docs.
2012-04-26 18:28:52 -04:00
Peter Eisentraut 2856c51c86 Standardize indentation of XSL files
Predominant standard is two spaces, so adjust outliers to that.
2012-04-24 21:40:07 +03:00
Peter Eisentraut 225d9c0638 Fix minor stylistic issue 2012-04-24 21:16:07 +03:00
Robert Haas 3ce7f18e92 Casts to or from a domain type are ignored; warn and document.
Prohibiting this outright would break dumps taken from older versions
that contain such casts, which would create far more pain than is
justified here.

Per report by Jaime Casanova and subsequent discussion.
2012-04-24 09:20:53 -04:00
Robert Haas 5d4b60f2f2 Lots of doc corrections.
Josh Kupershmidt
2012-04-23 22:43:09 -04:00
Robert Haas 9d435d57e1 Minor improvements for CHECK NO INHERIT documentation.
Fix typo spotted by Thom Brown, and improve wording in another area
where Thom spotted a typo.
2012-04-23 21:59:17 -04:00
Alvaro Herrera 09ff76fcdb Recast "ONLY" column CHECK constraints as NO INHERIT
The original syntax wasn't universally loved, and it didn't allow its
usage in CREATE TABLE, only ALTER TABLE.  It now works everywhere, and
it also allows using ALTER TABLE ONLY to add an uninherited CHECK
constraint, per discussion.

The pg_constraint column has accordingly been renamed connoinherit.

This commit partly reverts some of the changes in
61d81bd28d, particularly some pg_dump and
psql bits, because now pg_get_constraintdef includes the necessary NO
INHERIT within the constraint definition.

Author: Nikhil Sontakke
Some tweaks by me
2012-04-20 23:56:57 -03:00
Peter Eisentraut cd1f4db4ae Untabify DSSSL and XSL files and add to check-tabs target
Like with SGML files, using tabs in these files is confusing and
unnecessary.
2012-04-19 22:38:14 +03:00
Robert Haas 37e666b8b5 Doc clarification for synchronous_commit.
Fujii Masao
2012-04-18 10:11:03 -04:00
Peter Eisentraut cf714c8108 Add compatibility information for prepared transaction commands 2012-04-16 22:40:54 +03:00
Peter Eisentraut 0f48e06751 PL/Python: Improve documentation of nrows() method
Clarify that nrows() is the number of rows processed, versus the
number of rows returned, which can be obtained using len.  Also add
tests about that.
2012-04-16 11:30:32 +03:00
Peter Eisentraut c03523ed3f PL/Python: Fix crash when colnames() etc. called without result set
The result object methods colnames() etc. would crash when called
after a command that did not produce a result set.  Now they throw an
exception.

discovery and initial patch by Jean-Baptiste Quenot
2012-04-15 20:23:08 +03:00
Robert Haas ea6a2d8d47 Rename synchronous_commit='write' to 'remote_write'.
Fujii Masao, per discussion on pgsql-hackers
2012-04-14 10:53:22 -04:00
Robert Haas 4a2d7ad76f pg_size_pretty(numeric)
The output of the new pg_xlog_location_diff function is of type numeric,
since it could theoretically overflow an int8 due to signedness; this
provides a convenient way to format such values.

Fujii Masao, with some beautification by me.
2012-04-14 08:07:25 -04:00
Tatsuo Ishii d4db16d303 Add description of long options for '-c', '-D', '-l' and '-s'. Per
discussion of hackers list on 2012/3/10 "missing description initdb
manual".
2012-04-14 18:40:35 +09:00
Peter Eisentraut aacc50d175 Document that VALUES can be used in WITH 2012-04-14 09:08:08 +03:00
Peter Eisentraut f3a3aac845 Fix typo
Etsuro Fujita
2012-04-14 01:06:34 +03:00
Robert Haas cd93425cd1 Add Peter Geoghegan as additional author of pg_stat_statements. 2012-04-13 16:43:13 -04:00
Peter Eisentraut c0cc526e8b Rename bytea_agg to string_agg and add delimiter argument
Per mailing list discussion, we would like to keep the bytea functions
parallel to the text functions, so rename bytea_agg to string_agg,
which already exists for text.

Also, to satisfy the rule that we don't want aggregate functions of
the same name with a different number of arguments, add a delimiter
argument, just like string_agg for text already has.
2012-04-13 21:36:59 +03:00
Robert Haas 7167fcd21b Grammar corrections.
Christoph Berg
2012-04-13 12:47:23 -04:00
Tom Lane 81e3e4fd14 Assorted spelling corrections.
Thom Brown
2012-04-12 10:43:39 -04:00
Tom Lane 880bfc3287 Silently ignore any nonexistent schemas that are listed in search_path.
Previously we attempted to throw an error or at least warning for missing
schemas, but this was done inconsistently because of implementation
restrictions (in many cases, GUC settings are applied outside transactions
so that we can't do system catalog lookups).  Furthermore, there were
exceptions to the rule even in the beginning, and we'd been poking more
and more holes in it as time went on, because it turns out that there are
lots of use-cases for having some irrelevant items in a common search_path
value.  It seems better to just adopt a philosophy similar to what's always
been done with Unix PATH settings, wherein nonexistent or unreadable
directories are silently ignored.

This commit also fixes the documentation to point out that schemas for
which the user lacks USAGE privilege are silently ignored.  That's always
been true but was previously not documented.

This is mostly in response to Robert Haas' complaint that 9.1 started to
throw errors or warnings for missing schemas in cases where prior releases
had not.  We won't adopt such a significant behavioral change in a back
branch, so something different will be needed in 9.1.
2012-04-11 12:02:50 -04:00
Alvaro Herrera b035cb9db7 Accept postgres:// URIs in libpq connection functions
postgres:// URIs are an attempt to "stop the bleeding" in this general
area that has been said to occur due to external projects adopting their
own syntaxes.  The syntaxes supported by this patch:

 postgres://[user[:pwd]@][unix-socket][:port[/dbname]][?param1=value1&...]
 postgres://[user[:pwd]@][net-location][:port][/dbname][?param1=value1&...]

should be enough to cover most interesting cases without having to
resort to "param=value" pairs, but those are provided for the cases that
need them regardless.

libpq documentation has been shuffled around a bit, to avoid stuffing
all the format details into the PQconnectdbParams description, which was
already a bit overwhelming.  The list of keywords has moved to its own
subsection, and the details on the URI format live in another subsection.

This includes a simple test program, as requested in discussion, to
ensure that interesting corner cases continue to work appropriately in
the future.

Author: Alexander Shulgin
Some tweaking by Álvaro Herrera, Greg Smith, Daniel Farina, Peter Eisentraut
Reviewed by Robert Haas, Alexey Klyukin (offlist), Heikki Linnakangas,
Marko Kreen, and others

Oh, it also supports postgresql:// but that's probably just an accident.
2012-04-11 04:33:51 -03:00
Tom Lane 0d9819f7e3 Measure epoch of timestamp-without-time-zone from local not UTC midnight.
This patch reverts commit 191ef2b407
and thereby restores the pre-7.3 behavior of EXTRACT(EPOCH FROM
timestamp-without-tz).  Per discussion, the more recent behavior was
misguided on a couple of grounds: it makes it hard to get a
non-timezone-aware epoch value for a timestamp, and it makes this one
case dependent on the value of the timezone GUC, which is incompatible
with having timestamp_part() labeled as immutable.

The other behavior is still available (in all releases) by explicitly
casting the timestamp to timestamp with time zone before applying EXTRACT.

This will need to be called out as an incompatible change in the 9.2
release notes.  Although having mutable behavior in a function marked
immutable is clearly a bug, we're not going to back-patch such a change.
2012-04-10 12:04:42 -04:00
Heikki Linnakangas 442da68f73 Point the URL to PL/py directly to the page about the procedural language.
It used to point to a top-level page that contains client-side tools as
well. It was hard to find the procedural language there.
2012-04-10 09:46:44 +03:00
Heikki Linnakangas fb9bc5d9fb Fix typos in docs, some words were doubled.
Thom Brown
2012-04-10 09:31:31 +03:00
Tom Lane c94b43ce39 Adjust various references to GEQO being non-deterministic.
It's still non-deterministic in some sense ... but given fixed settings
and identical planning problems, it will now always choose the same plan,
so we probably shouldn't tar it with that brush.  Per bug #6565 from
Guillaume Cottenceau.  Back-patch to 9.0 where the behavior was fixed.
2012-04-09 20:49:01 -04:00
Bruce Momjian 17665f6115 Re-add documentation recommendation to use gzip/gunzip for archive file
storage.
2012-04-09 14:50:48 -04:00
Bruce Momjian 75fcb935bc Update documentation to more clearly label the streaming replication option. 2012-04-09 14:40:16 -04:00
Bruce Momjian 8213624fc9 Remove documentation mention of pglesslog, which was added in 2009
because there was only a beta for 9.0 and it does not compile on 9.1.
2012-04-09 14:12:38 -04:00
Heikki Linnakangas 140a4fbf1a Remove link to ODBCng project from the docs.
Thom Browne pointed out that the URL was out of date, and Devrim GÜNDÜZ
pointed out that the project isn't maintained anymore.
2012-04-09 09:47:25 +03:00