Commit Graph

19114 Commits

Author SHA1 Message Date
Tom Lane 3cb5d6580a Support column-level privileges, as required by SQL standard.
Stephen Frost, with help from KaiGai Kohei and others
2009-01-22 20:16:10 +00:00
Heikki Linnakangas bf136cf6e3 Only skip pages marked as clean in the visibility map, if the last 32
pages were marked as clean as well. The idea is to avoid defeating OS
readahead by skipping a page here and there, and also makes it less likely
that we miss an opportunity to advance relfrozenxid, for the sake of only
a few skipped pages.
2009-01-22 19:25:00 +00:00
Heikki Linnakangas c079090bbc Update comments to reflect that tgenabled is not a boolean anymore.
Jonah Harris, with minor tinkering by me.
2009-01-22 19:16:31 +00:00
Peter Eisentraut dd7e54a17f Automatic view update rules
Bernd Helmle
2009-01-22 17:27:55 +00:00
Magnus Hagander 5841aa86eb Explicitly bind gettext to the correct encoding on Windows.
Original patch from Hiroshi Inoue.
2009-01-22 10:09:48 +00:00
Magnus Hagander 95aaf25f39 Remove stray ' character at end of line.
For some reason it broke OpenBSD compile even when it's inside a
#ifdef WIN32 block.....
2009-01-21 12:45:06 +00:00
Heikki Linnakangas 410a372ae3 Forgot to handle the new SPI_OK_REWRITTEN result code in a couple places. 2009-01-21 11:13:14 +00:00
Heikki Linnakangas 94136d5a18 Add new SPI_OK_REWRITTEN return code to SPI_execute and friends, for the
case that the command is rewritten into another type of command. The old
behavior to return the command tag of the last executed command was
pretty surprising. In PL/pgSQL, for example, it meant that if a command
was rewritten to a utility statement, FOUND wasn't set at all.
2009-01-21 11:02:40 +00:00
Magnus Hagander 0154345078 Make win32 builds always do SetEnvironmentVariable() when doing putenv().
Also, if linked against other versions than the default MSVCRT library
(for example the MSVC build which links against MSVCRT80), also update
the cache in the default MSVCRT at the same time.

This should fix the issues with setting LC_MESSAGES on the MSVC build.

Original patch from Hiroshi Inoue and Hiroshi Saito, much rewritten
by me.
2009-01-21 10:30:02 +00:00
Magnus Hagander fa40ca42a6 Make some strings translatable again that were accidentally removed in
earlier patch to fix "printf-arguments".
2009-01-21 09:28:26 +00:00
Magnus Hagander 477c5d3b0d Install .mo files for NLS as <program>-<version>.mo when building with MSVC
as well. Same change as made earlier for autoconf builds.

Per Hiroshi Inoue.
2009-01-21 09:25:11 +00:00
Heikki Linnakangas b2a667b9ee Add a new option to RestoreBkpBlocks() to indicate if a cleanup lock should
be used instead of the normal exclusive lock, and make WAL redo functions
responsible for calling RestoreBkpBlocks(). They know better what kind of a
lock they need.

At the moment, this just moves things around with no functional change, but
makes the hot standby patch that's under review cleaner.
2009-01-20 18:59:37 +00:00
Peter Eisentraut b287f0a39e Do not msgmerge against /dev/null; merge against the pot file itself
instead.
2009-01-20 09:58:50 +00:00
Peter Eisentraut 93a6be63a5 Revise the permission checking on user mapping DDL commands.
CREATE/ALTER/DROP USER MAPPING are now allowed either by the server owner or
by a user with USAGE privileges for his own user name.  This is more or less
what the SQL standard wants anyway (plus "implementation-defined")

Hide information_schema.user_mapping_options.option_value, unless the current
user is the one associated with the user mapping, or is the server owner and
the mapping is for PUBLIC, or is a superuser.  This is to protect passwords.

Also, fix a bug in information_schema._pg_foreign_servers, which hid servers
using wrappers where the current user did not have privileges on the wrapper.
The correct behavior is to hide servers where the current user has no
privileges on the server.
2009-01-20 09:10:20 +00:00
Bruce Momjian 71928e7b9f Make psql \d and \dt consistent for system tables, i.e prevent \d from
showing system tables, make \dS pattern show system table details, and
have \dtS show system and _user_ tables, to be consistent with other \d*
commands.
2009-01-20 02:13:42 +00:00
Bruce Momjian 2384287f6d Document RELKIND_SPECIAL reference in psql, from <= 8.1.X. 2009-01-19 18:44:32 +00:00
Tom Lane cc1d292d78 Fix accidental (I suppose) introduction of non-ASCII quote marks. 2009-01-19 17:17:50 +00:00
Magnus Hagander cfb9c7f8b5 Use the new text domain names ("postgres-8.4" instead of "postgres")
Hiroshi Inoue
2009-01-19 15:34:23 +00:00
Peter Eisentraut 0a9ddf72cf Avoid regression test cases that fail in locales that sort "v" and "w"
equally (in glibc: et_EE, sv_SE, tk_TM).  It turns out that this was
already taken care of previously by select_1.out, which I had forgotten to
update for an unrelated change.  But might as well avoid the issue
altogether.
2009-01-19 14:24:13 +00:00
Peter Eisentraut 8987c115f1 Alter regression test cases that rely on the sort order of "aa". Some
locales (da_DK, fo_FO, kl_GL, nb_NO, nn_NO in glibc) sort "aa" after "z".
2009-01-19 13:38:47 +00:00
Peter Eisentraut 2b01cbe340 Alter the regression test cases that rely on the sort order of "ch" between
"cg" and "ci".  This eliminates a test failure on the following glibc
locales: br_FR, cs_CZ, cy_GB, es_EC, es_US, hsb_DE, ig_NG, ik_CA, sk_SK.
2009-01-19 12:02:29 +00:00
Peter Eisentraut 0d8c613180 Message wordsmithing 2009-01-19 08:59:13 +00:00
Tom Lane 390081e3f5 Fix a pg_dump output ordering problem introduced in 8.3 by the addition of
array types for composite types.  Although pg_dump understood it wasn't
supposed to dump these array types as separate objects, it must include
them in the dependency ordering analysis, and it was improperly assigning them
the same relatively-high sort priority as regular types.  This resulted in
effectively moving composite types and tables up to that same high priority,
which broke any ordering requirements that weren't explicitly enforced by
dependencies.  In particular user-defined operator classes, which should come
out before tables, failed to do so.  Per report from Brendan Jurd.

In passing, also fix an ill-considered decision to give text search objects
the same sort priority as functions and operators --- the sort result looks
a lot nicer if different object types are kept separate.  The recent
foreign-data patch had copied that decision, making the sort ordering even
messier :-(
2009-01-18 20:44:45 +00:00
Peter Eisentraut 56ac25c115 Manual attempt to update this file. 2009-01-16 20:29:48 +00:00
Peter Eisentraut 1fb1049836 plpython_error.out is for Python 2.4, plpython_error_3.out is for Python 2.5,
as it was previously.
2009-01-16 20:21:46 +00:00
Heikki Linnakangas 6587818542 Add vacuum_freeze_table_age GUC option, to control when VACUUM should
ignore the visibility map and scan the whole table, to advance
relfrozenxid.
2009-01-16 13:27:24 +00:00
Peter Eisentraut 19afb4e805 Wordsmithing 2009-01-16 09:15:03 +00:00
Peter Eisentraut cc02b5eff1 Remove period from primary error message. 2009-01-15 22:33:19 +00:00
Teodor Sigaev 41d17e042b Fix URL generation in headline. Only tag lexeme will be replaced by space.
Per http://archives.postgresql.org/pgsql-bugs/2008-12/msg00013.php
2009-01-15 16:33:59 +00:00
Teodor Sigaev 8fd07a35ba Fix generation too long headline with ShortWords.
Per http://archives.postgresql.org/pgsql-hackers/2008-09/msg01088.php
2009-01-15 16:33:28 +00:00
Peter Eisentraut f8c8386a08 Cleanup pass over PL/Python NLS. Add translation support to PLy_elog and
PLy_exception_set, and clarify some error messages.
2009-01-15 13:49:57 +00:00
Peter Eisentraut d0fe3df745 Remove unneeded GETTEXT_TRIGGERS. 2009-01-15 12:59:11 +00:00
Peter Eisentraut cb05ab81a8 NLS cleanup in ecpglib
Replace leftover instances of _() by ecpg_gettext(), the latter being the
correct way to refer to the library's message catalog, instead of the one of
the program using the library.

Drop NLS support for ecpg_log(), which is a debugging instrument similar to
elog() in the backend.

We cannot support NLS in the ecpg compatlib, because that requires
ecpg_gettext, which is in ecpglib, which is not a dependency of compatlib.  It
doesn't seem worthwhile to worry about this, since the only translatable
string is "out of memory", and gettext probably won't be able to do much
without memory either.

Adjust messages to project style.
2009-01-15 11:52:55 +00:00
Peter Eisentraut cbb1358b18 Build needed things in src/test/regress/ first. And some build rules
normalization.
2009-01-15 09:30:20 +00:00
Peter Eisentraut e72187d789 Make .pot files depend on the makefiles, so that they are updated when the
file or trigger function lists are changed.
2009-01-15 09:01:24 +00:00
Bruce Momjian 6faf495b8a Make 'find' syntax consistent; add .git exclusion to make_ctags. 2009-01-14 21:59:19 +00:00
Peter Eisentraut c82b63a54f Avoid version-control system directories when creating TAGS. Besides
being wasteful, this can collide with repostory metadata on case-insensitive
file sytems.
2009-01-14 21:28:32 +00:00
Bruce Momjian 1327a0bc06 Remove empty #ifdef block. 2009-01-14 21:18:30 +00:00
Peter Eisentraut 8ae6b4c49f Make the columns is_insertable_into and is_updatable behave uniformly
correctly.  They are supposed to examine which kinds of rules are present,
which they did in some of the info schema views but not in others.
2009-01-14 21:12:09 +00:00
Peter Eisentraut 8b583ba2d7 Make error messages match backend style. 2009-01-14 20:01:52 +00:00
Peter Eisentraut 08585dcf13 misc.o depends on pg_config_paths.h when --enable-nls is used. 2009-01-14 14:54:35 +00:00
Heikki Linnakangas f2248478c1 Remove broken Assertions that failed if a statement executed in PL/pgSQL is
rewritten into another kind of statement, for example if an INSERT is
rewritten into an UPDATE.

Back-patch to 8.3 and 8.2. For HEAD, Tom suggested inventing a new
SPI_OK_REWRITTEN return code, but that's not a backportable solution. I'll
do that as a separate patch, this patch will do as a stopgap measure for HEAD
too in the meanwhile.
2009-01-14 09:53:51 +00:00
Peter Eisentraut 03b4fc7240 Remove useless (and insecure) temp file handling. 2009-01-13 19:32:29 +00:00
Magnus Hagander 3a819b0780 Throw an error when using -C and -1 at the same time in pg_restore.
It's not possible to do CREATE DATABASE inside a transaction, so previously
we just got a server error instead.

Backpatch to 8.2, which is where the -1 feature appeared.
2009-01-13 11:44:56 +00:00
Magnus Hagander 64580224f9 Remove special-handling of usernames with Kerberos authentication. We will
now always use the system username as the default, and not try to pick it up
from the kerberos ticket.

This fixes the spurious error messages that show up on kerberos-enabled builds
when not actually using kerberos, and puts it in line with how other authentication
methods work.
2009-01-13 10:43:21 +00:00
Alvaro Herrera 8ebe1e356c Simplify the writing of amoptions routines by introducing a convenience
fillRelOptions routine that stores the parsed values in the struct using a
table-based approach.  Per Tom suggestion.  Also remove the "continue"
in HANDLE_*_RELOPTION macros, which were useless and in spirit they were
assuming too much of how the macros were going to be used.  (Note that these
macros are now unused, but the intention is to introduce some usage in a
future autovacuum patch, which is why they weren't completely removed.)

Also, do not call the string validation routine when not validating.  It seems
less error-prone this way, per commentary on the amoptions SGML docs.
2009-01-12 21:02:15 +00:00
Tom Lane 8a4505013d Tweak order of operations in BitmapHeapNext() to avoid the case of prefetching
the same page we are nanoseconds away from reading for real.  There should be
something left to do on the current page before we consider issuing a prefetch.
2009-01-12 16:00:41 +00:00
Peter Eisentraut bf21cdb7e7 Use qualified_name instead of relation_expr for commands that have no
business with inheritance recursion: ALTER INDEX, ALTER SEQUENCE, ALTER
TRIGGER, ALTER VIEW.  They would just silently ignore the ONLY.

ALTER TABLE has mixed behavior and cannot be dealt with this way because
of the resulting shift/reduce conflicts.
2009-01-12 09:38:30 +00:00
Peter Eisentraut ca8100f9eb Add ONLY support to LOCK and TRUNCATE. By default, these commands are now
recursive.

=> Note this incompatibility in the release notes.
2009-01-12 08:54:27 +00:00
Tom Lane b7b8f0b609 Implement prefetching via posix_fadvise() for bitmap index scans. A new
GUC variable effective_io_concurrency controls how many concurrent block
prefetch requests will be issued.

(The best way to handle this for plain index scans is still under debate,
so that part is not applied yet --- tgl)

Greg Stark
2009-01-12 05:10:45 +00:00