summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in8
-rw-r--r--src/backend/access/hash/hash.c305
-rw-r--r--src/backend/access/hash/hashinsert.c243
-rw-r--r--src/backend/access/hash/hashovfl.c699
-rw-r--r--src/backend/access/hash/hashpage.c861
-rw-r--r--src/backend/access/hash/hashscan.c96
-rw-r--r--src/backend/access/hash/hashsearch.c302
-rw-r--r--src/backend/access/hash/hashutil.c130
-rw-r--r--src/backend/access/nbtree/nbtinsert.c42
-rw-r--r--src/backend/bootstrap/bootstrap.c10
-rw-r--r--src/backend/catalog/aclchk.c26
-rw-r--r--src/backend/commands/analyze.c21
-rw-r--r--src/backend/commands/copy.c4
-rw-r--r--src/backend/commands/indexcmds.c5
-rw-r--r--src/backend/commands/opclasscmds.c6
-rw-r--r--src/backend/commands/portalcmds.c23
-rw-r--r--src/backend/commands/tablecmds.c10
-rw-r--r--src/backend/executor/execGrouping.c205
-rw-r--r--src/backend/executor/execQual.c33
-rw-r--r--src/backend/executor/nodeAgg.c11
-rw-r--r--src/backend/executor/nodeIndexscan.c178
-rw-r--r--src/backend/executor/nodeSubplan.c6
-rw-r--r--src/backend/libpq/hba.c90
-rw-r--r--src/backend/libpq/ip.c147
-rw-r--r--src/backend/libpq/pg_hba.conf.sample7
-rw-r--r--src/backend/nodes/copyfuncs.c15
-rw-r--r--src/backend/nodes/equalfuncs.c11
-rw-r--r--src/backend/nodes/outfuncs.c4
-rw-r--r--src/backend/nodes/readfuncs.c4
-rw-r--r--src/backend/optimizer/plan/createplan.c21
-rw-r--r--src/backend/optimizer/plan/planner.c6
-rw-r--r--src/backend/optimizer/util/clauses.c4
-rw-r--r--src/backend/parser/gram.y92
-rw-r--r--src/backend/parser/parse_clause.c42
-rw-r--r--src/backend/parser/parse_expr.c43
-rw-r--r--src/backend/parser/parse_oper.c212
-rw-r--r--src/backend/po/ru.po14506
-rw-r--r--src/backend/port/ipc_test.c6
-rw-r--r--src/backend/postmaster/postmaster.c2
-rw-r--r--src/backend/storage/lmgr/lmgr.c28
-rw-r--r--src/backend/storage/lmgr/lock.c13
-rw-r--r--src/backend/tcop/postgres.c14
-rw-r--r--src/backend/utils/adt/acl.c19
-rw-r--r--src/backend/utils/adt/array_userfuncs.c70
-rw-r--r--src/backend/utils/adt/arrayfuncs.c132
-rw-r--r--src/backend/utils/adt/cash.c19
-rw-r--r--src/backend/utils/adt/date.c60
-rw-r--r--src/backend/utils/adt/datetime.c574
-rw-r--r--src/backend/utils/adt/formatting.c293
-rw-r--r--src/backend/utils/adt/nabstime.c292
-rw-r--r--src/backend/utils/adt/ri_triggers.c76
-rw-r--r--src/backend/utils/adt/ruleutils.c35
-rw-r--r--src/backend/utils/adt/timestamp.c67
-rw-r--r--src/backend/utils/cache/Makefile4
-rw-r--r--src/backend/utils/cache/lsyscache.c53
-rw-r--r--src/backend/utils/cache/typcache.c292
-rw-r--r--src/backend/utils/error/elog.c34
-rw-r--r--src/backend/utils/fmgr/dfmgr.c46
-rw-r--r--src/backend/utils/hash/dynahash.c82
-rw-r--r--src/backend/utils/hash/hashfn.c17
-rw-r--r--src/backend/utils/init/globals.c4
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_GB18030.pl4
-rw-r--r--src/backend/utils/mb/Unicode/gb18030_to_utf8.map126720
-rw-r--r--src/backend/utils/mb/conversion_procs/Makefile8
-rw-r--r--src/backend/utils/mb/conversion_procs/proc.mk3
-rw-r--r--src/backend/utils/misc/guc.c86
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample8
-rw-r--r--src/backend/utils/mmgr/portalmem.c6
-rw-r--r--src/backend/utils/sort/tuplesort.c22
-rw-r--r--src/bin/initdb/Makefile3
-rw-r--r--src/bin/initdb/initdb.sh17
-rw-r--r--src/bin/pg_controldata/po/ru.po16
-rw-r--r--src/bin/pg_dump/pg_backup.h7
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c53
-rw-r--r--src/bin/pg_dump/pg_dump.c33
-rw-r--r--src/bin/pg_dump/pg_restore.c16
-rw-r--r--src/bin/pg_id/pg_id.c59
-rw-r--r--src/bin/pg_resetxlog/pg_resetxlog.c5
-rw-r--r--src/bin/pg_resetxlog/po/ru.po12
-rw-r--r--src/bin/psql/common.c25
-rw-r--r--src/bin/psql/common.h3
-rw-r--r--src/bin/psql/describe.c10
-rw-r--r--src/bin/psql/input.c24
-rw-r--r--src/bin/psql/mbprint.c8
-rw-r--r--src/bin/psql/nls.mk4
-rw-r--r--src/bin/psql/po/de.po4
-rw-r--r--src/bin/psql/po/fr.po397
-rw-r--r--src/bin/psql/po/ru.po224
-rw-r--r--src/bin/psql/po/sv.po58
-rw-r--r--src/bin/psql/prompt.c4
-rw-r--r--src/bin/scripts/Makefile4
-rw-r--r--src/bin/scripts/common.c9
-rw-r--r--src/bin/scripts/po/ru.po406
-rw-r--r--src/include/access/hash.h241
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_amop.h34
-rw-r--r--src/include/catalog/pg_amproc.h6
-rw-r--r--src/include/catalog/pg_opclass.h6
-rw-r--r--src/include/catalog/pg_operator.h5
-rw-r--r--src/include/catalog/pg_proc.h10
-rw-r--r--src/include/executor/executor.h4
-rw-r--r--src/include/libpq/ip.h9
-rw-r--r--src/include/miscadmin.h7
-rw-r--r--src/include/nodes/execnodes.h29
-rw-r--r--src/include/nodes/nodes.h4
-rw-r--r--src/include/nodes/parsenodes.h19
-rw-r--r--src/include/nodes/pg_list.h8
-rw-r--r--src/include/nodes/primnodes.h14
-rw-r--r--src/include/parser/parse_clause.h5
-rw-r--r--src/include/parser/parse_oper.h7
-rw-r--r--src/include/pg_config.h.in12
-rw-r--r--src/include/port.h4
-rw-r--r--src/include/postgres_ext.h19
-rw-r--r--src/include/storage/lmgr.h5
-rw-r--r--src/include/utils/acl.h3
-rw-r--r--src/include/utils/builtins.h4
-rw-r--r--src/include/utils/cash.h1
-rw-r--r--src/include/utils/datetime.h33
-rw-r--r--src/include/utils/errcodes.h4
-rw-r--r--src/include/utils/guc.h4
-rw-r--r--src/include/utils/hsearch.h63
-rw-r--r--src/include/utils/lsyscache.h3
-rw-r--r--src/include/utils/typcache.h66
-rw-r--r--src/interfaces/ecpg/ChangeLog12
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c6
-rw-r--r--src/interfaces/ecpg/ecpglib/error.c8
-rw-r--r--src/interfaces/ecpg/include/sqltypes.h2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c4
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y22
-rw-r--r--src/interfaces/ecpg/test/test1.pgc3
-rw-r--r--src/interfaces/ecpg/test/test_thread.pgc4
-rw-r--r--src/interfaces/jdbc/build.xml48
-rw-r--r--src/interfaces/jdbc/org/postgresql/core/BaseStatement.java4
-rw-r--r--src/interfaces/jdbc/org/postgresql/errors.properties2
-rw-r--r--src/interfaces/jdbc/org/postgresql/errors_de.properties3
-rw-r--r--src/interfaces/jdbc/org/postgresql/errors_it.properties1
-rw-r--r--src/interfaces/jdbc/org/postgresql/errors_nl.properties1
-rw-r--r--src/interfaces/jdbc/org/postgresql/errors_zh_TW.properties1
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java4
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java59
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java25
-rw-r--r--src/interfaces/jdbc/org/postgresql/test/jdbc2/BlobTest.java99
-rw-r--r--src/interfaces/jdbc/org/postgresql/test/jdbc2/ResultSetTest.java30
-rw-r--r--src/interfaces/jdbc/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java22
-rw-r--r--src/interfaces/libpq/Makefile7
-rw-r--r--src/interfaces/libpq/fe-connect.c4
-rw-r--r--src/interfaces/libpq/fe-exec.c8
-rw-r--r--src/interfaces/libpq/fe-protocol2.c38
-rw-r--r--src/interfaces/libpq/fe-protocol3.c22
-rw-r--r--src/interfaces/libpq/fe-secure.c23
-rw-r--r--src/interfaces/libpq/libpq-fe.h2
-rw-r--r--src/interfaces/libpq/libpq-int.h4
-rw-r--r--src/interfaces/libpq/po/es.po910
-rw-r--r--src/interfaces/libpq/po/fr.po193
-rw-r--r--src/interfaces/libpq/po/ru.po273
-rw-r--r--src/interfaces/libpq/po/sv.po51
-rw-r--r--src/interfaces/libpq/win32.c2
-rw-r--r--src/interfaces/libpq/win32.mak51
-rw-r--r--src/pl/plperl/plperl.c6
-rw-r--r--src/pl/plpgsql/src/pl_comp.c47
-rw-r--r--src/pl/plpgsql/src/plpgsql.h10
-rw-r--r--src/pl/tcl/pltcl.c14
-rw-r--r--src/port/thread.c13
-rw-r--r--src/template/bsdi3
-rw-r--r--src/template/freebsd4
-rw-r--r--src/template/linux2
-rw-r--r--src/template/netbsd1
-rw-r--r--src/template/osf3
-rw-r--r--src/template/unixware4
-rw-r--r--src/test/regress/expected/abstime-solaris-1947.out5
-rw-r--r--src/test/regress/expected/abstime.out5
-rw-r--r--src/test/regress/expected/arrays.out30
-rw-r--r--src/test/regress/expected/circle.out2
-rw-r--r--src/test/regress/expected/date.out2
-rw-r--r--src/test/regress/expected/geometry.out2
-rw-r--r--src/test/regress/expected/geometry_1.out2
-rw-r--r--src/test/regress/expected/horology-no-DST-before-1970.out3
-rw-r--r--src/test/regress/expected/horology-solaris-1947.out3
-rw-r--r--src/test/regress/expected/horology.out3
-rw-r--r--src/test/regress/expected/polymorphism.out46
-rw-r--r--src/test/regress/expected/portals.out2
-rw-r--r--src/test/regress/expected/timestamp.out4
-rw-r--r--src/test/regress/expected/timestamptz.out4
-rw-r--r--src/test/regress/expected/update.out25
-rw-r--r--src/test/regress/parallel_schedule2
-rw-r--r--src/test/regress/serial_schedule3
-rw-r--r--src/test/regress/sql/arrays.sql6
-rw-r--r--src/test/regress/sql/circle.sql3
-rw-r--r--src/test/regress/sql/geometry.sql3
-rw-r--r--src/test/regress/sql/update.sql19
-rwxr-xr-xsrc/tools/pgindent/pgindent5
191 files changed, 74262 insertions, 77523 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 083198089b0..34840ed76d3 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.166 2003/08/08 04:52:20 momjian Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.166.2.1 2003/09/07 04:36:46 momjian Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -132,10 +132,7 @@ enable_rpath = @enable_rpath@
enable_nls = @enable_nls@
enable_debug = @enable_debug@
-python_version = @python_version@
python_includespec = @python_includespec@
-python_moduledir = @python_moduledir@
-python_moduleexecdir = @python_moduleexecdir@
python_libspec = @python_libspec@
python_configdir = @python_configdir@
@@ -266,6 +263,9 @@ host_tuple = @host@
host_os = @host_os@
host_cpu = @host_cpu@
+# Make HAVE_IPV6 available for initdb script creation
+HAVE_IPV6= @HAVE_IPV6@
+
# The HP-UX port makefile, for one, needs access to this symbol
HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index fbdf0dc04c8..f387418b129 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.65 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.65.2.1 2003/09/07 04:36:46 momjian Exp $
*
* NOTES
* This file contains only the public interface routines.
@@ -27,9 +27,6 @@
#include "miscadmin.h"
-bool BuildingHash = false;
-
-
/* Working state for hashbuild and its callback */
typedef struct
{
@@ -61,9 +58,6 @@ hashbuild(PG_FUNCTION_ARGS)
double reltuples;
HashBuildState buildstate;
- /* set flag to disable locking */
- BuildingHash = true;
-
/*
* We expect to be called exactly once for any index relation. If
* that's not the case, big trouble's what we have.
@@ -82,9 +76,6 @@ hashbuild(PG_FUNCTION_ARGS)
reltuples = IndexBuildHeapScan(heap, index, indexInfo,
hashbuildCallback, (void *) &buildstate);
- /* all done */
- BuildingHash = false;
-
/*
* Since we just counted the tuples in the heap, we update its stats
* in pg_class to guarantee that the planner takes advantage of the
@@ -212,11 +203,19 @@ hashgettuple(PG_FUNCTION_ARGS)
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
ScanDirection dir = (ScanDirection) PG_GETARG_INT32(1);
HashScanOpaque so = (HashScanOpaque) scan->opaque;
+ Relation rel = scan->indexRelation;
Page page;
OffsetNumber offnum;
bool res;
/*
+ * We hold pin but not lock on current buffer while outside the hash AM.
+ * Reacquire the read lock here.
+ */
+ if (BufferIsValid(so->hashso_curbuf))
+ _hash_chgbufaccess(rel, so->hashso_curbuf, HASH_NOLOCK, HASH_READ);
+
+ /*
* If we've already initialized this scan, we can just advance it in
* the appropriate direction. If we haven't done so yet, we call a
* routine to get the first item in the scan.
@@ -267,6 +266,10 @@ hashgettuple(PG_FUNCTION_ARGS)
}
}
+ /* Release read lock on current buffer, but keep it pinned */
+ if (BufferIsValid(so->hashso_curbuf))
+ _hash_chgbufaccess(rel, so->hashso_curbuf, HASH_READ, HASH_NOLOCK);
+
PG_RETURN_BOOL(res);
}
@@ -285,6 +288,8 @@ hashbeginscan(PG_FUNCTION_ARGS)
scan = RelationGetIndexScan(rel, keysz, scankey);
so = (HashScanOpaque) palloc(sizeof(HashScanOpaqueData));
+ so->hashso_bucket_valid = false;
+ so->hashso_bucket_blkno = 0;
so->hashso_curbuf = so->hashso_mrkbuf = InvalidBuffer;
scan->opaque = so;
@@ -303,28 +308,38 @@ hashrescan(PG_FUNCTION_ARGS)
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
ScanKey scankey = (ScanKey) PG_GETARG_POINTER(1);
HashScanOpaque so = (HashScanOpaque) scan->opaque;
- ItemPointer iptr;
+ Relation rel = scan->indexRelation;
- /* we hold a read lock on the current page in the scan */
- if (ItemPointerIsValid(iptr = &(scan->currentItemData)))
+ /* if we are called from beginscan, so is still NULL */
+ if (so)
{
- _hash_relbuf(scan->indexRelation, so->hashso_curbuf, HASH_READ);
+ /* release any pins we still hold */
+ if (BufferIsValid(so->hashso_curbuf))
+ _hash_dropbuf(rel, so->hashso_curbuf);
so->hashso_curbuf = InvalidBuffer;
- ItemPointerSetInvalid(iptr);
- }
- if (ItemPointerIsValid(iptr = &(scan->currentMarkData)))
- {
- _hash_relbuf(scan->indexRelation, so->hashso_mrkbuf, HASH_READ);
+
+ if (BufferIsValid(so->hashso_mrkbuf))
+ _hash_dropbuf(rel, so->hashso_mrkbuf);
so->hashso_mrkbuf = InvalidBuffer;
- ItemPointerSetInvalid(iptr);
+
+ /* release lock on bucket, too */
+ if (so->hashso_bucket_blkno)
+ _hash_droplock(rel, so->hashso_bucket_blkno, HASH_SHARE);
+ so->hashso_bucket_blkno = 0;
}
+ /* set positions invalid (this will cause _hash_first call) */
+ ItemPointerSetInvalid(&(scan->currentItemData));
+ ItemPointerSetInvalid(&(scan->currentMarkData));
+
/* Update scan key, if a new one is given */
if (scankey && scan->numberOfKeys > 0)
{
memmove(scan->keyData,
scankey,
scan->numberOfKeys * sizeof(ScanKeyData));
+ if (so)
+ so->hashso_bucket_valid = false;
}
PG_RETURN_VOID();
@@ -337,32 +352,32 @@ Datum
hashendscan(PG_FUNCTION_ARGS)
{
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
- ItemPointer iptr;
- HashScanOpaque so;
+ HashScanOpaque so = (HashScanOpaque) scan->opaque;
+ Relation rel = scan->indexRelation;
- so = (HashScanOpaque) scan->opaque;
+ /* don't need scan registered anymore */
+ _hash_dropscan(scan);
- /* release any locks we still hold */
- if (ItemPointerIsValid(iptr = &(scan->currentItemData)))
- {
- _hash_relbuf(scan->indexRelation, so->hashso_curbuf, HASH_READ);
- so->hashso_curbuf = InvalidBuffer;
- ItemPointerSetInvalid(iptr);
- }
+ /* release any pins we still hold */
+ if (BufferIsValid(so->hashso_curbuf))
+ _hash_dropbuf(rel, so->hashso_curbuf);
+ so->hashso_curbuf = InvalidBuffer;
- if (ItemPointerIsValid(iptr = &(scan->currentMarkData)))
- {
- if (BufferIsValid(so->hashso_mrkbuf))
- _hash_relbuf(scan->indexRelation, so->hashso_mrkbuf, HASH_READ);
- so->hashso_mrkbuf = InvalidBuffer;
- ItemPointerSetInvalid(iptr);
- }
+ if (BufferIsValid(so->hashso_mrkbuf))
+ _hash_dropbuf(rel, so->hashso_mrkbuf);
+ so->hashso_mrkbuf = InvalidBuffer;
- /* don't need scan registered anymore */
- _hash_dropscan(scan);
+ /* release lock on bucket, too */
+ if (so->hashso_bucket_blkno)
+ _hash_droplock(rel, so->hashso_bucket_blkno, HASH_SHARE);
+ so->hashso_bucket_blkno = 0;
/* be tidy */
- pfree(scan->opaque);
+ ItemPointerSetInvalid(&(scan->currentItemData));
+ ItemPointerSetInvalid(&(scan->currentMarkData));
+
+ pfree(so);
+ scan->opaque = NULL;
PG_RETURN_VOID();
}
@@ -374,25 +389,21 @@ Datum
hashmarkpos(PG_FUNCTION_ARGS)
{
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
- ItemPointer iptr;
- HashScanOpaque so;
-
- so = (HashScanOpaque) scan->opaque;
+ HashScanOpaque so = (HashScanOpaque) scan->opaque;
+ Relation rel = scan->indexRelation;
- /* release lock on old marked data, if any */
- if (ItemPointerIsValid(iptr = &(scan->currentMarkData)))
- {
- _hash_relbuf(scan->indexRelation, so->hashso_mrkbuf, HASH_READ);
- so->hashso_mrkbuf = InvalidBuffer;
- ItemPointerSetInvalid(iptr);
- }
+ /* release pin on old marked data, if any */
+ if (BufferIsValid(so->hashso_mrkbuf))
+ _hash_dropbuf(rel, so->hashso_mrkbuf);
+ so->hashso_mrkbuf = InvalidBuffer;
+ ItemPointerSetInvalid(&(scan->currentMarkData));
- /* bump lock on currentItemData and copy to currentMarkData */
+ /* bump pin count on currentItemData and copy to currentMarkData */
if (ItemPointerIsValid(&(scan->currentItemData)))
{
- so->hashso_mrkbuf = _hash_getbuf(scan->indexRelation,
+ so->hashso_mrkbuf = _hash_getbuf(rel,
BufferGetBlockNumber(so->hashso_curbuf),
- HASH_READ);
+ HASH_NOLOCK);
scan->currentMarkData = scan->currentItemData;
}
@@ -406,26 +417,21 @@ Datum
hashrestrpos(PG_FUNCTION_ARGS)
{
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
- ItemPointer iptr;
- HashScanOpaque so;
+ HashScanOpaque so = (HashScanOpaque) scan->opaque;
+ Relation rel = scan->indexRelation;
- so = (HashScanOpaque) scan->opaque;
+ /* release pin on current data, if any */
+ if (BufferIsValid(so->hashso_curbuf))
+ _hash_dropbuf(rel, so->hashso_curbuf);
+ so->hashso_curbuf = InvalidBuffer;
+ ItemPointerSetInvalid(&(scan->currentItemData));
- /* release lock on current data, if any */
- if (ItemPointerIsValid(iptr = &(scan->currentItemData)))
- {
- _hash_relbuf(scan->indexRelation, so->hashso_curbuf, HASH_READ);
- so->hashso_curbuf = InvalidBuffer;
- ItemPointerSetInvalid(iptr);
- }
-
- /* bump lock on currentMarkData and copy to currentItemData */
+ /* bump pin count on currentMarkData and copy to currentItemData */
if (ItemPointerIsValid(&(scan->currentMarkData)))
{
- so->hashso_curbuf = _hash_getbuf(scan->indexRelation,
+ so->hashso_curbuf = _hash_getbuf(rel,
BufferGetBlockNumber(so->hashso_mrkbuf),
- HASH_READ);
-
+ HASH_NOLOCK);
scan->currentItemData = scan->currentMarkData;
}
@@ -449,40 +455,163 @@ hashbulkdelete(PG_FUNCTION_ARGS)
BlockNumber num_pages;
double tuples_removed;
double num_index_tuples;
- IndexScanDesc iscan;
+ double orig_ntuples;
+ Bucket orig_maxbucket;
+ Bucket cur_maxbucket;
+ Bucket cur_bucket;
+ Buffer metabuf;
+ HashMetaPage metap;
+ HashMetaPageData local_metapage;
tuples_removed = 0;
num_index_tuples = 0;
/*
- * XXX generic implementation --- should be improved!
+ * Read the metapage to fetch original bucket and tuple counts. Also,
+ * we keep a copy of the last-seen metapage so that we can use its
+ * hashm_spares[] values to compute bucket page addresses. This is a
+ * bit hokey but perfectly safe, since the interesting entries in the
+ * spares array cannot change under us; and it beats rereading the
+ * metapage for each bucket.
*/
+ metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_READ);
+ metap = (HashMetaPage) BufferGetPage(metabuf);
+ _hash_checkpage(rel, (Page) metap, LH_META_PAGE);
+ orig_maxbucket = metap->hashm_maxbucket;
+ orig_ntuples = metap->hashm_ntuples;
+ memcpy(&local_metapage, metap, sizeof(local_metapage));
+ _hash_relbuf(rel, metabuf);
+
+ /* Scan the buckets that we know exist */
+ cur_bucket = 0;
+ cur_maxbucket = orig_maxbucket;
+
+loop_top:
+ while (cur_bucket <= cur_maxbucket)
+ {
+ BlockNumber bucket_blkno;
+ BlockNumber blkno;
+ bool bucket_dirty = false;
- /* walk through the entire index */
- iscan = index_beginscan(NULL, rel, SnapshotAny, 0, (ScanKey) NULL);
- /* including killed tuples */
- iscan->ignore_killed_tuples = false;
+ /* Get address of bucket's start page */
+ bucket_blkno = BUCKET_TO_BLKNO(&local_metapage, cur_bucket);
- while (index_getnext_indexitem(iscan, ForwardScanDirection))
- {
- if (callback(&iscan->xs_ctup.t_self, callback_state))
- {
- ItemPointerData indextup = iscan->currentItemData;
+ /* Exclusive-lock the bucket so we can shrink it */
+ _hash_getlock(rel, bucket_blkno, HASH_EXCLUSIVE);
- /* adjust any active scans that will be affected by deletion */
- /* (namely, my own scan) */
- _hash_adjscans(rel, &indextup);
+ /* Shouldn't have any active scans locally, either */
+ if (_hash_has_active_scan(rel, cur_bucket))
+ elog(ERROR, "hash index has active scan during VACUUM");
+
+ /* Scan each page in bucket */
+ blkno = bucket_blkno;
+ while (BlockNumberIsValid(blkno))
+ {
+ Buffer buf;
+ Page page;
+ HashPageOpaque opaque;
+ OffsetNumber offno;
+ OffsetNumber maxoffno;
+ bool page_dirty = false;
+
+ buf = _hash_getbuf(rel, blkno, HASH_WRITE);
+ page = BufferGetPage(buf);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ opaque = (HashPageOpaque) PageGetSpecialPointer(page);
+ Assert(opaque->hasho_bucket == cur_bucket);
+
+ /* Scan each tuple in page */
+ offno = FirstOffsetNumber;
+ maxoffno = PageGetMaxOffsetNumber(page);
+ while (offno <= maxoffno)
+ {
+ HashItem hitem;
+ ItemPointer htup;
+
+ hitem = (HashItem) PageGetItem(page,
+ PageGetItemId(page, offno));
+ htup = &(hitem->hash_itup.t_tid);
+ if (callback(htup, callback_state))
+ {
+ /* delete the item from the page */
+ PageIndexTupleDelete(page, offno);
+ bucket_dirty = page_dirty = true;
+
+ /* don't increment offno, instead decrement maxoffno */
+ maxoffno = OffsetNumberPrev(maxoffno);
+
+ tuples_removed += 1;
+ }
+ else
+ {
+ offno = OffsetNumberNext(offno);
+
+ num_index_tuples += 1;
+ }
+ }
- /* delete the data from the page */
- _hash_pagedel(rel, &indextup);
+ /*
+ * Write page if needed, advance to next page.
+ */
+ blkno = opaque->hasho_nextblkno;
- tuples_removed += 1;
+ if (page_dirty)
+ _hash_wrtbuf(rel, buf);
+ else
+ _hash_relbuf(rel, buf);
}
+
+ /* If we deleted anything, try to compact free space */
+ if (bucket_dirty)
+ _hash_squeezebucket(rel, cur_bucket, bucket_blkno);
+
+ /* Release bucket lock */
+ _hash_droplock(rel, bucket_blkno, HASH_EXCLUSIVE);
+
+ /* Advance to next bucket */
+ cur_bucket++;
+ }
+
+ /* Write-lock metapage and check for split since we started */
+ metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_WRITE);
+ metap = (HashMetaPage) BufferGetPage(metabuf);
+ _hash_checkpage(rel, (Page) metap, LH_META_PAGE);
+
+ if (cur_maxbucket != metap->hashm_maxbucket)
+ {
+ /* There's been a split, so process the additional bucket(s) */
+ cur_maxbucket = metap->hashm_maxbucket;
+ memcpy(&local_metapage, metap, sizeof(local_metapage));
+ _hash_relbuf(rel, metabuf);
+ goto loop_top;
+ }
+
+ /* Okay, we're really done. Update tuple count in metapage. */
+
+ if (orig_maxbucket == metap->hashm_maxbucket &&
+ orig_ntuples == metap->hashm_ntuples)
+ {
+ /*
+ * No one has split or inserted anything since start of scan,
+ * so believe our count as gospel.
+ */
+ metap->hashm_ntuples = num_index_tuples;
+ }
+ else
+ {
+ /*
+ * Otherwise, our count is untrustworthy since we may have
+ * double-scanned tuples in split buckets. Proceed by
+ * dead-reckoning.
+ */
+ if (metap->hashm_ntuples > tuples_removed)
+ metap->hashm_ntuples -= tuples_removed;
else
- num_index_tuples += 1;
+ metap->hashm_ntuples = 0;
+ num_index_tuples = metap->hashm_ntuples;
}
- index_endscan(iscan);
+ _hash_wrtbuf(rel, metabuf);
/* return statistics */
num_pages = RelationGetNumberOfBlocks(rel);
diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c
index d9da5e1ee37..4cb3266a944 100644
--- a/src/backend/access/hash/hashinsert.c
+++ b/src/backend/access/hash/hashinsert.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.27 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.27.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,136 +16,124 @@
#include "postgres.h"
#include "access/hash.h"
+#include "storage/lmgr.h"
+
+
+static OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf,
+ Size itemsize, HashItem hitem);
-static InsertIndexResult _hash_insertonpg(Relation rel, Buffer buf, int keysz, ScanKey scankey, HashItem hitem, Buffer metabuf);
-static OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf, int keysz, ScanKey itup_scankey, Size itemsize, HashItem hitem);
/*
* _hash_doinsert() -- Handle insertion of a single HashItem in the table.
*
* This routine is called by the public interface routines, hashbuild
- * and hashinsert. By here, hashitem is filled in, and has a unique
- * (xid, seqno) pair. The datum to be used as a "key" is in the
- * hashitem.
+ * and hashinsert. By here, hashitem is completely filled in.
+ * The datum to be used as a "key" is in the hashitem.
*/
InsertIndexResult
_hash_doinsert(Relation rel, HashItem hitem)
{
Buffer buf;
Buffer metabuf;
- BlockNumber blkno;
HashMetaPage metap;
IndexTuple itup;
+ BlockNumber itup_blkno;
+ OffsetNumber itup_off;
InsertIndexResult res;
- ScanKey itup_scankey;
- int natts;
+ BlockNumber blkno;
Page page;
-
- metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_READ);
- metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
-
- /* we need a scan key to do our search, so build one */
- itup = &(hitem->hash_itup);
- if ((natts = rel->rd_rel->relnatts) != 1)
- elog(ERROR, "Hash indexes support only one index key");
- itup_scankey = _hash_mkscankey(rel, itup);
+ HashPageOpaque pageopaque;
+ Size itemsz;
+ bool do_expand;
+ uint32 hashkey;
+ Bucket bucket;
+ Datum datum;
+ bool isnull;
/*
- * find the first page in the bucket chain containing this key and
- * place it in buf. _hash_search obtains a read lock for us.
+ * Compute the hash key for the item. We do this first so as not to
+ * need to hold any locks while running the hash function.
*/
- _hash_search(rel, natts, itup_scankey, &buf, metap);
- page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE);
+ itup = &(hitem->hash_itup);
+ if (rel->rd_rel->relnatts != 1)
+ elog(ERROR, "hash indexes support only one index key");
+ datum = index_getattr(itup, 1, RelationGetDescr(rel), &isnull);
+ Assert(!isnull);
+ hashkey = _hash_datum2hashkey(rel, datum);
+
+ /* compute item size too */
+ itemsz = IndexTupleDSize(hitem->hash_itup)
+ + (sizeof(HashItemData) - sizeof(IndexTupleData));
+
+ itemsz = MAXALIGN(itemsz); /* be safe, PageAddItem will do this but
+ * we need to be consistent */
/*
- * trade in our read lock for a write lock so that we can do the
- * insertion.
+ * Acquire shared split lock so we can compute the target bucket
+ * safely (see README).
*/
- blkno = BufferGetBlockNumber(buf);
- _hash_relbuf(rel, buf, HASH_READ);
- buf = _hash_getbuf(rel, blkno, HASH_WRITE);
+ _hash_getlock(rel, 0, HASH_SHARE);
+ /* Read the metapage */
+ metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_READ);
+ metap = (HashMetaPage) BufferGetPage(metabuf);
+ _hash_checkpage(rel, (Page) metap, LH_META_PAGE);
/*
- * XXX btree comment (haven't decided what to do in hash): don't think
- * the bucket can be split while we're reading the metapage.
- *
- * If the page was split between the time that we surrendered our read
- * lock and acquired our write lock, then this page may no longer be
- * the right place for the key we want to insert.
+ * Check whether the item can fit on a hash page at all. (Eventually,
+ * we ought to try to apply TOAST methods if not.) Note that at this
+ * point, itemsz doesn't include the ItemId.
*/
+ if (itemsz > HashMaxItemSize((Page) metap))
+ ereport(ERROR,
+ (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
+ errmsg("index tuple size %lu exceeds hash maximum, %lu",
+ (unsigned long) itemsz,
+ (unsigned long) HashMaxItemSize((Page) metap))));
- /* do the insertion */
- res = _hash_insertonpg(rel, buf, natts, itup_scankey,
- hitem, metabuf);
+ /*
+ * Compute the target bucket number, and convert to block number.
+ */
+ bucket = _hash_hashkey2bucket(hashkey,
+ metap->hashm_maxbucket,
+ metap->hashm_highmask,
+ metap->hashm_lowmask);
- /* be tidy */
- _hash_freeskey(itup_scankey);
+ blkno = BUCKET_TO_BLKNO(metap, bucket);
- return res;
-}
+ /* release lock on metapage, but keep pin since we'll need it again */
+ _hash_chgbufaccess(rel, metabuf, HASH_READ, HASH_NOLOCK);
-/*
- * _hash_insertonpg() -- Insert a tuple on a particular page in the table.
- *
- * This recursive procedure does the following things:
- *
- * + if necessary, splits the target page.
- * + inserts the tuple.
- *
- * On entry, we must have the right buffer on which to do the
- * insertion, and the buffer must be pinned and locked. On return,
- * we will have dropped both the pin and the write lock on the buffer.
- *
- */
-static InsertIndexResult
-_hash_insertonpg(Relation rel,
- Buffer buf,
- int keysz,
- ScanKey scankey,
- HashItem hitem,
- Buffer metabuf)
-{
- InsertIndexResult res;
- Page page;
- BlockNumber itup_blkno;
- OffsetNumber itup_off;
- Size itemsz;
- HashPageOpaque pageopaque;
- bool do_expand = false;
- Buffer ovflbuf;
- HashMetaPage metap;
- Bucket bucket;
+ /*
+ * Acquire share lock on target bucket; then we can release split lock.
+ */
+ _hash_getlock(rel, blkno, HASH_SHARE);
- metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
+ _hash_droplock(rel, 0, HASH_SHARE);
+ /* Fetch the primary bucket page for the bucket */
+ buf = _hash_getbuf(rel, blkno, HASH_WRITE);
page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE);
pageopaque = (HashPageOpaque) PageGetSpecialPointer(page);
- bucket = pageopaque->hasho_bucket;
-
- itemsz = IndexTupleDSize(hitem->hash_itup)
- + (sizeof(HashItemData) - sizeof(IndexTupleData));
- itemsz = MAXALIGN(itemsz);
+ Assert(pageopaque->hasho_bucket == bucket);
+ /* Do the insertion */
while (PageGetFreeSpace(page) < itemsz)
{
/*
* no space on this page; check for an overflow page
*/
- if (BlockNumberIsValid(pageopaque->hasho_nextblkno))
+ BlockNumber nextblkno = pageopaque->hasho_nextblkno;
+
+ if (BlockNumberIsValid(nextblkno))
{
/*
* ovfl page exists; go get it. if it doesn't have room,
* we'll find out next pass through the loop test above.
*/
- ovflbuf = _hash_getbuf(rel, pageopaque->hasho_nextblkno,
- HASH_WRITE);
- _hash_relbuf(rel, buf, HASH_WRITE);
- buf = ovflbuf;
+ _hash_relbuf(rel, buf);
+ buf = _hash_getbuf(rel, nextblkno, HASH_WRITE);
page = BufferGetPage(buf);
}
else
@@ -154,68 +142,72 @@ _hash_insertonpg(Relation rel,
* we're at the end of the bucket chain and we haven't found a
* page with enough room. allocate a new overflow page.
*/
- do_expand = true;
- ovflbuf = _hash_addovflpage(rel, &metabuf, buf);
- _hash_relbuf(rel, buf, HASH_WRITE);
- buf = ovflbuf;
+
+ /* release our write lock without modifying buffer */
+ _hash_chgbufaccess(rel, buf, HASH_READ, HASH_NOLOCK);
+
+ /* chain to a new overflow page */
+ buf = _hash_addovflpage(rel, metabuf, buf);
page = BufferGetPage(buf);
- if (PageGetFreeSpace(page) < itemsz)
- {
- /* it doesn't fit on an empty page -- give up */
- elog(ERROR, "hash item too large");
- }
+ /* should fit now, given test above */
+ Assert(PageGetFreeSpace(page) >= itemsz);
}
- _hash_checkpage(page, LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, page, LH_OVERFLOW_PAGE);
pageopaque = (HashPageOpaque) PageGetSpecialPointer(page);
Assert(pageopaque->hasho_bucket == bucket);
}
- itup_off = _hash_pgaddtup(rel, buf, keysz, scankey, itemsz, hitem);
+ /* found page with enough space, so add the item here */
+ itup_off = _hash_pgaddtup(rel, buf, itemsz, hitem);
itup_blkno = BufferGetBlockNumber(buf);
- /* by here, the new tuple is inserted */
- res = (InsertIndexResult) palloc(sizeof(InsertIndexResultData));
+ /* write and release the modified page */
+ _hash_wrtbuf(rel, buf);
- ItemPointerSet(&(res->pointerData), itup_blkno, itup_off);
+ /* We can drop the bucket lock now */
+ _hash_droplock(rel, blkno, HASH_SHARE);
- if (res != NULL)
- {
- /*
- * Increment the number of keys in the table. We switch lock
- * access type just for a moment to allow greater accessibility to
- * the metapage.
- */
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf,
- HASH_READ, HASH_WRITE);
- metap->hashm_nkeys += 1;
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf,
- HASH_WRITE, HASH_READ);
+ /*
+ * Write-lock the metapage so we can increment the tuple count.
+ * After incrementing it, check to see if it's time for a split.
+ */
+ _hash_chgbufaccess(rel, metabuf, HASH_NOLOCK, HASH_WRITE);
- }
+ metap->hashm_ntuples += 1;
- _hash_wrtbuf(rel, buf);
+ /* Make sure this stays in sync with _hash_expandtable() */
+ do_expand = metap->hashm_ntuples >
+ (double) metap->hashm_ffactor * (metap->hashm_maxbucket + 1);
- if (do_expand ||
- (metap->hashm_nkeys / (metap->hashm_maxbucket + 1))
- > metap->hashm_ffactor)
+ /* Write out the metapage and drop lock, but keep pin */
+ _hash_chgbufaccess(rel, metabuf, HASH_WRITE, HASH_NOLOCK);
+
+ /* Attempt to split if a split is needed */
+ if (do_expand)
_hash_expandtable(rel, metabuf);
- _hash_relbuf(rel, metabuf, HASH_READ);
+
+ /* Finally drop our pin on the metapage */
+ _hash_dropbuf(rel, metabuf);
+
+ /* Create the return data structure */
+ res = (InsertIndexResult) palloc(sizeof(InsertIndexResultData));
+
+ ItemPointerSet(&(res->pointerData), itup_blkno, itup_off);
+
return res;
}
/*
* _hash_pgaddtup() -- add a tuple to a particular page in the index.
*
- * This routine adds the tuple to the page as requested, and keeps the
- * write lock and reference associated with the page's buffer. It is
- * an error to call pgaddtup() without a write lock and reference.
+ * This routine adds the tuple to the page as requested; it does
+ * not write out the page. It is an error to call pgaddtup() without
+ * a write lock and pin.
*/
static OffsetNumber
_hash_pgaddtup(Relation rel,
Buffer buf,
- int keysz,
- ScanKey itup_scankey,
Size itemsize,
HashItem hitem)
{
@@ -223,7 +215,7 @@ _hash_pgaddtup(Relation rel,
Page page;
page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
itup_off = OffsetNumberNext(PageGetMaxOffsetNumber(page));
if (PageAddItem(page, (Item) hitem, itemsize, itup_off, LP_USED)
@@ -231,8 +223,5 @@ _hash_pgaddtup(Relation rel,
elog(ERROR, "failed to add index item to \"%s\"",
RelationGetRelationName(rel));
- /* write the buffer, but hold our lock */
- _hash_wrtnorelbuf(buf);
-
return itup_off;
}
diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c
index 06233b817b7..6470ec38f30 100644
--- a/src/backend/access/hash/hashovfl.c
+++ b/src/backend/access/hash/hashovfl.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.37 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.37.2.1 2003/09/07 04:36:47 momjian Exp $
*
* NOTES
* Overflow pages look like ordinary relation pages.
@@ -20,253 +20,314 @@
#include "access/hash.h"
-static OverflowPageAddress _hash_getovfladdr(Relation rel, Buffer *metabufp);
+static BlockNumber _hash_getovflpage(Relation rel, Buffer metabuf);
static uint32 _hash_firstfreebit(uint32 map);
+
+/*
+ * Convert overflow page bit number (its index in the free-page bitmaps)
+ * to block number within the index.
+ */
+static BlockNumber
+bitno_to_blkno(HashMetaPage metap, uint32 ovflbitnum)
+{
+ uint32 splitnum = metap->hashm_ovflpoint;
+ uint32 i;
+
+ /* Convert zero-based bitnumber to 1-based page number */
+ ovflbitnum += 1;
+
+ /* Determine the split number for this page (must be >= 1) */
+ for (i = 1;
+ i < splitnum && ovflbitnum > metap->hashm_spares[i];
+ i++)
+ /* loop */ ;
+
+ /*
+ * Convert to absolute page number by adding the number of bucket pages
+ * that exist before this split point.
+ */
+ return (BlockNumber) ((1 << i) + ovflbitnum);
+}
+
+/*
+ * Convert overflow page block number to bit number for free-page bitmap.
+ */
+static uint32
+blkno_to_bitno(HashMetaPage metap, BlockNumber ovflblkno)
+{
+ uint32 splitnum = metap->hashm_ovflpoint;
+ uint32 i;
+ uint32 bitnum;
+
+ /* Determine the split number containing this page */
+ for (i = 1; i <= splitnum; i++)
+ {
+ if (ovflblkno <= (BlockNumber) (1 << i))
+ break; /* oops */
+ bitnum = ovflblkno - (1 << i);
+ if (bitnum <= metap->hashm_spares[i])
+ return bitnum - 1; /* -1 to convert 1-based to 0-based */
+ }
+
+ elog(ERROR, "invalid overflow block number %u", ovflblkno);
+ return 0; /* keep compiler quiet */
+}
+
/*
* _hash_addovflpage
*
- * Add an overflow page to the page currently pointed to by the buffer
- * argument 'buf'.
+ * Add an overflow page to the bucket whose last page is pointed to by 'buf'.
*
- * *Metabufp has a read lock upon entering the function; buf has a
- * write lock.
+ * On entry, the caller must hold a pin but no lock on 'buf'. The pin is
+ * dropped before exiting (we assume the caller is not interested in 'buf'
+ * anymore). The returned overflow page will be pinned and write-locked;
+ * it is guaranteed to be empty.
*
+ * The caller must hold a pin, but no lock, on the metapage buffer.
+ * That buffer is returned in the same state.
+ *
+ * The caller must hold at least share lock on the bucket, to ensure that
+ * no one else tries to compact the bucket meanwhile. This guarantees that
+ * 'buf' won't stop being part of the bucket while it's unlocked.
+ *
+ * NB: since this could be executed concurrently by multiple processes,
+ * one should not assume that the returned overflow page will be the
+ * immediate successor of the originally passed 'buf'. Additional overflow
+ * pages might have been added to the bucket chain in between.
*/
Buffer
-_hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf)
+_hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf)
{
-
- OverflowPageAddress oaddr;
BlockNumber ovflblkno;
Buffer ovflbuf;
- HashMetaPage metap;
- HashPageOpaque ovflopaque;
- HashPageOpaque pageopaque;
Page page;
Page ovflpage;
-
- /* this had better be the last page in a bucket chain */
- page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
- pageopaque = (HashPageOpaque) PageGetSpecialPointer(page);
- Assert(!BlockNumberIsValid(pageopaque->hasho_nextblkno));
-
- metap = (HashMetaPage) BufferGetPage(*metabufp);
- _hash_checkpage((Page) metap, LH_META_PAGE);
+ HashPageOpaque pageopaque;
+ HashPageOpaque ovflopaque;
/* allocate an empty overflow page */
- oaddr = _hash_getovfladdr(rel, metabufp);
- if (oaddr == InvalidOvflAddress)
- elog(ERROR, "_hash_getovfladdr failed");
- ovflblkno = OADDR_TO_BLKNO(OADDR_OF(SPLITNUM(oaddr), OPAGENUM(oaddr)));
- Assert(BlockNumberIsValid(ovflblkno));
+ ovflblkno = _hash_getovflpage(rel, metabuf);
+
+ /* lock the overflow page */
ovflbuf = _hash_getbuf(rel, ovflblkno, HASH_WRITE);
- Assert(BufferIsValid(ovflbuf));
ovflpage = BufferGetPage(ovflbuf);
- /* initialize the new overflow page */
+ /*
+ * Write-lock the tail page. It is okay to hold two buffer locks here
+ * since there cannot be anyone else contending for access to ovflbuf.
+ */
+ _hash_chgbufaccess(rel, buf, HASH_NOLOCK, HASH_WRITE);
+
+ /* loop to find current tail page, in case someone else inserted too */
+ for (;;)
+ {
+ BlockNumber nextblkno;
+
+ page = BufferGetPage(buf);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ pageopaque = (HashPageOpaque) PageGetSpecialPointer(page);
+ nextblkno = pageopaque->hasho_nextblkno;
+
+ if (!BlockNumberIsValid(nextblkno))
+ break;
+
+ /* we assume we do not need to write the unmodified page */
+ _hash_relbuf(rel, buf);
+
+ buf = _hash_getbuf(rel, nextblkno, HASH_WRITE);
+ }
+
+ /* now that we have correct backlink, initialize new overflow page */
_hash_pageinit(ovflpage, BufferGetPageSize(ovflbuf));
ovflopaque = (HashPageOpaque) PageGetSpecialPointer(ovflpage);
ovflopaque->hasho_prevblkno = BufferGetBlockNumber(buf);
ovflopaque->hasho_nextblkno = InvalidBlockNumber;
- ovflopaque->hasho_flag = LH_OVERFLOW_PAGE;
- ovflopaque->hasho_oaddr = oaddr;
ovflopaque->hasho_bucket = pageopaque->hasho_bucket;
- _hash_wrtnorelbuf(ovflbuf);
+ ovflopaque->hasho_flag = LH_OVERFLOW_PAGE;
+ ovflopaque->hasho_filler = HASHO_FILL;
+ _hash_wrtnorelbuf(rel, ovflbuf);
/* logically chain overflow page to previous page */
pageopaque->hasho_nextblkno = ovflblkno;
- _hash_wrtnorelbuf(buf);
+ _hash_wrtbuf(rel, buf);
+
return ovflbuf;
}
/*
- * _hash_getovfladdr()
- *
- * Find an available overflow page and return its address.
+ * _hash_getovflpage()
*
- * When we enter this function, we have a read lock on *metabufp which
- * we change to a write lock immediately. Before exiting, the write lock
- * is exchanged for a read lock.
+ * Find an available overflow page and return its block number.
*
+ * The caller must hold a pin, but no lock, on the metapage buffer.
+ * The buffer is returned in the same state.
*/
-static OverflowPageAddress
-_hash_getovfladdr(Relation rel, Buffer *metabufp)
+static BlockNumber
+_hash_getovflpage(Relation rel, Buffer metabuf)
{
HashMetaPage metap;
Buffer mapbuf = 0;
BlockNumber blkno;
- PageOffset offset;
- OverflowPageAddress oaddr;
- SplitNumber splitnum;
+ uint32 orig_firstfree;
+ uint32 splitnum;
uint32 *freep = NULL;
- uint32 max_free;
+ uint32 max_ovflpg;
uint32 bit;
uint32 first_page;
- uint32 free_bit;
- uint32 free_page;
- uint32 in_use_bits;
+ uint32 last_bit;
+ uint32 last_page;
uint32 i,
j;
- metap = (HashMetaPage) _hash_chgbufaccess(rel, metabufp, HASH_READ, HASH_WRITE);
+ /* Get exclusive lock on the meta page */
+ _hash_chgbufaccess(rel, metabuf, HASH_NOLOCK, HASH_WRITE);
- splitnum = metap->hashm_ovflpoint;
- max_free = metap->hashm_spares[splitnum];
+ metap = (HashMetaPage) BufferGetPage(metabuf);
+ _hash_checkpage(rel, (Page) metap, LH_META_PAGE);
- free_page = (max_free - 1) >> (metap->hashm_bshift + BYTE_TO_BIT);
- free_bit = (max_free - 1) & (BMPGSZ_BIT(metap) - 1);
+ /* start search at hashm_firstfree */
+ orig_firstfree = metap->hashm_firstfree;
+ first_page = orig_firstfree >> BMPG_SHIFT(metap);
+ bit = orig_firstfree & BMPG_MASK(metap);
+ i = first_page;
+ j = bit / BITS_PER_MAP;
+ bit &= ~(BITS_PER_MAP - 1);
- /* Look through all the free maps to find the first free block */
- first_page = metap->hashm_lastfreed >> (metap->hashm_bshift + BYTE_TO_BIT);
- for (i = first_page; i <= free_page; i++)
+ /* outer loop iterates once per bitmap page */
+ for (;;)
{
+ BlockNumber mapblkno;
Page mappage;
+ uint32 last_inpage;
- blkno = metap->hashm_mapp[i];
- mapbuf = _hash_getbuf(rel, blkno, HASH_WRITE);
- mappage = BufferGetPage(mapbuf);
- _hash_checkpage(mappage, LH_BITMAP_PAGE);
- freep = HashPageGetBitmap(mappage);
- Assert(freep);
+ /* want to end search with the last existing overflow page */
+ splitnum = metap->hashm_ovflpoint;
+ max_ovflpg = metap->hashm_spares[splitnum] - 1;
+ last_page = max_ovflpg >> BMPG_SHIFT(metap);
+ last_bit = max_ovflpg & BMPG_MASK(metap);
- if (i == free_page)
- in_use_bits = free_bit;
- else
- in_use_bits = BMPGSZ_BIT(metap) - 1;
+ if (i > last_page)
+ break;
- if (i == first_page)
- {
- bit = metap->hashm_lastfreed & (BMPGSZ_BIT(metap) - 1);
- j = bit / BITS_PER_MAP;
- bit = bit & ~(BITS_PER_MAP - 1);
- }
+ Assert(i < metap->hashm_nmaps);
+ mapblkno = metap->hashm_mapp[i];
+
+ if (i == last_page)
+ last_inpage = last_bit;
else
+ last_inpage = BMPGSZ_BIT(metap) - 1;
+
+ /* Release exclusive lock on metapage while reading bitmap page */
+ _hash_chgbufaccess(rel, metabuf, HASH_READ, HASH_NOLOCK);
+
+ mapbuf = _hash_getbuf(rel, mapblkno, HASH_WRITE);
+ mappage = BufferGetPage(mapbuf);
+ _hash_checkpage(rel, mappage, LH_BITMAP_PAGE);
+ freep = HashPageGetBitmap(mappage);
+
+ for (; bit <= last_inpage; j++, bit += BITS_PER_MAP)
{
- bit = 0;
- j = 0;
- }
- for (; bit <= in_use_bits; j++, bit += BITS_PER_MAP)
if (freep[j] != ALL_SET)
goto found;
+ }
+
+ /* No free space here, try to advance to next map page */
+ _hash_relbuf(rel, mapbuf);
+ i++;
+ j = 0; /* scan from start of next map page */
+ bit = 0;
+
+ /* Reacquire exclusive lock on the meta page */
+ _hash_chgbufaccess(rel, metabuf, HASH_NOLOCK, HASH_WRITE);
}
/* No Free Page Found - have to allocate a new page */
- metap->hashm_lastfreed = metap->hashm_spares[splitnum];
+ bit = metap->hashm_spares[splitnum];
metap->hashm_spares[splitnum]++;
- offset = metap->hashm_spares[splitnum] -
- (splitnum ? metap->hashm_spares[splitnum - 1] : 0);
-
- if (offset > SPLITMASK)
- {
- if (++splitnum >= NCACHED)
- ereport(ERROR,
- (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("out of overflow pages in hash index \"%s\"",
- RelationGetRelationName(rel))));
- metap->hashm_ovflpoint = splitnum;
- metap->hashm_spares[splitnum] = metap->hashm_spares[splitnum - 1];
- metap->hashm_spares[splitnum - 1]--;
- offset = 0;
- }
/* Check if we need to allocate a new bitmap page */
- if (free_bit == (uint32) (BMPGSZ_BIT(metap) - 1))
+ if (last_bit == (uint32) (BMPGSZ_BIT(metap) - 1))
{
- /* won't be needing old map page */
-
- _hash_relbuf(rel, mapbuf, HASH_WRITE);
-
- free_page++;
- if (free_page >= NCACHED)
- ereport(ERROR,
- (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("out of overflow pages in hash index \"%s\"",
- RelationGetRelationName(rel))));
-
/*
- * This is tricky. The 1 indicates that you want the new page
- * allocated with 1 clear bit. Actually, you are going to
- * allocate 2 pages from this map. The first is going to be the
- * map page, the second is the overflow page we were looking for.
- * The init_bitmap routine automatically, sets the first bit of
- * itself to indicate that the bitmap itself is in use. We would
- * explicitly set the second bit, but don't have to if we tell
- * init_bitmap not to leave it clear in the first place.
+ * We create the new bitmap page with all pages marked "in use".
+ * Actually two pages in the new bitmap's range will exist
+ * immediately: the bitmap page itself, and the following page
+ * which is the one we return to the caller. Both of these are
+ * correctly marked "in use". Subsequent pages do not exist yet,
+ * but it is convenient to pre-mark them as "in use" too.
*/
- if (_hash_initbitmap(rel, metap, OADDR_OF(splitnum, offset),
- 1, free_page))
- elog(ERROR, "_hash_initbitmap failed");
+ _hash_initbitmap(rel, metap, bitno_to_blkno(metap, bit));
+
+ bit = metap->hashm_spares[splitnum];
metap->hashm_spares[splitnum]++;
- offset++;
- if (offset > SPLITMASK)
- {
- if (++splitnum >= NCACHED)
- ereport(ERROR,
- (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("out of overflow pages in hash index \"%s\"",
- RelationGetRelationName(rel))));
- metap->hashm_ovflpoint = splitnum;
- metap->hashm_spares[splitnum] = metap->hashm_spares[splitnum - 1];
- metap->hashm_spares[splitnum - 1]--;
- offset = 0;
- }
}
else
{
/*
- * Free_bit addresses the last used bit. Bump it to address the
- * first available bit.
+ * Nothing to do here; since the page was past the last used page,
+ * we know its bitmap bit was preinitialized to "in use".
*/
- free_bit++;
- SETBIT(freep, free_bit);
- _hash_wrtbuf(rel, mapbuf);
}
/* Calculate address of the new overflow page */
- oaddr = OADDR_OF(splitnum, offset);
- _hash_chgbufaccess(rel, metabufp, HASH_WRITE, HASH_READ);
- return oaddr;
+ blkno = bitno_to_blkno(metap, bit);
+
+ /*
+ * Adjust hashm_firstfree to avoid redundant searches. But don't
+ * risk changing it if someone moved it while we were searching
+ * bitmap pages.
+ */
+ if (metap->hashm_firstfree == orig_firstfree)
+ metap->hashm_firstfree = bit + 1;
+
+ /* Write updated metapage and release lock, but not pin */
+ _hash_chgbufaccess(rel, metabuf, HASH_WRITE, HASH_NOLOCK);
+
+ return blkno;
found:
- bit = bit + _hash_firstfreebit(freep[j]);
+ /* convert bit to bit number within page */
+ bit += _hash_firstfreebit(freep[j]);
+
+ /* mark page "in use" in the bitmap */
SETBIT(freep, bit);
_hash_wrtbuf(rel, mapbuf);
+ /* Reacquire exclusive lock on the meta page */
+ _hash_chgbufaccess(rel, metabuf, HASH_NOLOCK, HASH_WRITE);
+
+ /* convert bit to absolute bit number */
+ bit += (i << BMPG_SHIFT(metap));
+
+ /* Calculate address of the new overflow page */
+ blkno = bitno_to_blkno(metap, bit);
+
/*
- * Bits are addressed starting with 0, but overflow pages are
- * addressed beginning at 1. Bit is a bit addressnumber, so we need to
- * increment it to convert it to a page number.
+ * Adjust hashm_firstfree to avoid redundant searches. But don't
+ * risk changing it if someone moved it while we were searching
+ * bitmap pages.
*/
+ if (metap->hashm_firstfree == orig_firstfree)
+ {
+ metap->hashm_firstfree = bit + 1;
- bit = 1 + bit + (i * BMPGSZ_BIT(metap));
- if (bit >= metap->hashm_lastfreed)
- metap->hashm_lastfreed = bit - 1;
-
- /* Calculate the split number for this page */
- for (i = 0; (i < splitnum) && (bit > metap->hashm_spares[i]); i++)
- ;
- offset = (i ? bit - metap->hashm_spares[i - 1] : bit);
- if (offset >= SPLITMASK)
- ereport(ERROR,
- (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("out of overflow pages in hash index \"%s\"",
- RelationGetRelationName(rel))));
+ /* Write updated metapage and release lock, but not pin */
+ _hash_chgbufaccess(rel, metabuf, HASH_WRITE, HASH_NOLOCK);
+ }
+ else
+ {
+ /* We didn't change the metapage, so no need to write */
+ _hash_chgbufaccess(rel, metabuf, HASH_READ, HASH_NOLOCK);
+ }
- /* initialize this page */
- oaddr = OADDR_OF(i, offset);
- _hash_chgbufaccess(rel, metabufp, HASH_WRITE, HASH_READ);
- return oaddr;
+ return blkno;
}
/*
* _hash_firstfreebit()
*
- * Return the first bit that is not set in the argument 'map'. This
- * function is used to find an available overflow page within a
- * splitnumber.
- *
+ * Return the number of the first bit that is not set in the word 'map'.
*/
static uint32
_hash_firstfreebit(uint32 map)
@@ -279,61 +340,64 @@ _hash_firstfreebit(uint32 map)
{
if (!(mask & map))
return i;
- mask = mask << 1;
+ mask <<= 1;
}
- return i;
+
+ elog(ERROR, "firstfreebit found no free bit");
+
+ return 0; /* keep compiler quiet */
}
/*
* _hash_freeovflpage() -
*
- * Mark this overflow page as free and return a buffer with
- * the page that follows it (which may be defined as
- * InvalidBuffer).
+ * Remove this overflow page from its bucket's chain, and mark the page as
+ * free. On entry, ovflbuf is write-locked; it is released before exiting.
+ *
+ * Returns the block number of the page that followed the given page
+ * in the bucket, or InvalidBlockNumber if no following page.
*
+ * NB: caller must not hold lock on metapage, nor on either page that's
+ * adjacent in the bucket chain. The caller had better hold exclusive lock
+ * on the bucket, too.
*/
-Buffer
+BlockNumber
_hash_freeovflpage(Relation rel, Buffer ovflbuf)
{
HashMetaPage metap;
Buffer metabuf;
Buffer mapbuf;
+ BlockNumber ovflblkno;
BlockNumber prevblkno;
BlockNumber blkno;
BlockNumber nextblkno;
HashPageOpaque ovflopaque;
Page ovflpage;
Page mappage;
- OverflowPageAddress addr;
- SplitNumber splitnum;
uint32 *freep;
- uint32 ovflpgno;
+ uint32 ovflbitno;
int32 bitmappage,
bitmapbit;
Bucket bucket;
- metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_WRITE);
- metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
-
+ /* Get information from the doomed page */
+ ovflblkno = BufferGetBlockNumber(ovflbuf);
ovflpage = BufferGetPage(ovflbuf);
- _hash_checkpage(ovflpage, LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, ovflpage, LH_OVERFLOW_PAGE);
ovflopaque = (HashPageOpaque) PageGetSpecialPointer(ovflpage);
- addr = ovflopaque->hasho_oaddr;
nextblkno = ovflopaque->hasho_nextblkno;
prevblkno = ovflopaque->hasho_prevblkno;
bucket = ovflopaque->hasho_bucket;
+
+ /* Zero the page for debugging's sake; then write and release it */
MemSet(ovflpage, 0, BufferGetPageSize(ovflbuf));
_hash_wrtbuf(rel, ovflbuf);
/*
- * fix up the bucket chain. this is a doubly-linked list, so we must
+ * Fix up the bucket chain. this is a doubly-linked list, so we must
* fix up the bucket chain members behind and ahead of the overflow
- * page being deleted.
- *
- * XXX this should look like: - lock prev/next - modify/write prev/next
- * (how to do write ordering with a doubly-linked list?) - unlock
- * prev/next
+ * page being deleted. No concurrency issues since we hold exclusive
+ * lock on the entire bucket.
*/
if (BlockNumberIsValid(prevblkno))
{
@@ -341,7 +405,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
Page prevpage = BufferGetPage(prevbuf);
HashPageOpaque prevopaque = (HashPageOpaque) PageGetSpecialPointer(prevpage);
- _hash_checkpage(prevpage, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, prevpage, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
Assert(prevopaque->hasho_bucket == bucket);
prevopaque->hasho_nextblkno = nextblkno;
_hash_wrtbuf(rel, prevbuf);
@@ -352,44 +416,55 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
Page nextpage = BufferGetPage(nextbuf);
HashPageOpaque nextopaque = (HashPageOpaque) PageGetSpecialPointer(nextpage);
- _hash_checkpage(nextpage, LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, nextpage, LH_OVERFLOW_PAGE);
Assert(nextopaque->hasho_bucket == bucket);
nextopaque->hasho_prevblkno = prevblkno;
_hash_wrtbuf(rel, nextbuf);
}
- /*
- * Fix up the overflow page bitmap that tracks this particular
- * overflow page. The bitmap can be found in the MetaPageData array
- * element hashm_mapp[bitmappage].
- */
- splitnum = (addr >> SPLITSHIFT);
- ovflpgno = (splitnum ? metap->hashm_spares[splitnum - 1] : 0) + (addr & SPLITMASK) - 1;
+ /* Read the metapage so we can determine which bitmap page to use */
+ metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_READ);
+ metap = (HashMetaPage) BufferGetPage(metabuf);
+ _hash_checkpage(rel, (Page) metap, LH_META_PAGE);
- if (ovflpgno < metap->hashm_lastfreed)
- metap->hashm_lastfreed = ovflpgno;
+ /* Identify which bit to set */
+ ovflbitno = blkno_to_bitno(metap, ovflblkno);
- bitmappage = (ovflpgno >> (metap->hashm_bshift + BYTE_TO_BIT));
- bitmapbit = ovflpgno & (BMPGSZ_BIT(metap) - 1);
+ bitmappage = ovflbitno >> BMPG_SHIFT(metap);
+ bitmapbit = ovflbitno & BMPG_MASK(metap);
+ if (bitmappage >= metap->hashm_nmaps)
+ elog(ERROR, "invalid overflow bit number %u", ovflbitno);
blkno = metap->hashm_mapp[bitmappage];
+
+ /* Release metapage lock while we access the bitmap page */
+ _hash_chgbufaccess(rel, metabuf, HASH_READ, HASH_NOLOCK);
+
+ /* Clear the bitmap bit to indicate that this overflow page is free */
mapbuf = _hash_getbuf(rel, blkno, HASH_WRITE);
mappage = BufferGetPage(mapbuf);
- _hash_checkpage(mappage, LH_BITMAP_PAGE);
+ _hash_checkpage(rel, mappage, LH_BITMAP_PAGE);
freep = HashPageGetBitmap(mappage);
+ Assert(ISSET(freep, bitmapbit));
CLRBIT(freep, bitmapbit);
_hash_wrtbuf(rel, mapbuf);
- _hash_relbuf(rel, metabuf, HASH_WRITE);
+ /* Get write-lock on metapage to update firstfree */
+ _hash_chgbufaccess(rel, metabuf, HASH_NOLOCK, HASH_WRITE);
- /*
- * now instantiate the page that replaced this one, if it exists, and
- * return that buffer with a write lock.
- */
- if (BlockNumberIsValid(nextblkno))
- return _hash_getbuf(rel, nextblkno, HASH_WRITE);
+ /* if this is now the first free page, update hashm_firstfree */
+ if (ovflbitno < metap->hashm_firstfree)
+ {
+ metap->hashm_firstfree = ovflbitno;
+ _hash_wrtbuf(rel, metabuf);
+ }
else
- return InvalidBuffer;
+ {
+ /* no need to change metapage */
+ _hash_relbuf(rel, metabuf);
+ }
+
+ return nextblkno;
}
@@ -397,65 +472,58 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
* _hash_initbitmap()
*
* Initialize a new bitmap page. The metapage has a write-lock upon
- * entering the function.
+ * entering the function, and must be written by caller after return.
+ *
+ * 'blkno' is the block number of the new bitmap page.
*
- * 'pnum' is the OverflowPageAddress of the new bitmap page.
- * 'nbits' is how many bits to clear (i.e., make available) in the new
- * bitmap page. the remainder of the bits (as well as the first bit,
- * representing the bitmap page itself) will be set.
- * 'ndx' is the 0-based offset of the new bitmap page within the
- * metapage's array of bitmap page OverflowPageAddresses.
+ * All bits in the new bitmap page are set to "1", indicating "in use".
*/
-
-#define INT_MASK ((1 << INT_TO_BIT) -1)
-
-int32
-_hash_initbitmap(Relation rel,
- HashMetaPage metap,
- int32 pnum,
- int32 nbits,
- int32 ndx)
+void
+_hash_initbitmap(Relation rel, HashMetaPage metap, BlockNumber blkno)
{
Buffer buf;
- BlockNumber blkno;
Page pg;
HashPageOpaque op;
uint32 *freep;
- int clearbytes,
- clearints;
- blkno = OADDR_TO_BLKNO(pnum);
+ /*
+ * It is okay to write-lock the new bitmap page while holding metapage
+ * write lock, because no one else could be contending for the new page.
+ *
+ * There is some loss of concurrency in possibly doing I/O for the new
+ * page while holding the metapage lock, but this path is taken so
+ * seldom that it's not worth worrying about.
+ */
buf = _hash_getbuf(rel, blkno, HASH_WRITE);
pg = BufferGetPage(buf);
+
+ /* initialize the page */
_hash_pageinit(pg, BufferGetPageSize(buf));
op = (HashPageOpaque) PageGetSpecialPointer(pg);
- op->hasho_oaddr = InvalidOvflAddress;
op->hasho_prevblkno = InvalidBlockNumber;
op->hasho_nextblkno = InvalidBlockNumber;
- op->hasho_flag = LH_BITMAP_PAGE;
op->hasho_bucket = -1;
+ op->hasho_flag = LH_BITMAP_PAGE;
+ op->hasho_filler = HASHO_FILL;
+ /* set all of the bits to 1 */
freep = HashPageGetBitmap(pg);
+ MemSet((char *) freep, 0xFF, BMPGSZ_BYTE(metap));
- /* set all of the bits above 'nbits' to 1 */
- clearints = ((nbits - 1) >> INT_TO_BIT) + 1;
- clearbytes = clearints << INT_TO_BYTE;
- MemSet((char *) freep, 0, clearbytes);
- MemSet(((char *) freep) + clearbytes, 0xFF,
- BMPGSZ_BYTE(metap) - clearbytes);
- freep[clearints - 1] = ALL_SET << (nbits & INT_MASK);
-
- /* bit 0 represents the new bitmap page */
- SETBIT(freep, 0);
+ /* write out the new bitmap page (releasing write lock and pin) */
+ _hash_wrtbuf(rel, buf);
+ /* add the new bitmap page to the metapage's list of bitmaps */
/* metapage already has a write lock */
- metap->hashm_nmaps++;
- metap->hashm_mapp[ndx] = blkno;
+ if (metap->hashm_nmaps >= HASH_MAX_BITMAPS)
+ ereport(ERROR,
+ (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
+ errmsg("out of overflow pages in hash index \"%s\"",
+ RelationGetRelationName(rel))));
- /* write out the new bitmap page (releasing its locks) */
- _hash_wrtbuf(rel, buf);
+ metap->hashm_mapp[metap->hashm_nmaps] = blkno;
- return 0;
+ metap->hashm_nmaps++;
}
@@ -470,11 +538,20 @@ _hash_initbitmap(Relation rel,
* first page in the bucket chain. The read page works backward and
* the write page works forward; the procedure terminates when the
* read page and write page are the same page.
+ *
+ * At completion of this procedure, it is guaranteed that all pages in
+ * the bucket are nonempty, unless the bucket is totally empty (in
+ * which case all overflow pages will be freed). The original implementation
+ * required that to be true on entry as well, but it's a lot easier for
+ * callers to leave empty overflow pages and let this guy clean it up.
+ *
+ * Caller must hold exclusive lock on the target bucket. This allows
+ * us to safely lock multiple pages in the bucket.
*/
void
_hash_squeezebucket(Relation rel,
- HashMetaPage metap,
- Bucket bucket)
+ Bucket bucket,
+ BlockNumber bucket_blkno)
{
Buffer wbuf;
Buffer rbuf = 0;
@@ -492,10 +569,10 @@ _hash_squeezebucket(Relation rel,
/*
* start squeezing into the base bucket page.
*/
- wblkno = BUCKET_TO_BLKNO(bucket);
+ wblkno = bucket_blkno;
wbuf = _hash_getbuf(rel, wblkno, HASH_WRITE);
wpage = BufferGetPage(wbuf);
- _hash_checkpage(wpage, LH_BUCKET_PAGE);
+ _hash_checkpage(rel, wpage, LH_BUCKET_PAGE);
wopaque = (HashPageOpaque) PageGetSpecialPointer(wpage);
/*
@@ -503,29 +580,23 @@ _hash_squeezebucket(Relation rel,
*/
if (!BlockNumberIsValid(wopaque->hasho_nextblkno))
{
- _hash_relbuf(rel, wbuf, HASH_WRITE);
+ _hash_relbuf(rel, wbuf);
return;
}
/*
* find the last page in the bucket chain by starting at the base
* bucket page and working forward.
- *
- * XXX if chains tend to be long, we should probably move forward using
- * HASH_READ and then _hash_chgbufaccess to HASH_WRITE when we reach
- * the end. if they are short we probably don't care very much. if
- * the hash function is working at all, they had better be short..
*/
ropaque = wopaque;
do
{
rblkno = ropaque->hasho_nextblkno;
if (ropaque != wopaque)
- _hash_relbuf(rel, rbuf, HASH_WRITE);
+ _hash_relbuf(rel, rbuf);
rbuf = _hash_getbuf(rel, rblkno, HASH_WRITE);
rpage = BufferGetPage(rbuf);
- _hash_checkpage(rpage, LH_OVERFLOW_PAGE);
- Assert(!PageIsEmpty(rpage));
+ _hash_checkpage(rel, rpage, LH_OVERFLOW_PAGE);
ropaque = (HashPageOpaque) PageGetSpecialPointer(rpage);
Assert(ropaque->hasho_bucket == bucket);
} while (BlockNumberIsValid(ropaque->hasho_nextblkno));
@@ -536,87 +607,97 @@ _hash_squeezebucket(Relation rel,
roffnum = FirstOffsetNumber;
for (;;)
{
- hitem = (HashItem) PageGetItem(rpage, PageGetItemId(rpage, roffnum));
- itemsz = IndexTupleDSize(hitem->hash_itup)
- + (sizeof(HashItemData) - sizeof(IndexTupleData));
- itemsz = MAXALIGN(itemsz);
-
- /*
- * walk up the bucket chain, looking for a page big enough for
- * this item.
- */
- while (PageGetFreeSpace(wpage) < itemsz)
+ /* this test is needed in case page is empty on entry */
+ if (roffnum <= PageGetMaxOffsetNumber(rpage))
{
- wblkno = wopaque->hasho_nextblkno;
-
- _hash_wrtbuf(rel, wbuf);
+ hitem = (HashItem) PageGetItem(rpage,
+ PageGetItemId(rpage, roffnum));
+ itemsz = IndexTupleDSize(hitem->hash_itup)
+ + (sizeof(HashItemData) - sizeof(IndexTupleData));
+ itemsz = MAXALIGN(itemsz);
- if (!BlockNumberIsValid(wblkno) || (rblkno == wblkno))
+ /*
+ * Walk up the bucket chain, looking for a page big enough for
+ * this item. Exit if we reach the read page.
+ */
+ while (PageGetFreeSpace(wpage) < itemsz)
{
- _hash_wrtbuf(rel, rbuf);
- /* wbuf is already released */
- return;
- }
+ Assert(!PageIsEmpty(wpage));
- wbuf = _hash_getbuf(rel, wblkno, HASH_WRITE);
- wpage = BufferGetPage(wbuf);
- _hash_checkpage(wpage, LH_OVERFLOW_PAGE);
- Assert(!PageIsEmpty(wpage));
- wopaque = (HashPageOpaque) PageGetSpecialPointer(wpage);
- Assert(wopaque->hasho_bucket == bucket);
- }
+ wblkno = wopaque->hasho_nextblkno;
+ Assert(BlockNumberIsValid(wblkno));
- /*
- * if we're here, we have found room so insert on the "write"
- * page.
- */
- woffnum = OffsetNumberNext(PageGetMaxOffsetNumber(wpage));
- if (PageAddItem(wpage, (Item) hitem, itemsz, woffnum, LP_USED)
- == InvalidOffsetNumber)
- elog(ERROR, "failed to add index item to \"%s\"",
- RelationGetRelationName(rel));
+ _hash_wrtbuf(rel, wbuf);
- /*
- * delete the tuple from the "read" page. PageIndexTupleDelete
- * repacks the ItemId array, so 'roffnum' will be "advanced" to
- * the "next" ItemId.
- */
- PageIndexTupleDelete(rpage, roffnum);
- _hash_wrtnorelbuf(rbuf);
+ if (rblkno == wblkno)
+ {
+ /* wbuf is already released */
+ _hash_wrtbuf(rel, rbuf);
+ return;
+ }
+
+ wbuf = _hash_getbuf(rel, wblkno, HASH_WRITE);
+ wpage = BufferGetPage(wbuf);
+ _hash_checkpage(rel, wpage, LH_OVERFLOW_PAGE);
+ wopaque = (HashPageOpaque) PageGetSpecialPointer(wpage);
+ Assert(wopaque->hasho_bucket == bucket);
+ }
+
+ /*
+ * we have found room so insert on the "write" page.
+ */
+ woffnum = OffsetNumberNext(PageGetMaxOffsetNumber(wpage));
+ if (PageAddItem(wpage, (Item) hitem, itemsz, woffnum, LP_USED)
+ == InvalidOffsetNumber)
+ elog(ERROR, "failed to add index item to \"%s\"",
+ RelationGetRelationName(rel));
+
+ /*
+ * delete the tuple from the "read" page. PageIndexTupleDelete
+ * repacks the ItemId array, so 'roffnum' will be "advanced" to
+ * the "next" ItemId.
+ */
+ PageIndexTupleDelete(rpage, roffnum);
+ }
/*
- * if the "read" page is now empty because of the deletion, free
- * it.
+ * if the "read" page is now empty because of the deletion (or
+ * because it was empty when we got to it), free it.
+ *
+ * Tricky point here: if our read and write pages are adjacent in the
+ * bucket chain, our write lock on wbuf will conflict with
+ * _hash_freeovflpage's attempt to update the sibling links of the
+ * removed page. However, in that case we are done anyway, so we can
+ * simply drop the write lock before calling _hash_freeovflpage.
*/
- if (PageIsEmpty(rpage) && (ropaque->hasho_flag & LH_OVERFLOW_PAGE))
+ if (PageIsEmpty(rpage))
{
rblkno = ropaque->hasho_prevblkno;
Assert(BlockNumberIsValid(rblkno));
- /*
- * free this overflow page. the extra _hash_relbuf is because
- * _hash_freeovflpage gratuitously returns the next page (we
- * want the previous page and will get it ourselves later).
- */
- rbuf = _hash_freeovflpage(rel, rbuf);
- if (BufferIsValid(rbuf))
- _hash_relbuf(rel, rbuf, HASH_WRITE);
-
+ /* are we freeing the page adjacent to wbuf? */
if (rblkno == wblkno)
{
- /* rbuf is already released */
+ /* yes, so release wbuf lock first */
_hash_wrtbuf(rel, wbuf);
+ /* free this overflow page (releases rbuf) */
+ _hash_freeovflpage(rel, rbuf);
+ /* done */
return;
}
+ /* free this overflow page, then get the previous one */
+ _hash_freeovflpage(rel, rbuf);
+
rbuf = _hash_getbuf(rel, rblkno, HASH_WRITE);
rpage = BufferGetPage(rbuf);
- _hash_checkpage(rpage, LH_OVERFLOW_PAGE);
- Assert(!PageIsEmpty(rpage));
+ _hash_checkpage(rel, rpage, LH_OVERFLOW_PAGE);
ropaque = (HashPageOpaque) PageGetSpecialPointer(rpage);
Assert(ropaque->hasho_bucket == bucket);
roffnum = FirstOffsetNumber;
}
}
+
+ /* NOTREACHED */
}
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index b6ea8cf31a2..c5b94929808 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -8,179 +8,100 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.38 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.38.2.1 2003/09/07 04:36:47 momjian Exp $
*
* NOTES
* Postgres hash pages look like ordinary relation pages. The opaque
* data at high addresses includes information about the page including
- * whether a page is an overflow page or a true bucket, the block
- * numbers of the preceding and following pages, and the overflow
- * address of the page if it is an overflow page.
+ * whether a page is an overflow page or a true bucket, the bucket
+ * number, and the block numbers of the preceding and following pages
+ * in the same bucket.
*
* The first page in a hash relation, page zero, is special -- it stores
* information describing the hash table; it is referred to as the
* "meta page." Pages one and higher store the actual data.
*
+ * There are also bitmap pages, which are not manipulated here;
+ * see hashovfl.c.
+ *
*-------------------------------------------------------------------------
*/
-
#include "postgres.h"
#include "access/genam.h"
#include "access/hash.h"
-#include "miscadmin.h"
#include "storage/lmgr.h"
+#include "utils/lsyscache.h"
+
+static void _hash_splitbucket(Relation rel, Buffer metabuf,
+ Bucket obucket, Bucket nbucket,
+ BlockNumber start_oblkno,
+ BlockNumber start_nblkno,
+ uint32 maxbucket,
+ uint32 highmask, uint32 lowmask);
-static void _hash_setpagelock(Relation rel, BlockNumber blkno, int access);
-static void _hash_unsetpagelock(Relation rel, BlockNumber blkno, int access);
-static void _hash_splitpage(Relation rel, Buffer metabuf, Bucket obucket, Bucket nbucket);
/*
- * We use high-concurrency locking on hash indices. There are two cases in
- * which we don't do locking. One is when we're building the index.
- * Since the creating transaction has not committed, no one can see
- * the index, and there's no reason to share locks. The second case
- * is when we're just starting up the database system. We use some
- * special-purpose initialization code in the relation cache manager
- * (see utils/cache/relcache.c) to allow us to do indexed scans on
- * the system catalogs before we'd normally be able to. This happens
- * before the lock table is fully initialized, so we can't use it.
- * Strictly speaking, this violates 2pl, but we don't do 2pl on the
- * system catalogs anyway.
- *
- * Note that our page locks are actual lockmanager locks, not buffer
- * locks (as are used by btree, for example). This is a good idea because
- * the algorithms are not deadlock-free, and we'd better be able to detect
- * and recover from deadlocks.
- *
- * Another important difference from btree is that a hash indexscan
- * retains both a lock and a buffer pin on the current index page
- * between hashgettuple() calls (btree keeps only a buffer pin).
- * Because of this, it's safe to do item deletions with only a regular
- * write lock on a hash page --- there cannot be an indexscan stopped on
- * the page being deleted, other than an indexscan of our own backend,
- * which will be taken care of by _hash_adjscans.
+ * We use high-concurrency locking on hash indexes (see README for an overview
+ * of the locking rules). There are two cases in which we don't do locking.
+ * One is when the index is newly created in the current transaction. Since
+ * the creating transaction has not committed, no one else can see the index,
+ * and there's no reason to take locks. The second case is for temp
+ * relations, which no one else can see either. (We still take buffer-level
+ * locks, but not lmgr locks.)
*/
-
-
-#define USELOCKING (!BuildingHash && !IsInitProcessingMode())
+#define USELOCKING(rel) (!((rel)->rd_isnew || (rel)->rd_istemp))
/*
- * _hash_metapinit() -- Initialize the metadata page of a hash index,
- * the two buckets that we begin with and the initial
- * bitmap page.
+ * _hash_getlock() -- Acquire an lmgr lock.
+ *
+ * 'whichlock' should be zero to acquire the split-control lock, or the
+ * block number of a bucket's primary bucket page to acquire the per-bucket
+ * lock. (See README for details of the use of these locks.)
+ *
+ * 'access' must be HASH_SHARE or HASH_EXCLUSIVE.
*/
void
-_hash_metapinit(Relation rel)
+_hash_getlock(Relation rel, BlockNumber whichlock, int access)
{
- HashMetaPage metap;
- HashPageOpaque pageopaque;
- Buffer metabuf;
- Buffer buf;
- Page pg;
- int nbuckets;
- uint32 nelem; /* number elements */
- uint32 lg2nelem; /* _hash_log2(nelem) */
- uint16 i;
-
- /* can't be sharing this with anyone, now... */
- if (USELOCKING)
- LockRelation(rel, AccessExclusiveLock);
-
- if (RelationGetNumberOfBlocks(rel) != 0)
- elog(ERROR, "cannot initialize non-empty hash index \"%s\"",
- RelationGetRelationName(rel));
-
- metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_WRITE);
- pg = BufferGetPage(metabuf);
- metap = (HashMetaPage) pg;
- _hash_pageinit(pg, BufferGetPageSize(metabuf));
-
- metap->hashm_magic = HASH_MAGIC;
- metap->hashm_version = HASH_VERSION;
- metap->hashm_nkeys = 0;
- metap->hashm_nmaps = 0;
- metap->hashm_ffactor = DEFAULT_FFACTOR;
- metap->hashm_bsize = BufferGetPageSize(metabuf);
- metap->hashm_bshift = _hash_log2(metap->hashm_bsize);
- for (i = metap->hashm_bshift; i > 0; --i)
- {
- if ((1 << i) < (metap->hashm_bsize -
- (MAXALIGN(sizeof(PageHeaderData)) +
- MAXALIGN(sizeof(HashPageOpaqueData)))))
- break;
- }
- Assert(i);
- metap->hashm_bmsize = 1 << i;
- metap->hashm_procid = index_getprocid(rel, 1, HASHPROC);
-
- /*
- * Make nelem = 2 rather than 0 so that we end up allocating space for
- * the next greater power of two number of buckets.
- */
- nelem = 2;
- lg2nelem = 1; /* _hash_log2(MAX(nelem, 2)) */
- nbuckets = 2; /* 1 << lg2nelem */
-
- MemSet((char *) metap->hashm_spares, 0, sizeof(metap->hashm_spares));
- MemSet((char *) metap->hashm_mapp, 0, sizeof(metap->hashm_mapp));
-
- metap->hashm_spares[lg2nelem] = 2; /* lg2nelem + 1 */
- metap->hashm_spares[lg2nelem + 1] = 2; /* lg2nelem + 1 */
- metap->hashm_ovflpoint = 1; /* lg2nelem */
- metap->hashm_lastfreed = 2;
-
- metap->hashm_maxbucket = metap->hashm_lowmask = 1; /* nbuckets - 1 */
- metap->hashm_highmask = 3; /* (nbuckets << 1) - 1 */
-
- pageopaque = (HashPageOpaque) PageGetSpecialPointer(pg);
- pageopaque->hasho_oaddr = InvalidOvflAddress;
- pageopaque->hasho_prevblkno = InvalidBlockNumber;
- pageopaque->hasho_nextblkno = InvalidBlockNumber;
- pageopaque->hasho_flag = LH_META_PAGE;
- pageopaque->hasho_bucket = -1;
-
- /*
- * First bitmap page is at: splitpoint lg2nelem page offset 1 which
- * turns out to be page 3. Couldn't initialize page 3 until we
- * created the first two buckets above.
- */
- if (_hash_initbitmap(rel, metap, OADDR_OF(lg2nelem, 1), lg2nelem + 1, 0))
- elog(ERROR, "_hash_initbitmap failed");
-
- /* all done */
- _hash_wrtnorelbuf(metabuf);
-
- /*
- * initialize the first two buckets
- */
- for (i = 0; i <= 1; i++)
- {
- buf = _hash_getbuf(rel, BUCKET_TO_BLKNO(i), HASH_WRITE);
- pg = BufferGetPage(buf);
- _hash_pageinit(pg, BufferGetPageSize(buf));
- pageopaque = (HashPageOpaque) PageGetSpecialPointer(pg);
- pageopaque->hasho_oaddr = InvalidOvflAddress;
- pageopaque->hasho_prevblkno = InvalidBlockNumber;
- pageopaque->hasho_nextblkno = InvalidBlockNumber;
- pageopaque->hasho_flag = LH_BUCKET_PAGE;
- pageopaque->hasho_bucket = i;
- _hash_wrtbuf(rel, buf);
- }
+ if (USELOCKING(rel))
+ LockPage(rel, whichlock, access);
+}
- _hash_relbuf(rel, metabuf, HASH_WRITE);
+/*
+ * _hash_try_getlock() -- Acquire an lmgr lock, but only if it's free.
+ *
+ * Same as above except we return FALSE without blocking if lock isn't free.
+ */
+bool
+_hash_try_getlock(Relation rel, BlockNumber whichlock, int access)
+{
+ if (USELOCKING(rel))
+ return ConditionalLockPage(rel, whichlock, access);
+ else
+ return true;
+}
- if (USELOCKING)
- UnlockRelation(rel, AccessExclusiveLock);
+/*
+ * _hash_droplock() -- Release an lmgr lock.
+ */
+void
+_hash_droplock(Relation rel, BlockNumber whichlock, int access)
+{
+ if (USELOCKING(rel))
+ UnlockPage(rel, whichlock, access);
}
/*
* _hash_getbuf() -- Get a buffer by block number for read or write.
*
+ * 'access' must be HASH_READ, HASH_WRITE, or HASH_NOLOCK.
+ *
* When this routine returns, the appropriate lock is set on the
- * requested buffer its reference count is correct.
+ * requested buffer and its reference count has been incremented
+ * (ie, the buffer is "locked and pinned").
*
* XXX P_NEW is not used because, unlike the tree structures, we
* need the bucket blocks to be at certain block numbers. we must
@@ -194,61 +115,59 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
if (blkno == P_NEW)
elog(ERROR, "hash AM does not use P_NEW");
- switch (access)
- {
- case HASH_WRITE:
- case HASH_READ:
- _hash_setpagelock(rel, blkno, access);
- break;
- default:
- elog(ERROR, "unrecognized hash access code: %d", access);
- break;
- }
+
buf = ReadBuffer(rel, blkno);
+ if (access != HASH_NOLOCK)
+ LockBuffer(buf, access);
+
/* ref count and lock type are correct */
return buf;
}
/*
* _hash_relbuf() -- release a locked buffer.
+ *
+ * Lock and pin (refcount) are both dropped. Note that either read or
+ * write lock can be dropped this way, but if we modified the buffer,
+ * this is NOT the right way to release a write lock.
*/
void
-_hash_relbuf(Relation rel, Buffer buf, int access)
+_hash_relbuf(Relation rel, Buffer buf)
{
- BlockNumber blkno;
-
- blkno = BufferGetBlockNumber(buf);
-
- switch (access)
- {
- case HASH_WRITE:
- case HASH_READ:
- _hash_unsetpagelock(rel, blkno, access);
- break;
- default:
- elog(ERROR, "unrecognized hash access code: %d", access);
- break;
- }
+ LockBuffer(buf, BUFFER_LOCK_UNLOCK);
+ ReleaseBuffer(buf);
+}
+/*
+ * _hash_dropbuf() -- release an unlocked buffer.
+ *
+ * This is used to unpin a buffer on which we hold no lock. It is assumed
+ * that the buffer is not dirty.
+ */
+void
+_hash_dropbuf(Relation rel, Buffer buf)
+{
ReleaseBuffer(buf);
}
/*
* _hash_wrtbuf() -- write a hash page to disk.
*
- * This routine releases the lock held on the buffer and our reference
- * to it. It is an error to call _hash_wrtbuf() without a write lock
- * or a reference to the buffer.
+ * This routine releases the lock held on the buffer and our refcount
+ * for it. It is an error to call _hash_wrtbuf() without a write lock
+ * and a pin on the buffer.
+ *
+ * NOTE: actually, the buffer manager just marks the shared buffer page
+ * dirty here; the real I/O happens later. This is okay since we are not
+ * relying on write ordering anyway. The WAL mechanism is responsible for
+ * guaranteeing correctness after a crash.
*/
void
_hash_wrtbuf(Relation rel, Buffer buf)
{
- BlockNumber blkno;
-
- blkno = BufferGetBlockNumber(buf);
+ LockBuffer(buf, BUFFER_LOCK_UNLOCK);
WriteBuffer(buf);
- _hash_unsetpagelock(rel, blkno, HASH_WRITE);
}
/*
@@ -256,147 +175,181 @@ _hash_wrtbuf(Relation rel, Buffer buf)
* our reference or lock.
*
* It is an error to call _hash_wrtnorelbuf() without a write lock
- * or a reference to the buffer.
+ * and a pin on the buffer.
+ *
+ * See above NOTE.
*/
void
-_hash_wrtnorelbuf(Buffer buf)
+_hash_wrtnorelbuf(Relation rel, Buffer buf)
{
- BlockNumber blkno;
-
- blkno = BufferGetBlockNumber(buf);
WriteNoReleaseBuffer(buf);
}
-Page
+/*
+ * _hash_chgbufaccess() -- Change the lock type on a buffer, without
+ * dropping our pin on it.
+ *
+ * from_access and to_access may be HASH_READ, HASH_WRITE, or HASH_NOLOCK,
+ * the last indicating that no buffer-level lock is held or wanted.
+ *
+ * When from_access == HASH_WRITE, we assume the buffer is dirty and tell
+ * bufmgr it must be written out. If the caller wants to release a write
+ * lock on a page that's not been modified, it's okay to pass from_access
+ * as HASH_READ (a bit ugly, but handy in some places).
+ */
+void
_hash_chgbufaccess(Relation rel,
- Buffer *bufp,
+ Buffer buf,
int from_access,
int to_access)
{
- BlockNumber blkno;
+ if (from_access != HASH_NOLOCK)
+ LockBuffer(buf, BUFFER_LOCK_UNLOCK);
+ if (from_access == HASH_WRITE)
+ WriteNoReleaseBuffer(buf);
- blkno = BufferGetBlockNumber(*bufp);
-
- switch (from_access)
- {
- case HASH_WRITE:
- _hash_wrtbuf(rel, *bufp);
- break;
- case HASH_READ:
- _hash_relbuf(rel, *bufp, from_access);
- break;
- default:
- elog(ERROR, "unrecognized hash access code: %d", from_access);
- break;
- }
- *bufp = _hash_getbuf(rel, blkno, to_access);
- return BufferGetPage(*bufp);
+ if (to_access != HASH_NOLOCK)
+ LockBuffer(buf, to_access);
}
+
/*
- * _hash_pageinit() -- Initialize a new page.
+ * _hash_metapinit() -- Initialize the metadata page of a hash index,
+ * the two buckets that we begin with and the initial
+ * bitmap page.
+ *
+ * We are fairly cavalier about locking here, since we know that no one else
+ * could be accessing this index. In particular the rule about not holding
+ * multiple buffer locks is ignored.
*/
void
-_hash_pageinit(Page page, Size size)
+_hash_metapinit(Relation rel)
{
- Assert(PageIsNew(page));
- PageInit(page, size, sizeof(HashPageOpaqueData));
-}
+ HashMetaPage metap;
+ HashPageOpaque pageopaque;
+ Buffer metabuf;
+ Buffer buf;
+ Page pg;
+ int32 data_width;
+ int32 item_width;
+ int32 ffactor;
+ uint16 i;
-static void
-_hash_setpagelock(Relation rel,
- BlockNumber blkno,
- int access)
-{
+ /* safety check */
+ if (RelationGetNumberOfBlocks(rel) != 0)
+ elog(ERROR, "cannot initialize non-empty hash index \"%s\"",
+ RelationGetRelationName(rel));
- if (USELOCKING)
- {
- switch (access)
- {
- case HASH_WRITE:
- LockPage(rel, blkno, ExclusiveLock);
- break;
- case HASH_READ:
- LockPage(rel, blkno, ShareLock);
- break;
- default:
- elog(ERROR, "unrecognized hash access code: %d", access);
- break;
- }
- }
-}
+ /*
+ * Determine the target fill factor (tuples per bucket) for this index.
+ * The idea is to make the fill factor correspond to pages about 3/4ths
+ * full. We can compute it exactly if the index datatype is fixed-width,
+ * but for var-width there's some guessing involved.
+ */
+ data_width = get_typavgwidth(RelationGetDescr(rel)->attrs[0]->atttypid,
+ RelationGetDescr(rel)->attrs[0]->atttypmod);
+ item_width = MAXALIGN(sizeof(HashItemData)) + MAXALIGN(data_width) +
+ sizeof(ItemIdData); /* include the line pointer */
+ ffactor = (BLCKSZ * 3 / 4) / item_width;
+ /* keep to a sane range */
+ if (ffactor < 10)
+ ffactor = 10;
-static void
-_hash_unsetpagelock(Relation rel,
- BlockNumber blkno,
- int access)
-{
+ metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_WRITE);
+ pg = BufferGetPage(metabuf);
+ _hash_pageinit(pg, BufferGetPageSize(metabuf));
+
+ pageopaque = (HashPageOpaque) PageGetSpecialPointer(pg);
+ pageopaque->hasho_prevblkno = InvalidBlockNumber;
+ pageopaque->hasho_nextblkno = InvalidBlockNumber;
+ pageopaque->hasho_bucket = -1;
+ pageopaque->hasho_flag = LH_META_PAGE;
+ pageopaque->hasho_filler = HASHO_FILL;
+
+ metap = (HashMetaPage) pg;
- if (USELOCKING)
+ metap->hashm_magic = HASH_MAGIC;
+ metap->hashm_version = HASH_VERSION;
+ metap->hashm_ntuples = 0;
+ metap->hashm_nmaps = 0;
+ metap->hashm_ffactor = ffactor;
+ metap->hashm_bsize = BufferGetPageSize(metabuf);
+ /* find largest bitmap array size that will fit in page size */
+ for (i = _hash_log2(metap->hashm_bsize); i > 0; --i)
{
- switch (access)
- {
- case HASH_WRITE:
- UnlockPage(rel, blkno, ExclusiveLock);
- break;
- case HASH_READ:
- UnlockPage(rel, blkno, ShareLock);
- break;
- default:
- elog(ERROR, "unrecognized hash access code: %d", access);
- break;
- }
+ if ((1 << i) <= (metap->hashm_bsize -
+ (MAXALIGN(sizeof(PageHeaderData)) +
+ MAXALIGN(sizeof(HashPageOpaqueData)))))
+ break;
}
-}
+ Assert(i > 0);
+ metap->hashm_bmsize = 1 << i;
+ metap->hashm_bmshift = i + BYTE_TO_BIT;
+ Assert((1 << BMPG_SHIFT(metap)) == (BMPG_MASK(metap) + 1));
-/*
- * Delete a hash index item.
- *
- * It is safe to delete an item after acquiring a regular WRITE lock on
- * the page, because no other backend can hold a READ lock on the page,
- * and that means no other backend currently has an indexscan stopped on
- * any item of the item being deleted. Our own backend might have such
- * an indexscan (in fact *will*, since that's how VACUUM found the item
- * in the first place), but _hash_adjscans will fix the scan position.
- */
-void
-_hash_pagedel(Relation rel, ItemPointer tid)
-{
- Buffer buf;
- Buffer metabuf;
- Page page;
- BlockNumber blkno;
- OffsetNumber offno;
- HashMetaPage metap;
- HashPageOpaque opaque;
+ metap->hashm_procid = index_getprocid(rel, 1, HASHPROC);
- blkno = ItemPointerGetBlockNumber(tid);
- offno = ItemPointerGetOffsetNumber(tid);
+ /*
+ * We initialize the index with two buckets, 0 and 1, occupying physical
+ * blocks 1 and 2. The first freespace bitmap page is in block 3.
+ */
+ metap->hashm_maxbucket = metap->hashm_lowmask = 1; /* nbuckets - 1 */
+ metap->hashm_highmask = 3; /* (nbuckets << 1) - 1 */
- buf = _hash_getbuf(rel, blkno, HASH_WRITE);
- page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
- opaque = (HashPageOpaque) PageGetSpecialPointer(page);
+ MemSet((char *) metap->hashm_spares, 0, sizeof(metap->hashm_spares));
+ MemSet((char *) metap->hashm_mapp, 0, sizeof(metap->hashm_mapp));
- PageIndexTupleDelete(page, offno);
- _hash_wrtnorelbuf(buf);
+ metap->hashm_spares[1] = 1; /* the first bitmap page is only spare */
+ metap->hashm_ovflpoint = 1;
+ metap->hashm_firstfree = 0;
- if (PageIsEmpty(page) && (opaque->hasho_flag & LH_OVERFLOW_PAGE))
+ /*
+ * Initialize the first two buckets
+ */
+ for (i = 0; i <= 1; i++)
{
- buf = _hash_freeovflpage(rel, buf);
- if (BufferIsValid(buf))
- _hash_relbuf(rel, buf, HASH_WRITE);
+ buf = _hash_getbuf(rel, BUCKET_TO_BLKNO(metap, i), HASH_WRITE);
+ pg = BufferGetPage(buf);
+ _hash_pageinit(pg, BufferGetPageSize(buf));
+ pageopaque = (HashPageOpaque) PageGetSpecialPointer(pg);
+ pageopaque->hasho_prevblkno = InvalidBlockNumber;
+ pageopaque->hasho_nextblkno = InvalidBlockNumber;
+ pageopaque->hasho_bucket = i;
+ pageopaque->hasho_flag = LH_BUCKET_PAGE;
+ pageopaque->hasho_filler = HASHO_FILL;
+ _hash_wrtbuf(rel, buf);
}
- else
- _hash_relbuf(rel, buf, HASH_WRITE);
- metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_WRITE);
- metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
- metap->hashm_nkeys--;
+ /*
+ * Initialize first bitmap page. Can't do this until we
+ * create the first two buckets, else smgr will complain.
+ */
+ _hash_initbitmap(rel, metap, 3);
+
+ /* all done */
_hash_wrtbuf(rel, metabuf);
}
+/*
+ * _hash_pageinit() -- Initialize a new hash index page.
+ */
+void
+_hash_pageinit(Page page, Size size)
+{
+ Assert(PageIsNew(page));
+ PageInit(page, size, sizeof(HashPageOpaqueData));
+}
+
+/*
+ * Attempt to expand the hash table by creating one new bucket.
+ *
+ * This will silently do nothing if it cannot get the needed locks.
+ *
+ * The caller should hold no locks on the hash index.
+ *
+ * The caller must hold a pin, but no lock, on the metapage buffer.
+ * The buffer is returned in the same state.
+ */
void
_hash_expandtable(Relation rel, Buffer metabuf)
{
@@ -404,62 +357,172 @@ _hash_expandtable(Relation rel, Buffer metabuf)
Bucket old_bucket;
Bucket new_bucket;
uint32 spare_ndx;
+ BlockNumber start_oblkno;
+ BlockNumber start_nblkno;
+ uint32 maxbucket;
+ uint32 highmask;
+ uint32 lowmask;
+
+ /*
+ * Obtain the page-zero lock to assert the right to begin a split
+ * (see README).
+ *
+ * Note: deadlock should be impossible here. Our own backend could only
+ * be holding bucket sharelocks due to stopped indexscans; those will not
+ * block other holders of the page-zero lock, who are only interested in
+ * acquiring bucket sharelocks themselves. Exclusive bucket locks are
+ * only taken here and in hashbulkdelete, and neither of these operations
+ * needs any additional locks to complete. (If, due to some flaw in this
+ * reasoning, we manage to deadlock anyway, it's okay to error out; the
+ * index will be left in a consistent state.)
+ */
+ _hash_getlock(rel, 0, HASH_EXCLUSIVE);
+
+ /* Write-lock the meta page */
+ _hash_chgbufaccess(rel, metabuf, HASH_NOLOCK, HASH_WRITE);
metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
+ _hash_checkpage(rel, (Page) metap, LH_META_PAGE);
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf, HASH_READ, HASH_WRITE);
- new_bucket = ++metap->hashm_maxbucket;
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf, HASH_WRITE, HASH_READ);
- old_bucket = (metap->hashm_maxbucket & metap->hashm_lowmask);
+ /*
+ * Check to see if split is still needed; someone else might have already
+ * done one while we waited for the lock.
+ *
+ * Make sure this stays in sync with_hash_doinsert()
+ */
+ if (metap->hashm_ntuples <=
+ (double) metap->hashm_ffactor * (metap->hashm_maxbucket + 1))
+ goto fail;
/*
- * If the split point is increasing (hashm_maxbucket's log base 2 *
- * increases), we need to copy the current contents of the spare split
- * bucket to the next bucket.
+ * Determine which bucket is to be split, and attempt to lock the old
+ * bucket. If we can't get the lock, give up.
+ *
+ * The lock protects us against other backends, but not against our own
+ * backend. Must check for active scans separately.
+ *
+ * Ideally we would lock the new bucket too before proceeding, but if
+ * we are about to cross a splitpoint then the BUCKET_TO_BLKNO mapping
+ * isn't correct yet. For simplicity we update the metapage first and
+ * then lock. This should be okay because no one else should be trying
+ * to lock the new bucket yet...
*/
- spare_ndx = _hash_log2(metap->hashm_maxbucket + 1);
- if (spare_ndx > metap->hashm_ovflpoint)
- {
+ new_bucket = metap->hashm_maxbucket + 1;
+ old_bucket = (new_bucket & metap->hashm_lowmask);
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf, HASH_READ, HASH_WRITE);
- metap->hashm_spares[spare_ndx] = metap->hashm_spares[metap->hashm_ovflpoint];
- metap->hashm_ovflpoint = spare_ndx;
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf, HASH_WRITE, HASH_READ);
- }
+ start_oblkno = BUCKET_TO_BLKNO(metap, old_bucket);
+
+ if (_hash_has_active_scan(rel, old_bucket))
+ goto fail;
+
+ if (!_hash_try_getlock(rel, start_oblkno, HASH_EXCLUSIVE))
+ goto fail;
+
+ /*
+ * Okay to proceed with split. Update the metapage bucket mapping info.
+ */
+ metap->hashm_maxbucket = new_bucket;
if (new_bucket > metap->hashm_highmask)
{
-
/* Starting a new doubling */
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf, HASH_READ, HASH_WRITE);
metap->hashm_lowmask = metap->hashm_highmask;
metap->hashm_highmask = new_bucket | metap->hashm_lowmask;
- metap = (HashMetaPage) _hash_chgbufaccess(rel, &metabuf, HASH_WRITE, HASH_READ);
+ }
+ /*
+ * If the split point is increasing (hashm_maxbucket's log base 2
+ * increases), we need to adjust the hashm_spares[] array and
+ * hashm_ovflpoint so that future overflow pages will be created beyond
+ * this new batch of bucket pages.
+ *
+ * XXX should initialize new bucket pages to prevent out-of-order
+ * page creation? Don't wanna do it right here though.
+ */
+ spare_ndx = _hash_log2(metap->hashm_maxbucket + 1);
+ if (spare_ndx > metap->hashm_ovflpoint)
+ {
+ Assert(spare_ndx == metap->hashm_ovflpoint + 1);
+ metap->hashm_spares[spare_ndx] = metap->hashm_spares[metap->hashm_ovflpoint];
+ metap->hashm_ovflpoint = spare_ndx;
}
+
+ /* now we can compute the new bucket's primary block number */
+ start_nblkno = BUCKET_TO_BLKNO(metap, new_bucket);
+
+ Assert(!_hash_has_active_scan(rel, new_bucket));
+
+ if (!_hash_try_getlock(rel, start_nblkno, HASH_EXCLUSIVE))
+ elog(PANIC, "could not get lock on supposedly new bucket");
+
+ /*
+ * Copy bucket mapping info now; this saves re-accessing the meta page
+ * inside _hash_splitbucket's inner loop. Note that once we drop the
+ * split lock, other splits could begin, so these values might be out of
+ * date before _hash_splitbucket finishes. That's okay, since all it
+ * needs is to tell which of these two buckets to map hashkeys into.
+ */
+ maxbucket = metap->hashm_maxbucket;
+ highmask = metap->hashm_highmask;
+ lowmask = metap->hashm_lowmask;
+
+ /* Write out the metapage and drop lock, but keep pin */
+ _hash_chgbufaccess(rel, metabuf, HASH_WRITE, HASH_NOLOCK);
+
+ /* Release split lock; okay for other splits to occur now */
+ _hash_droplock(rel, 0, HASH_EXCLUSIVE);
+
/* Relocate records to the new bucket */
- _hash_splitpage(rel, metabuf, old_bucket, new_bucket);
+ _hash_splitbucket(rel, metabuf, old_bucket, new_bucket,
+ start_oblkno, start_nblkno,
+ maxbucket, highmask, lowmask);
+
+ /* Release bucket locks, allowing others to access them */
+ _hash_droplock(rel, start_oblkno, HASH_EXCLUSIVE);
+ _hash_droplock(rel, start_nblkno, HASH_EXCLUSIVE);
+
+ return;
+
+ /* Here if decide not to split or fail to acquire old bucket lock */
+fail:
+
+ /* We didn't write the metapage, so just drop lock */
+ _hash_chgbufaccess(rel, metabuf, HASH_READ, HASH_NOLOCK);
+
+ /* Release split lock */
+ _hash_droplock(rel, 0, HASH_EXCLUSIVE);
}
/*
- * _hash_splitpage -- split 'obucket' into 'obucket' and 'nbucket'
+ * _hash_splitbucket -- split 'obucket' into 'obucket' and 'nbucket'
+ *
+ * We are splitting a bucket that consists of a base bucket page and zero
+ * or more overflow (bucket chain) pages. We must relocate tuples that
+ * belong in the new bucket, and compress out any free space in the old
+ * bucket.
*
- * this routine is actually misnamed -- we are splitting a bucket that
- * consists of a base bucket page and zero or more overflow (bucket
- * chain) pages.
+ * The caller must hold exclusive locks on both buckets to ensure that
+ * no one else is trying to access them (see README).
+ *
+ * The caller must hold a pin, but no lock, on the metapage buffer.
+ * The buffer is returned in the same state. (The metapage is only
+ * touched if it becomes necessary to add or remove overflow pages.)
*/
static void
-_hash_splitpage(Relation rel,
- Buffer metabuf,
- Bucket obucket,
- Bucket nbucket)
+_hash_splitbucket(Relation rel,
+ Buffer metabuf,
+ Bucket obucket,
+ Bucket nbucket,
+ BlockNumber start_oblkno,
+ BlockNumber start_nblkno,
+ uint32 maxbucket,
+ uint32 highmask,
+ uint32 lowmask)
{
Bucket bucket;
Buffer obuf;
Buffer nbuf;
- Buffer ovflbuf;
BlockNumber oblkno;
BlockNumber nblkno;
bool null;
@@ -467,7 +530,6 @@ _hash_splitpage(Relation rel,
HashItem hitem;
HashPageOpaque oopaque;
HashPageOpaque nopaque;
- HashMetaPage metap;
IndexTuple itup;
Size itemsz;
OffsetNumber ooffnum;
@@ -475,65 +537,36 @@ _hash_splitpage(Relation rel,
OffsetNumber omaxoffnum;
Page opage;
Page npage;
- TupleDesc itupdesc;
+ TupleDesc itupdesc = RelationGetDescr(rel);
- metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
-
- /* get the buffers & pages */
- oblkno = BUCKET_TO_BLKNO(obucket);
- nblkno = BUCKET_TO_BLKNO(nbucket);
+ /*
+ * It should be okay to simultaneously write-lock pages from each
+ * bucket, since no one else can be trying to acquire buffer lock
+ * on pages of either bucket.
+ */
+ oblkno = start_oblkno;
+ nblkno = start_nblkno;
obuf = _hash_getbuf(rel, oblkno, HASH_WRITE);
nbuf = _hash_getbuf(rel, nblkno, HASH_WRITE);
opage = BufferGetPage(obuf);
npage = BufferGetPage(nbuf);
- /* initialize the new bucket */
+ _hash_checkpage(rel, opage, LH_BUCKET_PAGE);
+ oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
+
+ /* initialize the new bucket's primary page */
_hash_pageinit(npage, BufferGetPageSize(nbuf));
nopaque = (HashPageOpaque) PageGetSpecialPointer(npage);
nopaque->hasho_prevblkno = InvalidBlockNumber;
nopaque->hasho_nextblkno = InvalidBlockNumber;
- nopaque->hasho_flag = LH_BUCKET_PAGE;
- nopaque->hasho_oaddr = InvalidOvflAddress;
nopaque->hasho_bucket = nbucket;
- _hash_wrtnorelbuf(nbuf);
-
- /*
- * make sure the old bucket isn't empty. advance 'opage' and friends
- * through the overflow bucket chain until we find a non-empty page.
- *
- * XXX we should only need this once, if we are careful to preserve the
- * invariant that overflow pages are never empty.
- */
- _hash_checkpage(opage, LH_BUCKET_PAGE);
- oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
- if (PageIsEmpty(opage))
- {
- oblkno = oopaque->hasho_nextblkno;
- _hash_relbuf(rel, obuf, HASH_WRITE);
- if (!BlockNumberIsValid(oblkno))
- {
- /*
- * the old bucket is completely empty; of course, the new
- * bucket will be as well, but since it's a base bucket page
- * we don't care.
- */
- _hash_relbuf(rel, nbuf, HASH_WRITE);
- return;
- }
- obuf = _hash_getbuf(rel, oblkno, HASH_WRITE);
- opage = BufferGetPage(obuf);
- _hash_checkpage(opage, LH_OVERFLOW_PAGE);
- if (PageIsEmpty(opage))
- elog(ERROR, "empty hash overflow page %u", oblkno);
- oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
- }
+ nopaque->hasho_flag = LH_BUCKET_PAGE;
+ nopaque->hasho_filler = HASHO_FILL;
/*
- * we are now guaranteed that 'opage' is not empty. partition the
- * tuples in the old bucket between the old bucket and the new bucket,
- * advancing along their respective overflow bucket chains and adding
- * overflow pages as needed.
+ * Partition the tuples in the old bucket between the old bucket and the
+ * new bucket, advancing along the old bucket's overflow bucket chain
+ * and adding overflow pages to the new bucket as needed.
*/
ooffnum = FirstOffsetNumber;
omaxoffnum = PageGetMaxOffsetNumber(opage);
@@ -547,47 +580,39 @@ _hash_splitpage(Relation rel,
/* check if we're at the end of the page */
if (ooffnum > omaxoffnum)
{
- /* at end of page, but check for overflow page */
+ /* at end of page, but check for an(other) overflow page */
oblkno = oopaque->hasho_nextblkno;
- if (BlockNumberIsValid(oblkno))
- {
- /*
- * we ran out of tuples on this particular page, but we
- * have more overflow pages; re-init values.
- */
- _hash_wrtbuf(rel, obuf);
- obuf = _hash_getbuf(rel, oblkno, HASH_WRITE);
- opage = BufferGetPage(obuf);
- _hash_checkpage(opage, LH_OVERFLOW_PAGE);
- oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
- /* we're guaranteed that an ovfl page has at least 1 tuple */
- if (PageIsEmpty(opage))
- elog(ERROR, "empty hash overflow page %u", oblkno);
- ooffnum = FirstOffsetNumber;
- omaxoffnum = PageGetMaxOffsetNumber(opage);
- }
- else
- {
- /*
- * we're at the end of the bucket chain, so now we're
- * really done with everything. before quitting, call
- * _hash_squeezebucket to ensure the tuples in the bucket
- * (including the overflow pages) are packed as tightly as
- * possible.
- */
- _hash_wrtbuf(rel, obuf);
- _hash_wrtbuf(rel, nbuf);
- _hash_squeezebucket(rel, metap, obucket);
- return;
- }
+ if (!BlockNumberIsValid(oblkno))
+ break;
+ /*
+ * we ran out of tuples on this particular page, but we
+ * have more overflow pages; advance to next page.
+ */
+ _hash_wrtbuf(rel, obuf);
+
+ obuf = _hash_getbuf(rel, oblkno, HASH_WRITE);
+ opage = BufferGetPage(obuf);
+ _hash_checkpage(rel, opage, LH_OVERFLOW_PAGE);
+ oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
+ ooffnum = FirstOffsetNumber;
+ omaxoffnum = PageGetMaxOffsetNumber(opage);
+ continue;
}
- /* hash on the tuple */
+ /*
+ * Re-hash the tuple to determine which bucket it now belongs in.
+ *
+ * It is annoying to call the hash function while holding locks,
+ * but releasing and relocking the page for each tuple is unappealing
+ * too.
+ */
hitem = (HashItem) PageGetItem(opage, PageGetItemId(opage, ooffnum));
itup = &(hitem->hash_itup);
- itupdesc = RelationGetDescr(rel);
datum = index_getattr(itup, 1, itupdesc, &null);
- bucket = _hash_call(rel, metap, datum);
+ Assert(!null);
+
+ bucket = _hash_hashkey2bucket(_hash_datum2hashkey(rel, datum),
+ maxbucket, highmask, lowmask);
if (bucket == nbucket)
{
@@ -603,11 +628,13 @@ _hash_splitpage(Relation rel,
if (PageGetFreeSpace(npage) < itemsz)
{
- ovflbuf = _hash_addovflpage(rel, &metabuf, nbuf);
- _hash_wrtbuf(rel, nbuf);
- nbuf = ovflbuf;
+ /* write out nbuf and drop lock, but keep pin */
+ _hash_chgbufaccess(rel, nbuf, HASH_WRITE, HASH_NOLOCK);
+ /* chain to a new overflow page */
+ nbuf = _hash_addovflpage(rel, metabuf, nbuf);
npage = BufferGetPage(nbuf);
- _hash_checkpage(npage, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, npage, LH_OVERFLOW_PAGE);
+ /* we don't need nopaque within the loop */
}
noffnum = OffsetNumberNext(PageGetMaxOffsetNumber(npage));
@@ -615,7 +642,6 @@ _hash_splitpage(Relation rel,
== InvalidOffsetNumber)
elog(ERROR, "failed to add index item to \"%s\"",
RelationGetRelationName(rel));
- _hash_wrtnorelbuf(nbuf);
/*
* now delete the tuple from the old bucket. after this
@@ -627,40 +653,7 @@ _hash_splitpage(Relation rel,
* instead of calling PageGetMaxOffsetNumber.
*/
PageIndexTupleDelete(opage, ooffnum);
- _hash_wrtnorelbuf(obuf);
omaxoffnum = OffsetNumberPrev(omaxoffnum);
-
- /*
- * tidy up. if the old page was an overflow page and it is
- * now empty, we must free it (we want to preserve the
- * invariant that overflow pages cannot be empty).
- */
- if (PageIsEmpty(opage) &&
- (oopaque->hasho_flag & LH_OVERFLOW_PAGE))
- {
- obuf = _hash_freeovflpage(rel, obuf);
-
- /* check that we're not through the bucket chain */
- if (BufferIsInvalid(obuf))
- {
- _hash_wrtbuf(rel, nbuf);
- _hash_squeezebucket(rel, metap, obucket);
- return;
- }
-
- /*
- * re-init. again, we're guaranteed that an ovfl page has
- * at least one tuple.
- */
- opage = BufferGetPage(obuf);
- _hash_checkpage(opage, LH_OVERFLOW_PAGE);
- oblkno = BufferGetBlockNumber(obuf);
- oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
- if (PageIsEmpty(opage))
- elog(ERROR, "empty hash overflow page %u", oblkno);
- ooffnum = FirstOffsetNumber;
- omaxoffnum = PageGetMaxOffsetNumber(opage);
- }
}
else
{
@@ -668,12 +661,20 @@ _hash_splitpage(Relation rel,
* the tuple stays on this page. we didn't move anything, so
* we didn't delete anything and therefore we don't have to
* change 'omaxoffnum'.
- *
- * XXX any hash value from [0, nbucket-1] will map to this
- * bucket, which doesn't make sense to me.
*/
+ Assert(bucket == obucket);
ooffnum = OffsetNumberNext(ooffnum);
}
}
- /* NOTREACHED */
+
+ /*
+ * We're at the end of the old bucket chain, so we're done partitioning
+ * the tuples. Before quitting, call _hash_squeezebucket to ensure the
+ * tuples remaining in the old bucket (including the overflow pages) are
+ * packed as tightly as possible. The new bucket is already tight.
+ */
+ _hash_wrtbuf(rel, obuf);
+ _hash_wrtbuf(rel, nbuf);
+
+ _hash_squeezebucket(rel, obucket, start_oblkno);
}
diff --git a/src/backend/access/hash/hashscan.c b/src/backend/access/hash/hashscan.c
index a0b124cbee4..98c7f1134db 100644
--- a/src/backend/access/hash/hashscan.c
+++ b/src/backend/access/hash/hashscan.c
@@ -8,22 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.30 2003/08/04 02:39:57 momjian Exp $
- *
- * NOTES
- * Because we can be doing an index scan on a relation while we
- * update it, we need to avoid missing data that moves around in
- * the index. The routines and global variables in this file
- * guarantee that all scans in the local address space stay
- * correctly positioned. This is all we need to worry about, since
- * write locking guarantees that no one else will be on the same
- * page at the same time as we are.
- *
- * The scheme is to manage a list of active scans in the current
- * backend. Whenever we add or remove records from an index, we
- * check the list of active scans to see if any has been affected.
- * A scan is affected only if it is on the same relation, and the
- * same page, as the update.
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.30.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,10 +29,6 @@ typedef HashScanListData *HashScanList;
static HashScanList HashScans = (HashScanList) NULL;
-static void _hash_scandel(IndexScanDesc scan,
- BlockNumber blkno, OffsetNumber offno);
-
-
/*
* AtEOXact_hash() --- clean up hash subsystem at xact abort or commit.
*
@@ -67,9 +48,6 @@ AtEOXact_hash(void)
* at end of transaction anyway.
*/
HashScans = NULL;
-
- /* If we were building a hash, we ain't anymore. */
- BuildingHash = false;
}
/*
@@ -112,70 +90,26 @@ _hash_dropscan(IndexScanDesc scan)
pfree(chk);
}
-void
-_hash_adjscans(Relation rel, ItemPointer tid)
+/*
+ * Is there an active scan in this bucket?
+ */
+bool
+_hash_has_active_scan(Relation rel, Bucket bucket)
{
+ Oid relid = RelationGetRelid(rel);
HashScanList l;
- Oid relid;
- relid = RelationGetRelid(rel);
- for (l = HashScans; l != (HashScanList) NULL; l = l->hashsl_next)
+ for (l = HashScans; l != NULL; l = l->hashsl_next)
{
if (relid == l->hashsl_scan->indexRelation->rd_id)
- _hash_scandel(l->hashsl_scan, ItemPointerGetBlockNumber(tid),
- ItemPointerGetOffsetNumber(tid));
- }
-}
+ {
+ HashScanOpaque so = (HashScanOpaque) l->hashsl_scan->opaque;
-static void
-_hash_scandel(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno)
-{
- ItemPointer current;
- ItemPointer mark;
- Buffer buf;
- Buffer metabuf;
- HashScanOpaque so;
-
- so = (HashScanOpaque) scan->opaque;
- current = &(scan->currentItemData);
- mark = &(scan->currentMarkData);
-
- if (ItemPointerIsValid(current)
- && ItemPointerGetBlockNumber(current) == blkno
- && ItemPointerGetOffsetNumber(current) >= offno)
- {
- metabuf = _hash_getbuf(scan->indexRelation, HASH_METAPAGE, HASH_READ);
- buf = so->hashso_curbuf;
- _hash_step(scan, &buf, BackwardScanDirection, metabuf);
+ if (so->hashso_bucket_valid &&
+ so->hashso_bucket == bucket)
+ return true;
+ }
}
- if (ItemPointerIsValid(mark)
- && ItemPointerGetBlockNumber(mark) == blkno
- && ItemPointerGetOffsetNumber(mark) >= offno)
- {
- /*
- * The idea here is to exchange the current and mark positions,
- * then step backwards (affecting current), then exchange again.
- */
- ItemPointerData tmpitem;
- Buffer tmpbuf;
-
- tmpitem = *mark;
- *mark = *current;
- *current = tmpitem;
- tmpbuf = so->hashso_mrkbuf;
- so->hashso_mrkbuf = so->hashso_curbuf;
- so->hashso_curbuf = tmpbuf;
-
- metabuf = _hash_getbuf(scan->indexRelation, HASH_METAPAGE, HASH_READ);
- buf = so->hashso_curbuf;
- _hash_step(scan, &buf, BackwardScanDirection, metabuf);
-
- tmpitem = *mark;
- *mark = *current;
- *current = tmpitem;
- tmpbuf = so->hashso_mrkbuf;
- so->hashso_mrkbuf = so->hashso_curbuf;
- so->hashso_curbuf = tmpbuf;
- }
+ return false;
}
diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c
index 53796c7e765..f156dec40d9 100644
--- a/src/backend/access/hash/hashsearch.c
+++ b/src/backend/access/hash/hashsearch.c
@@ -8,49 +8,17 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.31 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.31.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-
#include "postgres.h"
#include "access/hash.h"
+#include "storage/lmgr.h"
/*
- * _hash_search() -- Finds the page/bucket that the contains the
- * scankey and loads it into *bufP. the buffer has a read lock.
- */
-void
-_hash_search(Relation rel,
- int keysz,
- ScanKey scankey,
- Buffer *bufP,
- HashMetaPage metap)
-{
- BlockNumber blkno;
- Datum keyDatum;
- Bucket bucket;
-
- if (scankey == (ScanKey) NULL ||
- (keyDatum = scankey[0].sk_argument) == (Datum) NULL)
- {
- /*
- * If the scankey argument is NULL, all tuples will satisfy the
- * scan so we start the scan at the first bucket (bucket 0).
- */
- bucket = 0;
- }
- else
- bucket = _hash_call(rel, metap, keyDatum);
-
- blkno = BUCKET_TO_BLKNO(bucket);
-
- *bufP = _hash_getbuf(rel, blkno, HASH_READ);
-}
-
-/*
* _hash_next() -- Get the next item in a scan.
*
* On entry, we have a valid currentItemData in the scan, and a
@@ -62,38 +30,30 @@ _hash_search(Relation rel,
bool
_hash_next(IndexScanDesc scan, ScanDirection dir)
{
- Relation rel;
+ Relation rel = scan->indexRelation;
+ HashScanOpaque so = (HashScanOpaque) scan->opaque;
Buffer buf;
- Buffer metabuf;
Page page;
OffsetNumber offnum;
ItemPointer current;
HashItem hitem;
IndexTuple itup;
- HashScanOpaque so;
-
- rel = scan->indexRelation;
- so = (HashScanOpaque) scan->opaque;
- /* we still have the buffer pinned and locked */
+ /* we still have the buffer pinned and read-locked */
buf = so->hashso_curbuf;
Assert(BufferIsValid(buf));
- metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_READ);
-
/*
- * step to next valid tuple. note that _hash_step releases our lock
- * on 'metabuf'; if we switch to a new 'buf' while looking for the
- * next tuple, we come back with a lock on that buffer.
+ * step to next valid tuple.
*/
- if (!_hash_step(scan, &buf, dir, metabuf))
+ if (!_hash_step(scan, &buf, dir))
return false;
/* if we're here, _hash_step found a valid tuple */
current = &(scan->currentItemData);
offnum = ItemPointerGetOffsetNumber(current);
page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
hitem = (HashItem) PageGetItem(page, PageGetItemId(page, offnum));
itup = &hitem->hash_itup;
scan->xs_ctup.t_self = itup->t_tid;
@@ -101,6 +61,9 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
return true;
}
+/*
+ * Advance to next page in a bucket, if any.
+ */
static void
_hash_readnext(Relation rel,
Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
@@ -108,18 +71,20 @@ _hash_readnext(Relation rel,
BlockNumber blkno;
blkno = (*opaquep)->hasho_nextblkno;
- _hash_relbuf(rel, *bufp, HASH_READ);
+ _hash_relbuf(rel, *bufp);
*bufp = InvalidBuffer;
if (BlockNumberIsValid(blkno))
{
*bufp = _hash_getbuf(rel, blkno, HASH_READ);
*pagep = BufferGetPage(*bufp);
- _hash_checkpage(*pagep, LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, *pagep, LH_OVERFLOW_PAGE);
*opaquep = (HashPageOpaque) PageGetSpecialPointer(*pagep);
- Assert(!PageIsEmpty(*pagep));
}
}
+/*
+ * Advance to previous page in a bucket, if any.
+ */
static void
_hash_readprev(Relation rel,
Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
@@ -127,36 +92,34 @@ _hash_readprev(Relation rel,
BlockNumber blkno;
blkno = (*opaquep)->hasho_prevblkno;
- _hash_relbuf(rel, *bufp, HASH_READ);
+ _hash_relbuf(rel, *bufp);
*bufp = InvalidBuffer;
if (BlockNumberIsValid(blkno))
{
*bufp = _hash_getbuf(rel, blkno, HASH_READ);
*pagep = BufferGetPage(*bufp);
- _hash_checkpage(*pagep, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, *pagep, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
*opaquep = (HashPageOpaque) PageGetSpecialPointer(*pagep);
- if (PageIsEmpty(*pagep))
- {
- Assert((*opaquep)->hasho_flag & LH_BUCKET_PAGE);
- _hash_relbuf(rel, *bufp, HASH_READ);
- *bufp = InvalidBuffer;
- }
}
}
/*
* _hash_first() -- Find the first item in a scan.
*
- * Find the first item in the tree that
+ * Find the first item in the index that
* satisfies the qualification associated with the scan descriptor. On
- * exit, the page containing the current index tuple is read locked
+ * success, the page containing the current index tuple is read locked
* and pinned, and the scan's opaque data entry is updated to
* include the buffer.
*/
bool
_hash_first(IndexScanDesc scan, ScanDirection dir)
{
- Relation rel;
+ Relation rel = scan->indexRelation;
+ HashScanOpaque so = (HashScanOpaque) scan->opaque;
+ uint32 hashkey;
+ Bucket bucket;
+ BlockNumber blkno;
Buffer buf;
Buffer metabuf;
Page page;
@@ -166,73 +129,92 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
IndexTuple itup;
ItemPointer current;
OffsetNumber offnum;
- HashScanOpaque so;
- rel = scan->indexRelation;
- so = (HashScanOpaque) scan->opaque;
current = &(scan->currentItemData);
+ ItemPointerSetInvalid(current);
+ /*
+ * We do not support hash scans with no index qualification, because
+ * we would have to read the whole index rather than just one bucket.
+ * That creates a whole raft of problems, since we haven't got a
+ * practical way to lock all the buckets against splits or compactions.
+ */
+ if (scan->numberOfKeys < 1)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("hash indexes do not support whole-index scans")));
+
+ /*
+ * If the constant in the index qual is NULL, assume it cannot match
+ * any items in the index.
+ */
+ if (scan->keyData[0].sk_flags & SK_ISNULL)
+ return false;
+
+ /*
+ * Okay to compute the hash key. We want to do this before acquiring
+ * any locks, in case a user-defined hash function happens to be slow.
+ */
+ hashkey = _hash_datum2hashkey(rel, scan->keyData[0].sk_argument);
+
+ /*
+ * Acquire shared split lock so we can compute the target bucket
+ * safely (see README).
+ */
+ _hash_getlock(rel, 0, HASH_SHARE);
+
+ /* Read the metapage */
metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_READ);
metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
+ _hash_checkpage(rel, (Page) metap, LH_META_PAGE);
/*
- * XXX -- The attribute number stored in the scan key is the attno in
- * the heap relation. We need to transmogrify this into the index
- * relation attno here. For the moment, we have hardwired attno == 1.
+ * Compute the target bucket number, and convert to block number.
*/
+ bucket = _hash_hashkey2bucket(hashkey,
+ metap->hashm_maxbucket,
+ metap->hashm_highmask,
+ metap->hashm_lowmask);
- /* find the correct bucket page and load it into buf */
- _hash_search(rel, 1, scan->keyData, &buf, metap);
- page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE);
- opaque = (HashPageOpaque) PageGetSpecialPointer(page);
+ blkno = BUCKET_TO_BLKNO(metap, bucket);
+
+ /* done with the metapage */
+ _hash_relbuf(rel, metabuf);
/*
- * if we are scanning forward, we need to find the first non-empty
- * page (if any) in the bucket chain. since overflow pages are never
- * empty, this had better be either the bucket page or the first
- * overflow page.
- *
- * if we are scanning backward, we always go all the way to the end of
- * the bucket chain.
+ * Acquire share lock on target bucket; then we can release split lock.
*/
- if (PageIsEmpty(page))
- {
- if (BlockNumberIsValid(opaque->hasho_nextblkno))
- _hash_readnext(rel, &buf, &page, &opaque);
- else
- {
- ItemPointerSetInvalid(current);
- so->hashso_curbuf = InvalidBuffer;
-
- /*
- * If there is no scankeys, all tuples will satisfy the scan -
- * so we continue in _hash_step to get tuples from all
- * buckets. - vadim 04/29/97
- */
- if (scan->numberOfKeys >= 1)
- {
- _hash_relbuf(rel, buf, HASH_READ);
- _hash_relbuf(rel, metabuf, HASH_READ);
- return false;
- }
- }
- }
+ _hash_getlock(rel, blkno, HASH_SHARE);
+
+ _hash_droplock(rel, 0, HASH_SHARE);
+
+ /* Update scan opaque state to show we have lock on the bucket */
+ so->hashso_bucket = bucket;
+ so->hashso_bucket_valid = true;
+ so->hashso_bucket_blkno = blkno;
+
+ /* Fetch the primary bucket page for the bucket */
+ buf = _hash_getbuf(rel, blkno, HASH_READ);
+ page = BufferGetPage(buf);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE);
+ opaque = (HashPageOpaque) PageGetSpecialPointer(page);
+ Assert(opaque->hasho_bucket == bucket);
+
+ /* If a backwards scan is requested, move to the end of the chain */
if (ScanDirectionIsBackward(dir))
{
while (BlockNumberIsValid(opaque->hasho_nextblkno))
_hash_readnext(rel, &buf, &page, &opaque);
}
- if (!_hash_step(scan, &buf, dir, metabuf))
+ /* Now find the first tuple satisfying the qualification */
+ if (!_hash_step(scan, &buf, dir))
return false;
/* if we're here, _hash_step found a valid tuple */
- current = &(scan->currentItemData);
offnum = ItemPointerGetOffsetNumber(current);
page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
hitem = (HashItem) PageGetItem(page, PageGetItemId(page, offnum));
itup = &hitem->hash_itup;
scan->xs_ctup.t_self = itup->t_tid;
@@ -247,19 +229,16 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
* false. Else, return true and set the CurrentItemData for the
* scan to the right thing.
*
- * 'bufP' points to the buffer which contains the current page
- * that we'll step through.
- *
- * 'metabuf' is released when this returns.
+ * 'bufP' points to the current buffer, which is pinned and read-locked.
+ * On success exit, we have pin and read-lock on whichever page
+ * contains the right item; on failure, we have released all buffers.
*/
bool
-_hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
+_hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
{
- Relation rel;
+ Relation rel = scan->indexRelation;
+ HashScanOpaque so = (HashScanOpaque) scan->opaque;
ItemPointer current;
- HashScanOpaque so;
- int allbuckets;
- HashMetaPage metap;
Buffer buf;
Page page;
HashPageOpaque opaque;
@@ -270,18 +249,13 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
HashItem hitem;
IndexTuple itup;
- rel = scan->indexRelation;
current = &(scan->currentItemData);
- so = (HashScanOpaque) scan->opaque;
- allbuckets = (scan->numberOfKeys < 1);
-
- metap = (HashMetaPage) BufferGetPage(metabuf);
- _hash_checkpage((Page) metap, LH_META_PAGE);
buf = *bufP;
page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
+ _hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
opaque = (HashPageOpaque) PageGetSpecialPointer(page);
+ bucket = opaque->hasho_bucket;
/*
* If _hash_step is called from _hash_first, current will not be
@@ -302,107 +276,63 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
*/
do
{
- bucket = opaque->hasho_bucket;
-
switch (dir)
{
case ForwardScanDirection:
if (offnum != InvalidOffsetNumber)
- {
offnum = OffsetNumberNext(offnum); /* move forward */
- }
else
- {
offnum = FirstOffsetNumber; /* new page */
- }
+
while (offnum > maxoff)
{
-
- /*--------
+ /*
* either this page is empty
* (maxoff == InvalidOffsetNumber)
* or we ran off the end.
- *--------
*/
_hash_readnext(rel, &buf, &page, &opaque);
- if (BufferIsInvalid(buf))
- { /* end of chain */
- if (allbuckets && bucket < metap->hashm_maxbucket)
- {
- ++bucket;
- blkno = BUCKET_TO_BLKNO(bucket);
- buf = _hash_getbuf(rel, blkno, HASH_READ);
- page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE);
- opaque = (HashPageOpaque) PageGetSpecialPointer(page);
- Assert(opaque->hasho_bucket == bucket);
- while (PageIsEmpty(page) &&
- BlockNumberIsValid(opaque->hasho_nextblkno))
- _hash_readnext(rel, &buf, &page, &opaque);
- maxoff = PageGetMaxOffsetNumber(page);
- offnum = FirstOffsetNumber;
- }
- else
- {
- maxoff = offnum = InvalidOffsetNumber;
- break; /* while */
- }
- }
- else
+ if (BufferIsValid(buf))
{
- /* _hash_readnext never returns an empty page */
maxoff = PageGetMaxOffsetNumber(page);
offnum = FirstOffsetNumber;
}
+ else
+ {
+ /* end of bucket */
+ maxoff = offnum = InvalidOffsetNumber;
+ break; /* exit while */
+ }
}
break;
+
case BackwardScanDirection:
if (offnum != InvalidOffsetNumber)
- {
offnum = OffsetNumberPrev(offnum); /* move back */
- }
else
- {
offnum = maxoff; /* new page */
- }
+
while (offnum < FirstOffsetNumber)
{
-
- /*---------
+ /*
* either this page is empty
* (offnum == InvalidOffsetNumber)
* or we ran off the end.
- *---------
*/
_hash_readprev(rel, &buf, &page, &opaque);
- if (BufferIsInvalid(buf))
- { /* end of chain */
- if (allbuckets && bucket > 0)
- {
- --bucket;
- blkno = BUCKET_TO_BLKNO(bucket);
- buf = _hash_getbuf(rel, blkno, HASH_READ);
- page = BufferGetPage(buf);
- _hash_checkpage(page, LH_BUCKET_PAGE);
- opaque = (HashPageOpaque) PageGetSpecialPointer(page);
- Assert(opaque->hasho_bucket == bucket);
- while (BlockNumberIsValid(opaque->hasho_nextblkno))
- _hash_readnext(rel, &buf, &page, &opaque);
- maxoff = offnum = PageGetMaxOffsetNumber(page);
- }
- else
- {
- maxoff = offnum = InvalidOffsetNumber;
- break; /* while */
- }
+ if (BufferIsValid(buf))
+ {
+ maxoff = offnum = PageGetMaxOffsetNumber(page);
}
else
{
- /* _hash_readprev never returns an empty page */
- maxoff = offnum = PageGetMaxOffsetNumber(page);
+ /* end of bucket */
+ maxoff = offnum = InvalidOffsetNumber;
+ break; /* exit while */
}
}
break;
+
default:
/* NoMovementScanDirection */
/* this should not be reached */
@@ -412,7 +342,6 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
/* we ran off the end of the world without finding a match */
if (offnum == InvalidOffsetNumber)
{
- _hash_relbuf(rel, metabuf, HASH_READ);
*bufP = so->hashso_curbuf = InvalidBuffer;
ItemPointerSetInvalid(current);
return false;
@@ -424,7 +353,6 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
} while (!_hash_checkqual(scan, itup));
/* if we made it to here, we've found a valid tuple */
- _hash_relbuf(rel, metabuf, HASH_READ);
blkno = BufferGetBlockNumber(buf);
*bufP = so->hashso_curbuf = buf;
ItemPointerSet(current, blkno, offnum);
diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c
index 83126fccb42..f3ac58085bc 100644
--- a/src/backend/access/hash/hashutil.c
+++ b/src/backend/access/hash/hashutil.c
@@ -8,11 +8,10 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.33 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.33.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-
#include "postgres.h"
#include "access/genam.h"
@@ -20,55 +19,19 @@
#include "access/iqual.h"
-ScanKey
-_hash_mkscankey(Relation rel, IndexTuple itup)
-{
- ScanKey skey;
- TupleDesc itupdesc;
- int natts;
- AttrNumber i;
- Datum arg;
- FmgrInfo *procinfo;
- bool isnull;
-
- natts = rel->rd_rel->relnatts;
- itupdesc = RelationGetDescr(rel);
-
- skey = (ScanKey) palloc(natts * sizeof(ScanKeyData));
-
- for (i = 0; i < natts; i++)
- {
- arg = index_getattr(itup, i + 1, itupdesc, &isnull);
- procinfo = index_getprocinfo(rel, i + 1, HASHPROC);
- ScanKeyEntryInitializeWithInfo(&skey[i],
- 0x0,
- (AttrNumber) (i + 1),
- procinfo,
- CurrentMemoryContext,
- arg);
- }
-
- return skey;
-}
-
-void
-_hash_freeskey(ScanKey skey)
-{
- pfree(skey);
-}
-
-
+/*
+ * _hash_checkqual -- does the index tuple satisfy the scan conditions?
+ */
bool
_hash_checkqual(IndexScanDesc scan, IndexTuple itup)
{
- if (scan->numberOfKeys > 0)
- return (index_keytest(itup,
- RelationGetDescr(scan->indexRelation),
- scan->numberOfKeys, scan->keyData));
- else
- return true;
+ return index_keytest(itup, RelationGetDescr(scan->indexRelation),
+ scan->numberOfKeys, scan->keyData);
}
+/*
+ * _hash_formitem -- construct a hash index entry
+ */
HashItem
_hash_formitem(IndexTuple itup)
{
@@ -82,30 +45,49 @@ _hash_formitem(IndexTuple itup)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("hash indexes cannot include null keys")));
- /* make a copy of the index tuple with room for the sequence number */
+ /*
+ * make a copy of the index tuple (XXX do we still need to copy?)
+ *
+ * HashItemData used to have more fields than IndexTupleData, but no
+ * longer...
+ */
tuplen = IndexTupleSize(itup);
nbytes_hitem = tuplen +
(sizeof(HashItemData) - sizeof(IndexTupleData));
hitem = (HashItem) palloc(nbytes_hitem);
- memmove((char *) &(hitem->hash_itup), (char *) itup, tuplen);
+ memcpy((char *) &(hitem->hash_itup), (char *) itup, tuplen);
return hitem;
}
-Bucket
-_hash_call(Relation rel, HashMetaPage metap, Datum key)
+/*
+ * _hash_datum2hashkey -- given a Datum, call the index's hash procedure
+ */
+uint32
+_hash_datum2hashkey(Relation rel, Datum key)
{
FmgrInfo *procinfo;
- uint32 n;
- Bucket bucket;
/* XXX assumes index has only one attribute */
procinfo = index_getprocinfo(rel, 1, HASHPROC);
- n = DatumGetUInt32(FunctionCall1(procinfo, key));
- bucket = n & metap->hashm_highmask;
- if (bucket > metap->hashm_maxbucket)
- bucket = bucket & metap->hashm_lowmask;
+
+ return DatumGetUInt32(FunctionCall1(procinfo, key));
+}
+
+/*
+ * _hash_hashkey2bucket -- determine which bucket the hashkey maps to.
+ */
+Bucket
+_hash_hashkey2bucket(uint32 hashkey, uint32 maxbucket,
+ uint32 highmask, uint32 lowmask)
+{
+ Bucket bucket;
+
+ bucket = hashkey & highmask;
+ if (bucket > maxbucket)
+ bucket = bucket & lowmask;
+
return bucket;
}
@@ -119,7 +101,7 @@ _hash_log2(uint32 num)
limit;
limit = 1;
- for (i = 0; limit < num; limit = limit << 1, i++)
+ for (i = 0; limit < num; limit <<= 1, i++)
;
return i;
}
@@ -128,22 +110,44 @@ _hash_log2(uint32 num)
* _hash_checkpage -- sanity checks on the format of all hash pages
*/
void
-_hash_checkpage(Page page, int flags)
+_hash_checkpage(Relation rel, Page page, int flags)
{
- HashPageOpaque opaque;
-
Assert(page);
+ /*
+ * When checking the metapage, always verify magic number and version.
+ */
+ if (flags == LH_META_PAGE)
+ {
+ HashMetaPage metap = (HashMetaPage) page;
+
+ if (metap->hashm_magic != HASH_MAGIC)
+ ereport(ERROR,
+ (errcode(ERRCODE_INDEX_CORRUPTED),
+ errmsg("index \"%s\" is not a hash index",
+ RelationGetRelationName(rel))));
+
+ if (metap->hashm_version != HASH_VERSION)
+ ereport(ERROR,
+ (errcode(ERRCODE_INDEX_CORRUPTED),
+ errmsg("index \"%s\" has wrong hash version, please REINDEX it",
+ RelationGetRelationName(rel))));
+ }
+
+ /*
+ * These other checks are for debugging purposes only.
+ */
+#ifdef USE_ASSERT_CHECKING
Assert(((PageHeader) (page))->pd_lower >= SizeOfPageHeaderData);
-#if 1
Assert(((PageHeader) (page))->pd_upper <=
(BLCKSZ - MAXALIGN(sizeof(HashPageOpaqueData))));
Assert(((PageHeader) (page))->pd_special ==
(BLCKSZ - MAXALIGN(sizeof(HashPageOpaqueData))));
Assert(PageGetPageSize(page) == BLCKSZ);
-#endif
if (flags)
{
- opaque = (HashPageOpaque) PageGetSpecialPointer(page);
+ HashPageOpaque opaque = (HashPageOpaque) PageGetSpecialPointer(page);
+
Assert(opaque->hasho_flag & flags);
}
+#endif /* USE_ASSERT_CHECKING */
}
diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index 02d842434c2..2dd14f9fb61 100644
--- a/src/backend/access/nbtree/nbtinsert.c
+++ b/src/backend/access/nbtree/nbtinsert.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.104 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.104.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -189,27 +189,39 @@ _bt_check_unique(Relation rel, BTItem btitem, Relation heapRel,
BlockNumber nblkno;
/*
- * make sure the offset points to an actual key before trying to
- * compare it...
+ * make sure the offset points to an actual item before trying to
+ * examine it...
*/
if (offset <= maxoff)
{
- /*
- * _bt_compare returns 0 for (1,NULL) and (1,NULL) - this's
- * how we handling NULLs - and so we must not use _bt_compare
- * in real comparison, but only for ordering/finding items on
- * pages. - vadim 03/24/97
- */
- if (!_bt_isequal(itupdesc, page, offset, natts, itup_scankey))
- break; /* we're past all the equal tuples */
-
curitemid = PageGetItemId(page, offset);
/*
- * We can skip the heap fetch if the item is marked killed.
+ * We can skip items that are marked killed.
+ *
+ * Formerly, we applied _bt_isequal() before checking the kill
+ * flag, so as to fall out of the item loop as soon as possible.
+ * However, in the presence of heavy update activity an index
+ * may contain many killed items with the same key; running
+ * _bt_isequal() on each killed item gets expensive. Furthermore
+ * it is likely that the non-killed version of each key appears
+ * first, so that we didn't actually get to exit any sooner anyway.
+ * So now we just advance over killed items as quickly as we can.
+ * We only apply _bt_isequal() when we get to a non-killed item or
+ * the end of the page.
*/
if (!ItemIdDeleted(curitemid))
{
+ /*
+ * _bt_compare returns 0 for (1,NULL) and (1,NULL) - this's
+ * how we handling NULLs - and so we must not use _bt_compare
+ * in real comparison, but only for ordering/finding items on
+ * pages. - vadim 03/24/97
+ */
+ if (!_bt_isequal(itupdesc, page, offset, natts, itup_scankey))
+ break; /* we're past all the equal tuples */
+
+ /* okay, we gotta fetch the heap tuple ... */
cbti = (BTItem) PageGetItem(page, curitemid);
htup.t_self = cbti->bti_itup.t_tid;
if (heap_fetch(heapRel, SnapshotDirty, &htup, &hbuffer,
@@ -1547,7 +1559,7 @@ _bt_pgaddtup(Relation rel,
* _bt_isequal - used in _bt_doinsert in check for duplicates.
*
* This is very similar to _bt_compare, except for NULL handling.
- * Rule is simple: NOT_NULL not equal NULL, NULL not_equal NULL too.
+ * Rule is simple: NOT_NULL not equal NULL, NULL not equal NULL too.
*/
static bool
_bt_isequal(TupleDesc itupdesc, Page page, OffsetNumber offnum,
@@ -1576,7 +1588,7 @@ _bt_isequal(TupleDesc itupdesc, Page page, OffsetNumber offnum,
datum = index_getattr(itup, attno, itupdesc, &isNull);
/* NULLs are never equal to anything */
- if (entry->sk_flags & SK_ISNULL || isNull)
+ if ((entry->sk_flags & SK_ISNULL) || isNull)
return false;
result = DatumGetInt32(FunctionCall2(&entry->sk_func,
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index d4c10a983d9..f1b4b6d2bea 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.165 2003/08/04 02:39:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.165.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -368,9 +368,15 @@ BootstrapMain(int argc, char *argv[])
Assert(DataDir);
ValidatePgVersion(DataDir);
+ /* Acquire configuration parameters */
+ if (IsUnderPostmaster)
+ {
#ifdef EXEC_BACKEND
- read_nondefault_variables();
+ read_nondefault_variables();
#endif
+ }
+ else
+ ProcessConfigFile(PGC_POSTMASTER);
if (IsUnderPostmaster)
{
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index b861d76629b..f2398e83206 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.87 2003/08/04 02:39:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.87.2.1 2003/09/07 04:36:47 momjian Exp $
*
* NOTES
* See acl.h.
@@ -72,6 +72,8 @@ dumpacl(Acl *acl)
* If is_grant is true, adds the given privileges for the list of
* grantees to the existing old_acl. If is_grant is false, the
* privileges for the given grantees are removed from old_acl.
+ *
+ * NB: the original old_acl is pfree'd.
*/
static Acl *
merge_acl_with_grant(Acl *old_acl, bool is_grant,
@@ -92,24 +94,25 @@ merge_acl_with_grant(Acl *old_acl, bool is_grant,
foreach(j, grantees)
{
PrivGrantee *grantee = (PrivGrantee *) lfirst(j);
- AclItem aclitem;
+ AclItem aclitem;
uint32 idtype;
+ Acl *newer_acl;
if (grantee->username)
{
- aclitem. ai_grantee = get_usesysid(grantee->username);
+ aclitem.ai_grantee = get_usesysid(grantee->username);
idtype = ACL_IDTYPE_UID;
}
else if (grantee->groupname)
{
- aclitem. ai_grantee = get_grosysid(grantee->groupname);
+ aclitem.ai_grantee = get_grosysid(grantee->groupname);
idtype = ACL_IDTYPE_GID;
}
else
{
- aclitem. ai_grantee = ACL_ID_WORLD;
+ aclitem.ai_grantee = ACL_ID_WORLD;
idtype = ACL_IDTYPE_WORLD;
}
@@ -126,14 +129,18 @@ merge_acl_with_grant(Acl *old_acl, bool is_grant,
(errcode(ERRCODE_INVALID_GRANT_OPERATION),
errmsg("grant options can only be granted to individual users")));
- aclitem. ai_grantor = GetUserId();
+ aclitem.ai_grantor = GetUserId();
ACLITEM_SET_PRIVS_IDTYPE(aclitem,
(is_grant || !grant_option) ? privileges : ACL_NO_RIGHTS,
(grant_option || !is_grant) ? privileges : ACL_NO_RIGHTS,
idtype);
- new_acl = aclinsert3(new_acl, &aclitem, modechg, behavior);
+ newer_acl = aclinsert3(new_acl, &aclitem, modechg, behavior);
+
+ /* avoid memory leak when there are many grantees */
+ pfree(new_acl);
+ new_acl = newer_acl;
#ifdef ACLDEBUG
dumpacl(new_acl);
@@ -269,7 +276,6 @@ ExecuteGrantStmt_Relation(GrantStmt *stmt)
/* keep the catalog indexes up to date */
CatalogUpdateIndexes(relation, newtuple);
- pfree(old_acl);
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
@@ -366,7 +372,6 @@ ExecuteGrantStmt_Database(GrantStmt *stmt)
/* keep the catalog indexes up to date */
CatalogUpdateIndexes(relation, newtuple);
- pfree(old_acl);
pfree(new_acl);
heap_endscan(scan);
@@ -465,7 +470,6 @@ ExecuteGrantStmt_Function(GrantStmt *stmt)
/* keep the catalog indexes up to date */
CatalogUpdateIndexes(relation, newtuple);
- pfree(old_acl);
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
@@ -565,7 +569,6 @@ ExecuteGrantStmt_Language(GrantStmt *stmt)
/* keep the catalog indexes up to date */
CatalogUpdateIndexes(relation, newtuple);
- pfree(old_acl);
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
@@ -662,7 +665,6 @@ ExecuteGrantStmt_Namespace(GrantStmt *stmt)
/* keep the catalog indexes up to date */
CatalogUpdateIndexes(relation, newtuple);
- pfree(old_acl);
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 2272d7bf3fb..858afc6c60f 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.58 2003/08/04 02:39:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.58.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -390,7 +390,6 @@ examine_attribute(Relation onerel, int attnum)
{
Form_pg_attribute attr = onerel->rd_att->attrs[attnum - 1];
Operator func_operator;
- Oid oprrest;
HeapTuple typtuple;
Oid eqopr = InvalidOid;
Oid eqfunc = InvalidOid;
@@ -409,12 +408,8 @@ examine_attribute(Relation onerel, int attnum)
func_operator = equality_oper(attr->atttypid, true);
if (func_operator != NULL)
{
- oprrest = ((Form_pg_operator) GETSTRUCT(func_operator))->oprrest;
- if (oprrest == F_EQSEL)
- {
- eqopr = oprid(func_operator);
- eqfunc = oprfuncid(func_operator);
- }
+ eqopr = oprid(func_operator);
+ eqfunc = oprfuncid(func_operator);
ReleaseSysCache(func_operator);
}
if (!OidIsValid(eqfunc))
@@ -447,9 +442,7 @@ examine_attribute(Relation onerel, int attnum)
func_operator = ordering_oper(attr->atttypid, true);
if (func_operator != NULL)
{
- oprrest = ((Form_pg_operator) GETSTRUCT(func_operator))->oprrest;
- if (oprrest == F_SCALARLTSEL)
- ltopr = oprid(func_operator);
+ ltopr = oprid(func_operator);
ReleaseSysCache(func_operator);
}
stats->ltopr = ltopr;
@@ -694,6 +687,12 @@ pageloop:;
*/
*totalrows = floor((double) onerel->rd_nblocks * tuplesperpage + 0.5);
+ /*
+ * Emit some interesting relation info
+ */
+ elog(elevel, " pages = %d rows/page = %d rows = %.0f",
+ onerel->rd_nblocks, (int)tuplesperpage, *totalrows);
+
return numrows;
}
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index bf798288f1b..280ae7f51d3 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.209 2003/08/13 18:56:21 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.209.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -432,7 +432,7 @@ CopyGetData(void *databuf, int datasize)
avail = datasize;
pq_copymsgbytes(copy_msgbuf, databuf, avail);
databuf = (void *) ((char *) databuf + avail);
- datasize = -avail;
+ datasize -= avail;
}
break;
}
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 36baf4690e3..8a15f189c97 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.105 2003/08/04 02:39:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.105.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -529,7 +529,8 @@ GetDefaultOpClass(Oid attrType, Oid accessMethodId)
* than one exact match, then someone put bogus entries in pg_opclass.
*
* The initial search is done by namespace.c so that we only consider
- * opclasses visible in the current namespace search path.
+ * opclasses visible in the current namespace search path. (See also
+ * typcache.c, which applies the same logic, but over all opclasses.)
*/
for (opclass = OpclassGetCandidates(accessMethodId);
opclass != NULL;
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 0677751ead4..300a80aeb0d 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.17 2003/08/04 02:39:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.17.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -261,7 +261,9 @@ DefineOpClass(CreateOpClassStmt *stmt)
/*
* If we are creating a default opclass, check there isn't one
- * already. (XXX should we restrict this test to visible opclasses?)
+ * already. (Note we do not restrict this test to visible opclasses;
+ * this ensures that typcache.c can find unique solutions to its
+ * questions.)
*/
if (stmt->isDefault)
{
diff --git a/src/backend/commands/portalcmds.c b/src/backend/commands/portalcmds.c
index c11b48db4c1..7a95959c98e 100644
--- a/src/backend/commands/portalcmds.c
+++ b/src/backend/commands/portalcmds.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.23 2003/08/08 21:41:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.23.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -88,10 +88,9 @@ PerformCursorOpen(DeclareCursorStmt *stmt)
/*
* Create a portal and copy the query and plan into its memory
- * context. (If a duplicate cursor name already exists, warn and drop
- * it.)
+ * context.
*/
- portal = CreatePortal(stmt->portalname, true, false);
+ portal = CreatePortal(stmt->portalname, false, false);
oldContext = MemoryContextSwitchTo(PortalGetHeapMemory(portal));
@@ -168,13 +167,10 @@ PerformPortalFetch(FetchStmt *stmt,
portal = GetPortalByName(stmt->portalname);
if (!PortalIsValid(portal))
{
- /* FIXME: shouldn't this be an ERROR? */
- ereport(WARNING,
+ ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_CURSOR),
- errmsg("portal \"%s\" does not exist", stmt->portalname)));
- if (completionTag)
- strcpy(completionTag, stmt->ismove ? "MOVE 0" : "FETCH 0");
- return;
+ errmsg("cursor \"%s\" does not exist", stmt->portalname)));
+ return; /* keep compiler happy */
}
/* Adjust dest if needed. MOVE wants destination None */
@@ -218,11 +214,10 @@ PerformPortalClose(const char *name)
portal = GetPortalByName(name);
if (!PortalIsValid(portal))
{
- ereport(WARNING,
+ ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_CURSOR),
- errmsg("portal \"%s\" does not exist", name),
- errfunction("PerformPortalClose"))); /* for ecpg */
- return;
+ errmsg("cursor \"%s\" does not exist", name)));
+ return; /* keep compiler happy */
}
/*
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 77885802335..ecbdad05195 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.79 2003/08/08 21:41:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.79.2.1 2003/09/07 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2008,7 +2008,7 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse,
}
}
- /* -= now do the thing on this relation =- */
+ /* now do the thing on this relation */
/*
* get the number of the attribute
@@ -2152,7 +2152,7 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse,
}
}
- /* -= now do the thing on this relation =- */
+ /* now do the thing on this relation */
/*
* get the number of the attribute
@@ -2280,7 +2280,7 @@ AlterTableAlterColumnDefault(Oid myrelid, bool recurse,
}
}
- /* -= now do the thing on this relation =- */
+ /* now do the thing on this relation */
/*
* get the number of the attribute
@@ -2445,7 +2445,7 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse,
}
}
- /* -= now do the thing on this relation =- */
+ /* now do the thing on this relation */
attrelation = heap_openr(AttributeRelationName, RowExclusiveLock);
diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c
index 100e7a1c375..0307386c9e0 100644
--- a/src/backend/executor/execGrouping.c
+++ b/src/backend/executor/execGrouping.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execGrouping.c,v 1.7 2003/08/08 21:41:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execGrouping.c,v 1.7.2.1 2003/09/07 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,6 +23,13 @@
#include "utils/syscache.h"
+static TupleHashTable CurTupleHashTable = NULL;
+
+static uint32 TupleHashTableHash(const void *key, Size keysize);
+static int TupleHashTableMatch(const void *key1, const void *key2,
+ Size keysize);
+
+
/*****************************************************************************
* Utility routines for grouping tuples together
*****************************************************************************/
@@ -272,7 +279,7 @@ execTuplesHashPrepare(TupleDesc tupdesc,
* numCols, keyColIdx: identify the tuple fields to use as lookup key
* eqfunctions: equality comparison functions to use
* hashfunctions: datatype-specific hashing functions to use
- * nbuckets: number of buckets to make
+ * nbuckets: initial estimate of hashtable size
* entrysize: size of each entry (at least sizeof(TupleHashEntryData))
* tablecxt: memory context in which to store table and table entries
* tempcxt: short-lived context for evaluation hash and comparison functions
@@ -290,14 +297,13 @@ BuildTupleHashTable(int numCols, AttrNumber *keyColIdx,
MemoryContext tablecxt, MemoryContext tempcxt)
{
TupleHashTable hashtable;
- Size tabsize;
+ HASHCTL hash_ctl;
Assert(nbuckets > 0);
Assert(entrysize >= sizeof(TupleHashEntryData));
- tabsize = sizeof(TupleHashTableData) +
- (nbuckets - 1) *sizeof(TupleHashEntry);
- hashtable = (TupleHashTable) MemoryContextAllocZero(tablecxt, tabsize);
+ hashtable = (TupleHashTable) MemoryContextAlloc(tablecxt,
+ sizeof(TupleHashTableData));
hashtable->numCols = numCols;
hashtable->keyColIdx = keyColIdx;
@@ -306,7 +312,20 @@ BuildTupleHashTable(int numCols, AttrNumber *keyColIdx,
hashtable->tablecxt = tablecxt;
hashtable->tempcxt = tempcxt;
hashtable->entrysize = entrysize;
- hashtable->nbuckets = nbuckets;
+
+ MemSet(&hash_ctl, 0, sizeof(hash_ctl));
+ hash_ctl.keysize = sizeof(TupleHashEntryData);
+ hash_ctl.entrysize = entrysize;
+ hash_ctl.hash = TupleHashTableHash;
+ hash_ctl.match = TupleHashTableMatch;
+ hash_ctl.hcxt = tablecxt;
+ hashtable->hashtab = hash_create("TupleHashTable", (long) nbuckets,
+ &hash_ctl,
+ HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
+ if (hashtable->hashtab == NULL)
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of memory")));
return hashtable;
}
@@ -327,19 +346,93 @@ TupleHashEntry
LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot,
bool *isnew)
{
- int numCols = hashtable->numCols;
- AttrNumber *keyColIdx = hashtable->keyColIdx;
HeapTuple tuple = slot->val;
TupleDesc tupdesc = slot->ttc_tupleDescriptor;
- uint32 hashkey = 0;
- int i;
- int bucketno;
TupleHashEntry entry;
MemoryContext oldContext;
+ TupleHashTable saveCurHT;
+ bool found;
- /* Need to run the hash function in short-lived context */
+ /* Need to run the hash functions in short-lived context */
oldContext = MemoryContextSwitchTo(hashtable->tempcxt);
+ /*
+ * Set up data needed by hash and match functions
+ *
+ * We save and restore CurTupleHashTable just in case someone manages
+ * to invoke this code re-entrantly.
+ */
+ hashtable->tupdesc = tupdesc;
+ saveCurHT = CurTupleHashTable;
+ CurTupleHashTable = hashtable;
+
+ /* Search the hash table */
+ entry = (TupleHashEntry) hash_search(hashtable->hashtab,
+ &tuple,
+ isnew ? HASH_ENTER : HASH_FIND,
+ &found);
+
+ if (isnew)
+ {
+ if (found)
+ {
+ /* found pre-existing entry */
+ *isnew = false;
+ }
+ else
+ {
+ /* created new entry ... we hope */
+ if (entry == NULL)
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of memory")));
+
+ /*
+ * Zero any caller-requested space in the entry. (This zaps
+ * the "key data" dynahash.c copied into the new entry, but
+ * we don't care since we're about to overwrite it anyway.)
+ */
+ MemSet(entry, 0, hashtable->entrysize);
+
+ /* Copy the first tuple into the table context */
+ MemoryContextSwitchTo(hashtable->tablecxt);
+ entry->firstTuple = heap_copytuple(tuple);
+
+ *isnew = true;
+ }
+ }
+
+ CurTupleHashTable = saveCurHT;
+
+ MemoryContextSwitchTo(oldContext);
+
+ return entry;
+}
+
+/*
+ * Compute the hash value for a tuple
+ *
+ * The passed-in key is a pointer to a HeapTuple pointer -- this is either
+ * the firstTuple field of a TupleHashEntry struct, or the key value passed
+ * to hash_search. We ignore the keysize.
+ *
+ * CurTupleHashTable must be set before calling this, since dynahash.c
+ * doesn't provide any API that would let us get at the hashtable otherwise.
+ *
+ * Also, the caller must select an appropriate memory context for running
+ * the hash functions. (dynahash.c doesn't change CurrentMemoryContext.)
+ */
+static uint32
+TupleHashTableHash(const void *key, Size keysize)
+{
+ HeapTuple tuple = *(const HeapTuple *) key;
+ TupleHashTable hashtable = CurTupleHashTable;
+ int numCols = hashtable->numCols;
+ AttrNumber *keyColIdx = hashtable->keyColIdx;
+ TupleDesc tupdesc = hashtable->tupdesc;
+ uint32 hashkey = 0;
+ int i;
+
for (i = 0; i < numCols; i++)
{
AttrNumber att = keyColIdx[i];
@@ -360,72 +453,36 @@ LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot,
hashkey ^= hkey;
}
}
- bucketno = hashkey % (uint32) hashtable->nbuckets;
-
- for (entry = hashtable->buckets[bucketno];
- entry != NULL;
- entry = entry->next)
- {
- /* Quick check using hashkey */
- if (entry->hashkey != hashkey)
- continue;
- if (execTuplesMatch(entry->firstTuple,
- tuple,
- tupdesc,
- numCols, keyColIdx,
- hashtable->eqfunctions,
- hashtable->tempcxt))
- {
- if (isnew)
- *isnew = false;
- MemoryContextSwitchTo(oldContext);
- return entry;
- }
- }
-
- /* Not there, so build a new one if requested */
- if (isnew)
- {
- MemoryContextSwitchTo(hashtable->tablecxt);
-
- entry = (TupleHashEntry) palloc0(hashtable->entrysize);
-
- entry->hashkey = hashkey;
- entry->firstTuple = heap_copytuple(tuple);
-
- entry->next = hashtable->buckets[bucketno];
- hashtable->buckets[bucketno] = entry;
-
- *isnew = true;
- }
-
- MemoryContextSwitchTo(oldContext);
- return entry;
+ return hashkey;
}
/*
- * Walk through all the entries of a hash table, in no special order.
- * Returns NULL when no more entries remain.
+ * See whether two tuples (presumably of the same hash value) match
+ *
+ * As above, the passed pointers are pointers to HeapTuple pointers.
*
- * Iterator state must be initialized with ResetTupleHashIterator() macro.
+ * CurTupleHashTable must be set before calling this, since dynahash.c
+ * doesn't provide any API that would let us get at the hashtable otherwise.
+ *
+ * Also, the caller must select an appropriate memory context for running
+ * the compare functions. (dynahash.c doesn't change CurrentMemoryContext.)
*/
-TupleHashEntry
-ScanTupleHashTable(TupleHashTable hashtable, TupleHashIterator *state)
+static int
+TupleHashTableMatch(const void *key1, const void *key2, Size keysize)
{
- TupleHashEntry entry;
-
- entry = state->next_entry;
- while (entry == NULL)
- {
- if (state->next_bucket >= hashtable->nbuckets)
- {
- /* No more entries in hashtable, so done */
- return NULL;
- }
- entry = hashtable->buckets[state->next_bucket++];
- }
- state->next_entry = entry->next;
-
- return entry;
+ HeapTuple tuple1 = *(const HeapTuple *) key1;
+ HeapTuple tuple2 = *(const HeapTuple *) key2;
+ TupleHashTable hashtable = CurTupleHashTable;
+
+ if (execTuplesMatch(tuple1,
+ tuple2,
+ hashtable->tupdesc,
+ hashtable->numCols,
+ hashtable->keyColIdx,
+ hashtable->eqfunctions,
+ hashtable->tempcxt))
+ return 0;
+ else
+ return 1;
}
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c
index 4ecae71cd68..cce62237085 100644
--- a/src/backend/executor/execQual.c
+++ b/src/backend/executor/execQual.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.141 2003/08/08 21:41:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.141.2.1 2003/09/07 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1620,16 +1620,18 @@ ExecEvalArray(ArrayExprState *astate, ExprContext *econtext,
ArrayType *result;
List *element;
Oid element_type = arrayExpr->element_typeid;
- int ndims = arrayExpr->ndims;
+ int ndims = 0;
int dims[MAXDIM];
int lbs[MAXDIM];
- if (ndims == 1)
+ if (!arrayExpr->multidims)
{
+ /* Elements are presumably of scalar type */
int nelems;
Datum *dvalues;
int i = 0;
+ ndims = 1;
nelems = length(astate->elements);
/* Shouldn't happen here, but if length is 0, return NULL */
@@ -1667,6 +1669,7 @@ ExecEvalArray(ArrayExprState *astate, ExprContext *econtext,
}
else
{
+ /* Must be nested array expressions */
char *dat = NULL;
Size ndatabytes = 0;
int nbytes;
@@ -1677,12 +1680,6 @@ ExecEvalArray(ArrayExprState *astate, ExprContext *econtext,
bool firstone = true;
int i;
- if (ndims <= 0 || ndims > MAXDIM)
- ereport(ERROR,
- (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("number of array dimensions exceeds the maximum allowed, %d",
- MAXDIM)));
-
/* loop through and get data area from each element */
foreach(element, astate->elements)
{
@@ -1701,14 +1698,32 @@ ExecEvalArray(ArrayExprState *astate, ExprContext *econtext,
array = DatumGetArrayTypeP(arraydatum);
+ /* run-time double-check on element type */
+ if (element_type != ARR_ELEMTYPE(array))
+ ereport(ERROR,
+ (errcode(ERRCODE_DATATYPE_MISMATCH),
+ errmsg("cannot merge incompatible arrays"),
+ errdetail("Array with element type %s cannot be "
+ "included in ARRAY construct with element type %s.",
+ format_type_be(ARR_ELEMTYPE(array)),
+ format_type_be(element_type))));
+
if (firstone)
{
/* Get sub-array details from first member */
elem_ndims = ARR_NDIM(array);
+ ndims = elem_ndims + 1;
+ if (ndims <= 0 || ndims > MAXDIM)
+ ereport(ERROR,
+ (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
+ errmsg("number of array dimensions exceeds " \
+ "the maximum allowed, %d", MAXDIM)));
+
elem_dims = (int *) palloc(elem_ndims * sizeof(int));
memcpy(elem_dims, ARR_DIMS(array), elem_ndims * sizeof(int));
elem_lbs = (int *) palloc(elem_ndims * sizeof(int));
memcpy(elem_lbs, ARR_LBOUND(array), elem_ndims * sizeof(int));
+
firstone = false;
}
else
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index d8fb9a9565d..1ac046b65f4 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -45,7 +45,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.115 2003/08/08 21:41:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.115.2.1 2003/09/07 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -905,7 +905,7 @@ agg_fill_hash_table(AggState *aggstate)
aggstate->table_filled = true;
/* Initialize to walk the hash table */
- ResetTupleHashIterator(&aggstate->hashiter);
+ ResetTupleHashIterator(aggstate->hashtable, &aggstate->hashiter);
}
/*
@@ -920,7 +920,6 @@ agg_retrieve_hash_table(AggState *aggstate)
bool *aggnulls;
AggStatePerAgg peragg;
AggStatePerGroup pergroup;
- TupleHashTable hashtable;
AggHashEntry entry;
TupleTableSlot *firstSlot;
TupleTableSlot *resultSlot;
@@ -935,7 +934,6 @@ agg_retrieve_hash_table(AggState *aggstate)
aggnulls = econtext->ecxt_aggnulls;
projInfo = aggstate->ss.ps.ps_ProjInfo;
peragg = aggstate->peragg;
- hashtable = aggstate->hashtable;
firstSlot = aggstate->ss.ss_ScanTupleSlot;
/*
@@ -950,8 +948,7 @@ agg_retrieve_hash_table(AggState *aggstate)
/*
* Find the next entry in the hash table
*/
- entry = (AggHashEntry) ScanTupleHashTable(hashtable,
- &aggstate->hashiter);
+ entry = (AggHashEntry) ScanTupleHashTable(&aggstate->hashiter);
if (entry == NULL)
{
/* No more entries in hashtable, so done */
@@ -1440,7 +1437,7 @@ ExecReScanAgg(AggState *node, ExprContext *exprCtxt)
*/
if (((PlanState *) node)->lefttree->chgParam == NULL)
{
- ResetTupleHashIterator(&node->hashiter);
+ ResetTupleHashIterator(node->hashtable, &node->hashiter);
return;
}
}
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c
index bfbcaf208de..1ea753ea303 100644
--- a/src/backend/executor/nodeIndexscan.c
+++ b/src/backend/executor/nodeIndexscan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.82 2003/08/04 02:39:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.82.2.1 2003/09/07 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,19 +28,51 @@
#include "access/heapam.h"
#include "executor/execdebug.h"
#include "executor/nodeIndexscan.h"
+#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
#include "optimizer/clauses.h"
#include "parser/parsetree.h"
-/* ----------------
- * Misc stuff to move to executor.h soon -cim 6/5/90
- * ----------------
- */
+
#define NO_OP 0
#define LEFT_OP 1
#define RIGHT_OP 2
+/*
+ * In a multiple-index plan, we must take care to return any given tuple
+ * only once, even if it matches conditions of several index scans. Our
+ * preferred way to do this is to record already-returned tuples in a hash
+ * table (using the TID as unique identifier). However, in a very large
+ * scan this could conceivably run out of memory. We limit the hash table
+ * to no more than SortMem KB; if it grows past that, we fall back to the
+ * pre-7.4 technique: evaluate the prior-scan index quals again for each
+ * tuple (which is space-efficient, but slow).
+ *
+ * When scanning backwards, we use scannum to determine when to emit the
+ * tuple --- we have to re-emit a tuple in the same scan as it was first
+ * encountered.
+ *
+ * Note: this code would break if the planner were ever to create a multiple
+ * index plan with overall backwards direction, because the hashtable code
+ * will emit a tuple the first time it is encountered (which would be the
+ * highest scan in which it matches the index), but the evaluate-the-quals
+ * code will emit a tuple in the lowest-numbered scan in which it's valid.
+ * This could be fixed at need by making the evaluate-the-quals case more
+ * complex. Currently the planner will never create such a plan (since it
+ * considers multi-index plans unordered anyway), so there's no need for
+ * more complexity.
+ */
+typedef struct
+{
+ /* tid is the hash key and so must be first! */
+ ItemPointerData tid; /* TID of a tuple we've returned */
+ int scannum; /* number of scan we returned it in */
+} DupHashTabEntry;
+
+
static TupleTableSlot *IndexNext(IndexScanState *node);
+static void create_duphash(IndexScanState *node);
+
/* ----------------------------------------------------------------
* IndexNext
@@ -163,7 +195,7 @@ IndexNext(IndexScanState *node)
while ((tuple = index_getnext(scandesc, direction)) != NULL)
{
/*
- * store the scanned tuple in the scan tuple slot of the scan
+ * Store the scanned tuple in the scan tuple slot of the scan
* state. Note: we pass 'false' because tuples returned by
* amgetnext are pointers onto disk pages and must not be
* pfree()'d.
@@ -174,36 +206,80 @@ IndexNext(IndexScanState *node)
false); /* don't pfree */
/*
- * We must check to see if the current tuple was already
- * matched by an earlier index, so we don't double-report it.
- * We do this by passing the tuple through ExecQual and
- * checking for failure with all previous qualifications.
+ * If it's a multiple-index scan, make sure not to double-report
+ * a tuple matched by more than one index. (See notes above.)
*/
- if (node->iss_IndexPtr > 0)
+ if (numIndices > 1)
{
- bool prev_matches = false;
- int prev_index;
- List *qual;
-
- econtext->ecxt_scantuple = slot;
- ResetExprContext(econtext);
- qual = node->indxqualorig;
- for (prev_index = 0;
- prev_index < node->iss_IndexPtr;
- prev_index++)
+ /* First try the hash table */
+ if (node->iss_DupHash)
{
- if (ExecQual((List *) lfirst(qual), econtext, false))
+ DupHashTabEntry *entry;
+ bool found;
+
+ entry = (DupHashTabEntry *)
+ hash_search(node->iss_DupHash,
+ &tuple->t_data->t_ctid,
+ HASH_ENTER,
+ &found);
+ if (entry == NULL ||
+ node->iss_DupHash->hctl->nentries > node->iss_MaxHash)
+ {
+ /* out of memory (either hard or soft limit) */
+ /* release hash table and fall thru to old code */
+ hash_destroy(node->iss_DupHash);
+ node->iss_DupHash = NULL;
+ }
+ else if (found)
{
- prev_matches = true;
- break;
+ /* pre-existing entry */
+
+ /*
+ * It's duplicate if first emitted in a different
+ * scan. If same scan, we must be backing up, so
+ * okay to emit again.
+ */
+ if (entry->scannum != node->iss_IndexPtr)
+ {
+ /* Dup, so drop it and loop back for another */
+ ExecClearTuple(slot);
+ continue;
+ }
+ }
+ else
+ {
+ /* new entry, finish filling it in */
+ entry->scannum = node->iss_IndexPtr;
}
- qual = lnext(qual);
}
- if (prev_matches)
+ /* If hash table has overflowed, do it the hard way */
+ if (node->iss_DupHash == NULL &&
+ node->iss_IndexPtr > 0)
{
- /* Duplicate, so drop it and loop back for another */
- ExecClearTuple(slot);
- continue;
+ bool prev_matches = false;
+ int prev_index;
+ List *qual;
+
+ econtext->ecxt_scantuple = slot;
+ ResetExprContext(econtext);
+ qual = node->indxqualorig;
+ for (prev_index = 0;
+ prev_index < node->iss_IndexPtr;
+ prev_index++)
+ {
+ if (ExecQual((List *) lfirst(qual), econtext, false))
+ {
+ prev_matches = true;
+ break;
+ }
+ qual = lnext(qual);
+ }
+ if (prev_matches)
+ {
+ /* Dup, so drop it and loop back for another */
+ ExecClearTuple(slot);
+ continue;
+ }
}
}
@@ -383,6 +459,14 @@ ExecIndexReScan(IndexScanState *node, ExprContext *exprCtxt)
return;
}
+ /* reset hash table */
+ if (numIndices > 1)
+ {
+ if (node->iss_DupHash)
+ hash_destroy(node->iss_DupHash);
+ create_duphash(node);
+ }
+
/* reset index scans */
if (ScanDirectionIsBackward(((IndexScan *) node->ss.ps.plan)->indxorderdir))
node->iss_IndexPtr = numIndices;
@@ -432,6 +516,10 @@ ExecEndIndexScan(IndexScanState *node)
ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
ExecClearTuple(node->ss.ss_ScanTupleSlot);
+ /* drop hash table */
+ if (node->iss_DupHash)
+ hash_destroy(node->iss_DupHash);
+
/*
* close the index relations
*/
@@ -507,7 +595,7 @@ ExecIndexRestrPos(IndexScanState *node)
/* ----------------------------------------------------------------
* ExecInitIndexScan
- *
+ *
* Initializes the index scan's state information, creates
* scan keys, and opens the base and index relations.
*
@@ -920,11 +1008,41 @@ ExecInitIndexScan(IndexScan *node, EState *estate)
ExecAssignScanProjectionInfo(&indexstate->ss);
/*
+ * Initialize hash table if needed.
+ */
+ if (numIndices > 1)
+ create_duphash(indexstate);
+ else
+ indexstate->iss_DupHash = NULL;
+
+ /*
* all done.
*/
return indexstate;
}
+static void
+create_duphash(IndexScanState *node)
+{
+ HASHCTL hash_ctl;
+
+ MemSet(&hash_ctl, 0, sizeof(hash_ctl));
+ hash_ctl.keysize = SizeOfIptrData;
+ hash_ctl.entrysize = sizeof(DupHashTabEntry);
+ hash_ctl.hash = tag_hash;
+ hash_ctl.hcxt = CurrentMemoryContext;
+ node->iss_DupHash = hash_create("DupHashTable",
+ (long) ceil(node->ss.ps.plan->plan_rows),
+ &hash_ctl,
+ HASH_ELEM | HASH_FUNCTION | HASH_CONTEXT);
+ if (node->iss_DupHash == NULL)
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of memory")));
+ node->iss_MaxHash = (SortMem * 1024L) /
+ (MAXALIGN(sizeof(HASHELEMENT)) + MAXALIGN(sizeof(DupHashTabEntry)));
+}
+
int
ExecCountSlotsIndexScan(IndexScan *node)
{
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index 7530be263f3..71209fe246d 100644
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.54 2003/08/08 21:41:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.54.2.1 2003/09/07 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -627,8 +627,8 @@ findPartialMatch(TupleHashTable hashtable, TupleTableSlot *slot)
TupleHashIterator hashiter;
TupleHashEntry entry;
- ResetTupleHashIterator(&hashiter);
- while ((entry = ScanTupleHashTable(hashtable, &hashiter)) != NULL)
+ ResetTupleHashIterator(hashtable, &hashiter);
+ while ((entry = ScanTupleHashTable(&hashiter)) != NULL)
{
if (!execTuplesUnequal(entry->firstTuple,
tuple,
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index f2ca627eba2..114faab5128 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.111 2003/08/04 02:39:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.111.2.1 2003/09/07 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -550,12 +550,12 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
char *token;
char *db;
char *user;
- struct addrinfo *file_ip_addr = NULL,
- *file_ip_mask = NULL;
+ struct addrinfo *gai_result;
struct addrinfo hints;
- struct sockaddr_storage *mask;
- char *cidr_slash;
int ret;
+ struct sockaddr_storage addr;
+ struct sockaddr_storage mask;
+ char *cidr_slash;
Assert(line != NIL);
line_number = lfirsti(line);
@@ -648,6 +648,7 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
if (cidr_slash)
*cidr_slash = '\0';
+ /* Get the IP address either way */
hints.ai_flags = AI_NUMERICHOST;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = 0;
@@ -657,9 +658,8 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
hints.ai_addr = NULL;
hints.ai_next = NULL;
- /* Get the IP address either way */
- ret = getaddrinfo_all(token, NULL, &hints, &file_ip_addr);
- if (ret || !file_ip_addr)
+ ret = getaddrinfo_all(token, NULL, &hints, &gai_result);
+ if (ret || !gai_result)
{
ereport(LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
@@ -667,24 +667,21 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
token, gai_strerror(ret))));
if (cidr_slash)
*cidr_slash = '/';
+ if (gai_result)
+ freeaddrinfo_all(hints.ai_family, gai_result);
goto hba_syntax;
}
if (cidr_slash)
*cidr_slash = '/';
- if (file_ip_addr->ai_family != port->raddr.addr.ss_family)
- {
- /* Wrong address family. */
- freeaddrinfo_all(hints.ai_family, file_ip_addr);
- return;
- }
+ memcpy(&addr, gai_result->ai_addr, gai_result->ai_addrlen);
+ freeaddrinfo_all(hints.ai_family, gai_result);
/* Get the netmask */
if (cidr_slash)
{
- if (SockAddr_cidr_mask(&mask, cidr_slash + 1,
- file_ip_addr->ai_family) < 0)
+ if (SockAddr_cidr_mask(&mask, cidr_slash + 1, addr.ss_family) < 0)
goto hba_syntax;
}
else
@@ -695,16 +692,47 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
goto hba_syntax;
token = lfirst(line);
- ret = getaddrinfo_all(token, NULL, &hints, &file_ip_mask);
- if (ret || !file_ip_mask)
+ ret = getaddrinfo_all(token, NULL, &hints, &gai_result);
+ if (ret || !gai_result)
+ {
+ if (gai_result)
+ freeaddrinfo_all(hints.ai_family, gai_result);
goto hba_syntax;
+ }
- mask = (struct sockaddr_storage *) file_ip_mask->ai_addr;
+ memcpy(&mask, gai_result->ai_addr, gai_result->ai_addrlen);
+ freeaddrinfo_all(hints.ai_family, gai_result);
- if (file_ip_addr->ai_family != mask->ss_family)
+ if (addr.ss_family != mask.ss_family)
goto hba_syntax;
}
+ if (addr.ss_family != port->raddr.addr.ss_family)
+ {
+ /*
+ * Wrong address family. We allow only one case: if the
+ * file has IPv4 and the port is IPv6, promote the file
+ * address to IPv6 and try to match that way.
+ */
+#ifdef HAVE_IPV6
+ if (addr.ss_family == AF_INET &&
+ port->raddr.addr.ss_family == AF_INET6)
+ {
+ promote_v4_to_v6_addr(&addr);
+ promote_v4_to_v6_mask(&mask);
+ }
+ else
+#endif /* HAVE_IPV6 */
+ {
+ /* Line doesn't match client port, so ignore it. */
+ return;
+ }
+ }
+
+ /* Ignore line if client port is not in the matching addr range. */
+ if (!rangeSockAddr(&port->raddr.addr, &addr, &mask))
+ return;
+
/* Read the rest of the line. */
line = lnext(line);
if (!line)
@@ -712,16 +740,6 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
parse_hba_auth(line, &port->auth_method, &port->auth_arg, error_p);
if (*error_p)
goto hba_syntax;
-
- /* Must meet network restrictions */
- if (!rangeSockAddr(&port->raddr.addr,
- (struct sockaddr_storage *) file_ip_addr->ai_addr,
- mask))
- goto hba_freeaddr;
-
- freeaddrinfo_all(hints.ai_family, file_ip_addr);
- if (file_ip_mask)
- freeaddrinfo_all(hints.ai_family, file_ip_mask);
}
else
goto hba_syntax;
@@ -748,12 +766,6 @@ hba_syntax:
line_number)));
*error_p = true;
-
-hba_freeaddr:
- if (file_ip_addr)
- freeaddrinfo_all(hints.ai_family, file_ip_addr);
- if (file_ip_mask)
- freeaddrinfo_all(hints.ai_family, file_ip_mask);
}
@@ -1292,7 +1304,7 @@ ident_inet(const SockAddr remote_addr,
{
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("could not connect to IDENT server at address \"%s\", port %s): %m",
+ errmsg("could not connect to IDENT server at address \"%s\", port %s: %m",
remote_addr_s, ident_port)));
ident_return = false;
goto ident_inet_done;
@@ -1312,7 +1324,7 @@ ident_inet(const SockAddr remote_addr,
{
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("could not send query to IDENT server at address \"%s\", port %s): %m",
+ errmsg("could not send query to IDENT server at address \"%s\", port %s: %m",
remote_addr_s, ident_port)));
ident_return = false;
goto ident_inet_done;
@@ -1327,7 +1339,7 @@ ident_inet(const SockAddr remote_addr,
{
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("could not receive response from IDENT server at address \"%s\", port %s): %m",
+ errmsg("could not receive response from IDENT server at address \"%s\", port %s: %m",
remote_addr_s, ident_port)));
ident_return = false;
goto ident_inet_done;
diff --git a/src/backend/libpq/ip.c b/src/backend/libpq/ip.c
index 8ae6c8f7848..1fefbebf14b 100644
--- a/src/backend/libpq/ip.c
+++ b/src/backend/libpq/ip.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.19 2003/08/04 02:39:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.19.2.1 2003/09/07 04:36:48 momjian Exp $
*
* This file and the IPV6 implementation were initially provided by
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
@@ -34,7 +34,8 @@
#endif
#include <arpa/inet.h>
#include <sys/file.h>
-#endif
+
+#endif /* !defined(_MSC_VER) && !defined(__BORLANDC__) */
#include "libpq/ip.h"
@@ -265,9 +266,16 @@ getnameinfo_unix(const struct sockaddr_un * sa, int salen,
return 0;
}
+
#endif /* HAVE_UNIX_SOCKETS */
+/*
+ * rangeSockAddr - is addr within the subnet specified by netaddr/netmask ?
+ *
+ * Note: caller must already have verified that all three addresses are
+ * in the same address family; and AF_UNIX addresses are not supported.
+ */
int
rangeSockAddr(const struct sockaddr_storage * addr,
const struct sockaddr_storage * netaddr,
@@ -287,19 +295,52 @@ rangeSockAddr(const struct sockaddr_storage * addr,
return 0;
}
+static int
+rangeSockAddrAF_INET(const struct sockaddr_in * addr,
+ const struct sockaddr_in * netaddr,
+ const struct sockaddr_in * netmask)
+{
+ if (((addr->sin_addr.s_addr ^ netaddr->sin_addr.s_addr) &
+ netmask->sin_addr.s_addr) == 0)
+ return 1;
+ else
+ return 0;
+}
+
+
+#ifdef HAVE_IPV6
+static int
+rangeSockAddrAF_INET6(const struct sockaddr_in6 * addr,
+ const struct sockaddr_in6 * netaddr,
+ const struct sockaddr_in6 * netmask)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ if (((addr->sin6_addr.s6_addr[i] ^ netaddr->sin6_addr.s6_addr[i]) &
+ netmask->sin6_addr.s6_addr[i]) != 0)
+ return 0;
+ }
+
+ return 1;
+}
+
+#endif
+
/*
* SockAddr_cidr_mask - make a network mask of the appropriate family
* and required number of significant bits
*
- * Note: Returns a static pointer for the mask, so it's not thread safe,
- * and a second call will overwrite the data.
+ * The resulting mask is placed in *mask, which had better be big enough.
+ *
+ * Return value is 0 if okay, -1 if not.
*/
int
-SockAddr_cidr_mask(struct sockaddr_storage ** mask, char *numbits, int family)
+SockAddr_cidr_mask(struct sockaddr_storage * mask, char *numbits, int family)
{
long bits;
char *endptr;
- static struct sockaddr_storage sock;
struct sockaddr_in mask4;
#ifdef HAVE_IPV6
@@ -318,15 +359,13 @@ SockAddr_cidr_mask(struct sockaddr_storage ** mask, char *numbits, int family)
)
return -1;
- *mask = &sock;
-
switch (family)
{
case AF_INET:
mask4.sin_addr.s_addr =
htonl((0xffffffffUL << (32 - bits))
& 0xffffffffUL);
- memcpy(&sock, &mask4, sizeof(mask4));
+ memcpy(mask, &mask4, sizeof(mask4));
break;
#ifdef HAVE_IPV6
case AF_INET6:
@@ -346,7 +385,7 @@ SockAddr_cidr_mask(struct sockaddr_storage ** mask, char *numbits, int family)
}
bits -= 8;
}
- memcpy(&sock, &mask6, sizeof(mask6));
+ memcpy(mask, &mask6, sizeof(mask6));
break;
}
#endif
@@ -354,38 +393,80 @@ SockAddr_cidr_mask(struct sockaddr_storage ** mask, char *numbits, int family)
return -1;
}
- sock.ss_family = family;
+ mask->ss_family = family;
return 0;
}
-static int
-rangeSockAddrAF_INET(const struct sockaddr_in * addr, const struct sockaddr_in * netaddr,
- const struct sockaddr_in * netmask)
+
+#ifdef HAVE_IPV6
+
+/*
+ * promote_v4_to_v6_addr --- convert an AF_INET addr to AF_INET6, using
+ * the standard convention for IPv4 addresses mapped into IPv6 world
+ *
+ * The passed addr is modified in place; be sure it is large enough to
+ * hold the result! Note that we only worry about setting the fields
+ * that rangeSockAddr will look at.
+ */
+void
+promote_v4_to_v6_addr(struct sockaddr_storage * addr)
{
- if (((addr->sin_addr.s_addr ^ netaddr->sin_addr.s_addr) &
- netmask->sin_addr.s_addr) == 0)
- return 1;
- else
- return 0;
-}
+ struct sockaddr_in addr4;
+ struct sockaddr_in6 addr6;
+ uint32 s_addr;
+ memcpy(&addr4, addr, sizeof(addr4));
+ s_addr = ntohl(addr4.sin_addr.s_addr);
-#ifdef HAVE_IPV6
-static int
-rangeSockAddrAF_INET6(const struct sockaddr_in6 * addr,
- const struct sockaddr_in6 * netaddr,
- const struct sockaddr_in6 * netmask)
+ memset(&addr6, 0, sizeof(addr6));
+
+ addr6.sin6_family = AF_INET6;
+
+ addr6.sin6_addr.s6_addr[10] = 0xff;
+ addr6.sin6_addr.s6_addr[11] = 0xff;
+ addr6.sin6_addr.s6_addr[12] = (s_addr >> 24) & 0xFF;
+ addr6.sin6_addr.s6_addr[13] = (s_addr >> 16) & 0xFF;
+ addr6.sin6_addr.s6_addr[14] = (s_addr >> 8) & 0xFF;
+ addr6.sin6_addr.s6_addr[15] = (s_addr) & 0xFF;
+
+ memcpy(addr, &addr6, sizeof(addr6));
+}
+
+/*
+ * promote_v4_to_v6_mask --- convert an AF_INET netmask to AF_INET6, using
+ * the standard convention for IPv4 addresses mapped into IPv6 world
+ *
+ * This must be different from promote_v4_to_v6_addr because we want to
+ * set the high-order bits to 1's not 0's.
+ *
+ * The passed addr is modified in place; be sure it is large enough to
+ * hold the result! Note that we only worry about setting the fields
+ * that rangeSockAddr will look at.
+ */
+void
+promote_v4_to_v6_mask(struct sockaddr_storage * addr)
{
+ struct sockaddr_in addr4;
+ struct sockaddr_in6 addr6;
+ uint32 s_addr;
int i;
- for (i = 0; i < 16; i++)
- {
- if (((addr->sin6_addr.s6_addr[i] ^ netaddr->sin6_addr.s6_addr[i]) &
- netmask->sin6_addr.s6_addr[i]) != 0)
- return 0;
- }
+ memcpy(&addr4, addr, sizeof(addr4));
+ s_addr = ntohl(addr4.sin_addr.s_addr);
- return 1;
+ memset(&addr6, 0, sizeof(addr6));
+
+ addr6.sin6_family = AF_INET6;
+
+ for (i = 0; i < 12; i++)
+ addr6.sin6_addr.s6_addr[i] = 0xff;
+
+ addr6.sin6_addr.s6_addr[12] = (s_addr >> 24) & 0xFF;
+ addr6.sin6_addr.s6_addr[13] = (s_addr >> 16) & 0xFF;
+ addr6.sin6_addr.s6_addr[14] = (s_addr >> 8) & 0xFF;
+ addr6.sin6_addr.s6_addr[15] = (s_addr) & 0xFF;
+
+ memcpy(addr, &addr6, sizeof(addr6));
}
-#endif
+#endif /* HAVE_IPV6 */
diff --git a/src/backend/libpq/pg_hba.conf.sample b/src/backend/libpq/pg_hba.conf.sample
index e5dba788c66..946e573ddc9 100644
--- a/src/backend/libpq/pg_hba.conf.sample
+++ b/src/backend/libpq/pg_hba.conf.sample
@@ -51,8 +51,7 @@
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
+# IPv4-style local connections:
host all all 127.0.0.1 255.255.255.255 trust
-
-# uncomment these to support IPv6 localhost connections
-# host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
-# host all all ::ffff:127.0.0.1/128 trust
+# IPv6-style local connections:
+host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index fa1c567df0d..e77fee6417f 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.263 2003/08/08 21:41:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.263.2.1 2003/09/07 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -947,7 +947,7 @@ _copyArrayExpr(ArrayExpr *from)
COPY_SCALAR_FIELD(array_typeid);
COPY_SCALAR_FIELD(element_typeid);
COPY_NODE_FIELD(elements);
- COPY_SCALAR_FIELD(ndims);
+ COPY_SCALAR_FIELD(multidims);
return newnode;
}
@@ -1402,11 +1402,12 @@ _copyTypeName(TypeName *from)
return newnode;
}
-static SortGroupBy *
-_copySortGroupBy(SortGroupBy *from)
+static SortBy *
+_copySortBy(SortBy *from)
{
- SortGroupBy *newnode = makeNode(SortGroupBy);
+ SortBy *newnode = makeNode(SortBy);
+ COPY_SCALAR_FIELD(sortby_kind);
COPY_NODE_FIELD(useOp);
COPY_NODE_FIELD(node);
@@ -2924,8 +2925,8 @@ copyObject(void *from)
case T_TypeCast:
retval = _copyTypeCast(from);
break;
- case T_SortGroupBy:
- retval = _copySortGroupBy(from);
+ case T_SortBy:
+ retval = _copySortBy(from);
break;
case T_RangeSubselect:
retval = _copyRangeSubselect(from);
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 5ad5dab1d3c..c10c5e45806 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.207 2003/08/08 21:41:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.207.2.1 2003/09/07 04:36:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -409,7 +409,7 @@ _equalArrayExpr(ArrayExpr *a, ArrayExpr *b)
COMPARE_SCALAR_FIELD(array_typeid);
COMPARE_SCALAR_FIELD(element_typeid);
COMPARE_NODE_FIELD(elements);
- COMPARE_SCALAR_FIELD(ndims);
+ COMPARE_SCALAR_FIELD(multidims);
return true;
}
@@ -1480,8 +1480,9 @@ _equalTypeCast(TypeCast *a, TypeCast *b)
}
static bool
-_equalSortGroupBy(SortGroupBy *a, SortGroupBy *b)
+_equalSortBy(SortBy *a, SortBy *b)
{
+ COMPARE_SCALAR_FIELD(sortby_kind);
COMPARE_NODE_FIELD(useOp);
COMPARE_NODE_FIELD(node);
@@ -2045,8 +2046,8 @@ equal(void *a, void *b)
case T_TypeCast:
retval = _equalTypeCast(a, b);
break;
- case T_SortGroupBy:
- retval = _equalSortGroupBy(a, b);
+ case T_SortBy:
+ retval = _equalSortBy(a, b);
break;
case T_RangeSubselect:
retval = _equalRangeSubselect(a, b);
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index b7c1a370695..6c715054b97 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.217 2003/08/08 21:41:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.217.2.1 2003/09/07 04:36:49 momjian Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -785,7 +785,7 @@ _outArrayExpr(StringInfo str, ArrayExpr *node)
WRITE_OID_FIELD(array_typeid);
WRITE_OID_FIELD(element_typeid);
WRITE_NODE_FIELD(elements);
- WRITE_INT_FIELD(ndims);
+ WRITE_BOOL_FIELD(multidims);
}
static void
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c
index d261ac7f862..2715202b343 100644
--- a/src/backend/nodes/readfuncs.c
+++ b/src/backend/nodes/readfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.161 2003/08/04 02:39:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.161.2.1 2003/09/07 04:36:49 momjian Exp $
*
* NOTES
* Path and Plan nodes do not have any readfuncs support, because we
@@ -659,7 +659,7 @@ _readArrayExpr(void)
READ_OID_FIELD(array_typeid);
READ_OID_FIELD(element_typeid);
READ_NODE_FIELD(elements);
- READ_INT_FIELD(ndims);
+ READ_BOOL_FIELD(multidims);
READ_DONE();
}
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 2f7fd02fb4b..3d076cb8457 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.154 2003/08/11 20:46:46 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.154.2.1 2003/09/07 04:36:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -629,8 +629,9 @@ create_unique_plan(Query *root, UniquePath *best_path)
tle = get_tle_by_resno(my_tlist, groupColIdx[groupColPos]);
Assert(tle != NULL);
- sortList = addTargetToSortList(NULL, tle, sortList,
- my_tlist, NIL, false);
+ sortList = addTargetToSortList(NULL, tle,
+ sortList, my_tlist,
+ SORTBY_ASC, NIL, false);
}
plan = (Plan *) make_sort_from_sortclauses(root, my_tlist,
subplan, sortList);
@@ -943,6 +944,10 @@ create_nestloop_plan(Query *root,
otherclauses = NIL;
}
+ /* Sort clauses into best execution order */
+ joinclauses = order_qual_clauses(root, joinclauses);
+ otherclauses = order_qual_clauses(root, otherclauses);
+
join_plan = make_nestloop(tlist,
joinclauses,
otherclauses,
@@ -994,6 +999,11 @@ create_mergejoin_plan(Query *root,
mergeclauses = get_switched_clauses(best_path->path_mergeclauses,
best_path->jpath.outerjoinpath->parent->relids);
+ /* Sort clauses into best execution order */
+ /* NB: do NOT reorder the mergeclauses */
+ joinclauses = order_qual_clauses(root, joinclauses);
+ otherclauses = order_qual_clauses(root, otherclauses);
+
/*
* Create explicit sort nodes for the outer and inner join paths if
* necessary. The sort cost was already accounted for in the path.
@@ -1077,6 +1087,11 @@ create_hashjoin_plan(Query *root,
hashclauses = get_switched_clauses(best_path->path_hashclauses,
best_path->jpath.outerjoinpath->parent->relids);
+ /* Sort clauses into best execution order */
+ joinclauses = order_qual_clauses(root, joinclauses);
+ otherclauses = order_qual_clauses(root, otherclauses);
+ hashclauses = order_qual_clauses(root, hashclauses);
+
/*
* Extract the inner hash keys (right-hand operands of the
* hashclauses) to put in the Hash node.
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 9eea1c8d20e..5bf6e061572 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.159 2003/08/04 02:40:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.159.2.1 2003/09/07 04:36:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1327,7 +1327,9 @@ hash_safe_grouping(Query *parse)
Operator optup;
bool oprcanhash;
- optup = equality_oper(tle->resdom->restype, false);
+ optup = equality_oper(tle->resdom->restype, true);
+ if (!optup)
+ return false;
oprcanhash = ((Form_pg_operator) GETSTRUCT(optup))->oprcanhash;
ReleaseSysCache(optup);
if (!oprcanhash)
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index b95002ef43e..35882c6024d 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.152 2003/08/08 21:41:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.152.2.1 2003/09/07 04:36:49 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -1515,7 +1515,7 @@ eval_const_expressions_mutator(Node *node, List *active_fns)
newarray->array_typeid = arrayexpr->array_typeid;
newarray->element_typeid = arrayexpr->element_typeid;
newarray->elements = FastListValue(&newelems);
- newarray->ndims = arrayexpr->ndims;
+ newarray->multidims = arrayexpr->multidims;
if (all_const)
return (Node *) evaluate_expr((Expr *) newarray,
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index d3060b76c7a..518bba71983 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.428 2003/08/04 02:40:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.428.2.1 2003/09/07 04:36:50 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -108,6 +108,7 @@ static void doNegateFloat(Value *v);
DropBehavior dbehavior;
OnCommitAction oncommit;
List *list;
+ FastList fastlist;
Node *node;
Value *value;
ColumnRef *columnref;
@@ -115,7 +116,7 @@ static void doNegateFloat(Value *v);
TypeName *typnam;
DefElem *defelt;
- SortGroupBy *sortgroupby;
+ SortBy *sortby;
JoinExpr *jexpr;
IndexElem *ielem;
Alias *alias;
@@ -189,7 +190,7 @@ static void doNegateFloat(Value *v);
database_name access_method_clause access_method attr_name
index_name name function_name file_name
-%type <list> func_name handler_name qual_Op qual_all_Op OptUseOp
+%type <list> func_name handler_name qual_Op qual_all_Op
opt_class opt_validator
%type <range> qualified_name OptConstrFromTable
@@ -278,7 +279,7 @@ static void doNegateFloat(Value *v);
%type <value> NumericOnly FloatOnly IntegerOnly
%type <columnref> columnref
%type <alias> alias_clause
-%type <sortgroupby> sortby
+%type <sortby> sortby
%type <ielem> index_elem
%type <node> table_ref
%type <jexpr> joined_table
@@ -293,7 +294,7 @@ static void doNegateFloat(Value *v);
Bit ConstBit BitWithLength BitWithoutLength
%type <str> character
%type <str> extract_arg
-%type <str> opt_charset opt_collate
+%type <str> opt_charset
%type <ival> opt_numeric opt_decimal
%type <boolean> opt_varying opt_timezone
@@ -440,7 +441,6 @@ static void doNegateFloat(Value *v);
%right UMINUS
%left '[' ']'
%left '(' ')'
-%left COLLATE
%left TYPECAST
%left '.'
/*
@@ -1460,19 +1460,13 @@ TableElement:
| TableConstraint { $$ = $1; }
;
-columnDef: ColId Typename ColQualList opt_collate
+columnDef: ColId Typename ColQualList
{
ColumnDef *n = makeNode(ColumnDef);
n->colname = $1;
n->typename = $2;
n->constraints = $3;
n->is_local = true;
-
- if ($4 != NULL)
- ereport(NOTICE,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("CREATE TABLE / COLLATE is not yet implemented; clause ignored")));
-
$$ = (Node *)n;
}
;
@@ -3842,17 +3836,12 @@ DropdbStmt: DROP DATABASE database_name
*****************************************************************************/
CreateDomainStmt:
- CREATE DOMAIN_P any_name opt_as Typename ColQualList opt_collate
+ CREATE DOMAIN_P any_name opt_as Typename ColQualList
{
CreateDomainStmt *n = makeNode(CreateDomainStmt);
n->domainname = $3;
n->typename = $5;
n->constraints = $6;
-
- if ($7 != NULL)
- ereport(NOTICE,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("CREATE DOMAIN / COLLATE is not yet implemented; clause ignored")));
$$ = (Node *)n;
}
;
@@ -4577,21 +4566,34 @@ sortby_list:
| sortby_list ',' sortby { $$ = lappend($1, $3); }
;
-sortby: a_expr OptUseOp
+sortby: a_expr USING qual_all_Op
{
- $$ = makeNode(SortGroupBy);
+ $$ = makeNode(SortBy);
$$->node = $1;
- $$->useOp = $2;
+ $$->sortby_kind = SORTBY_USING;
+ $$->useOp = $3;
+ }
+ | a_expr ASC
+ {
+ $$ = makeNode(SortBy);
+ $$->node = $1;
+ $$->sortby_kind = SORTBY_ASC;
+ $$->useOp = NIL;
+ }
+ | a_expr DESC
+ {
+ $$ = makeNode(SortBy);
+ $$->node = $1;
+ $$->sortby_kind = SORTBY_DESC;
+ $$->useOp = NIL;
+ }
+ | a_expr
+ {
+ $$ = makeNode(SortBy);
+ $$->node = $1;
+ $$->sortby_kind = SORTBY_ASC; /* default */
+ $$->useOp = NIL;
}
- ;
-
-OptUseOp: USING qual_all_Op { $$ = $2; }
- | ASC
- { $$ = makeList1(makeString("<")); }
- | DESC
- { $$ = makeList1(makeString(">")); }
- | /*EMPTY*/
- { $$ = makeList1(makeString("<")); /*default*/ }
;
@@ -5449,11 +5451,6 @@ opt_charset:
| /*EMPTY*/ { $$ = NULL; }
;
-opt_collate:
- COLLATE ColId { $$ = $2; }
- | /*EMPTY*/ { $$ = NULL; }
- ;
-
ConstDatetime:
TIMESTAMP '(' Iconst ')' opt_timezone
{
@@ -5739,15 +5736,6 @@ qual_all_Op:
a_expr: c_expr { $$ = $1; }
| a_expr TYPECAST Typename
{ $$ = makeTypeCast($1, $3); }
- | a_expr COLLATE ColId
- {
- FuncCall *n = makeNode(FuncCall);
- n->funcname = SystemFuncName($3);
- n->args = makeList1($1);
- n->agg_star = FALSE;
- n->agg_distinct = FALSE;
- $$ = (Node *) n;
- }
| a_expr AT TIME ZONE c_expr
{
FuncCall *n = makeNode(FuncCall);
@@ -6706,8 +6694,18 @@ opt_indirection:
{ $$ = NIL; }
;
-expr_list: a_expr { $$ = makeList1($1); }
- | expr_list ',' a_expr { $$ = lappend($1, $3); }
+expr_list: a_expr
+ {
+ FastList *dst = (FastList *) &$$;
+ makeFastList1(dst, $1);
+ }
+ | expr_list ',' a_expr
+ {
+ FastList *dst = (FastList *) &$$;
+ FastList *src = (FastList *) &$1;
+ *dst = *src;
+ FastAppend(dst, $3);
+ }
;
extract_list:
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index ebc3ed23eec..48d7788b09d 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.121 2003/08/07 19:20:22 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.121.2.1 2003/09/07 04:36:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1295,7 +1295,7 @@ transformSortClause(ParseState *pstate,
foreach(olitem, orderlist)
{
- SortGroupBy *sortby = lfirst(olitem);
+ SortBy *sortby = lfirst(olitem);
TargetEntry *tle;
tle = findTargetlistEntry(pstate, sortby->node,
@@ -1303,7 +1303,9 @@ transformSortClause(ParseState *pstate,
sortlist = addTargetToSortList(pstate, tle,
sortlist, targetlist,
- sortby->useOp, resolveUnknown);
+ sortby->sortby_kind,
+ sortby->useOp,
+ resolveUnknown);
}
return sortlist;
@@ -1409,7 +1411,7 @@ transformDistinctClause(ParseState *pstate, List *distinctlist,
{
*sortClause = addTargetToSortList(pstate, tle,
*sortClause, targetlist,
- NIL, true);
+ SORTBY_ASC, NIL, true);
/*
* Probably, the tle should always have been added at the
@@ -1457,7 +1459,8 @@ addAllTargetsToSortList(ParseState *pstate, List *sortlist,
if (!tle->resdom->resjunk)
sortlist = addTargetToSortList(pstate, tle,
sortlist, targetlist,
- NIL, resolveUnknown);
+ SORTBY_ASC, NIL,
+ resolveUnknown);
}
return sortlist;
}
@@ -1478,7 +1481,8 @@ addAllTargetsToSortList(ParseState *pstate, List *sortlist,
List *
addTargetToSortList(ParseState *pstate, TargetEntry *tle,
List *sortlist, List *targetlist,
- List *opname, bool resolveUnknown)
+ int sortby_kind, List *sortby_opname,
+ bool resolveUnknown)
{
/* avoid making duplicate sortlist entries */
if (!targetIsInSortList(tle, sortlist))
@@ -1499,13 +1503,25 @@ addTargetToSortList(ParseState *pstate, TargetEntry *tle,
sortcl->tleSortGroupRef = assignSortGroupRef(tle, targetlist);
- if (opname)
- sortcl->sortop = compatible_oper_opid(opname,
- restype,
- restype,
- false);
- else
- sortcl->sortop = ordering_oper_opid(restype);
+ switch (sortby_kind)
+ {
+ case SORTBY_ASC:
+ sortcl->sortop = ordering_oper_opid(restype);
+ break;
+ case SORTBY_DESC:
+ sortcl->sortop = reverse_ordering_oper_opid(restype);
+ break;
+ case SORTBY_USING:
+ Assert(sortby_opname != NIL);
+ sortcl->sortop = compatible_oper_opid(sortby_opname,
+ restype,
+ restype,
+ false);
+ break;
+ default:
+ elog(ERROR, "unrecognized sortby_kind: %d", sortby_kind);
+ break;
+ }
sortlist = lappend(sortlist, sortcl);
}
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 64718a48699..3838999b0a8 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.160 2003/08/04 02:40:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.160.2.1 2003/09/07 04:36:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -748,7 +748,6 @@ transformExpr(ParseState *pstate, Node *expr)
List *element;
Oid array_type;
Oid element_type;
- int ndims;
/* Transform the element expressions */
foreach(element, a->elements)
@@ -781,11 +780,13 @@ transformExpr(ParseState *pstate, Node *expr)
if (array_type != InvalidOid)
{
/* Elements are presumably of scalar type */
- ndims = 1;
+ newa->multidims = false;
}
else
{
/* Must be nested array expressions */
+ newa->multidims = true;
+
array_type = element_type;
element_type = get_element_type(array_type);
if (!OidIsValid(element_type))
@@ -793,47 +794,11 @@ transformExpr(ParseState *pstate, Node *expr)
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("could not find array type for datatype %s",
format_type_be(array_type))));
-
- /*
- * make sure the element expressions all have the same
- * number of dimensions
- */
- ndims = 0;
- foreach(element, newcoercedelems)
- {
- ArrayExpr *e = (ArrayExpr *) lfirst(element);
-
- if (!IsA(e, ArrayExpr))
- ereport(ERROR,
- (errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("multidimensional ARRAY[] must be built from nested array expressions")));
- if (ndims == 0)
- ndims = e->ndims;
- else if (e->ndims != ndims)
- ereport(ERROR,
- (errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("nested array expressions must have common number of dimensions")));
- if (e->element_typeid != element_type)
- ereport(ERROR,
- (errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("nested array expressions must have common element type")));
-
- }
- /* increment the number of dimensions */
- ndims++;
-
- /* make sure we don't have too many dimensions now */
- if (ndims > MAXDIM)
- ereport(ERROR,
- (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("number of array dimensions exceeds the maximum allowed, %d",
- MAXDIM)));
}
newa->array_typeid = array_type;
newa->element_typeid = element_type;
newa->elements = newcoercedelems;
- newa->ndims = ndims;
result = (Node *) newa;
break;
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index e5d2ab2d05f..d0771920540 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.73 2003/08/04 02:40:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.73.2.1 2003/09/07 04:36:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,6 +26,7 @@
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
+#include "utils/typcache.h"
static Oid binary_oper_exact(Oid arg1, Oid arg2,
@@ -135,52 +136,49 @@ LookupOperNameTypeNames(List *opername, TypeName *oprleft,
Operator
equality_oper(Oid argtype, bool noError)
{
+ TypeCacheEntry *typentry;
+ Oid oproid;
Operator optup;
- Oid elem_type;
+
+ /*
+ * Look for an "=" operator for the datatype. We require it to be
+ * an exact or binary-compatible match, since most callers are not
+ * prepared to cope with adding any run-time type coercion steps.
+ */
+ typentry = lookup_type_cache(argtype, TYPECACHE_EQ_OPR);
+ oproid = typentry->eq_opr;
/*
* If the datatype is an array, then we can use array_eq ... but only
- * if there is a suitable equality operator for the element type. (We
- * must run this test first, since compatible_oper will find array_eq,
- * but would not notice the lack of an element operator.)
+ * if there is a suitable equality operator for the element type.
+ * (This check is not in the raw typcache.c code ... should it be?)
*/
- elem_type = get_element_type(argtype);
- if (OidIsValid(elem_type))
+ if (oproid == ARRAY_EQ_OP)
{
- optup = equality_oper(elem_type, true);
- if (optup != NULL)
+ Oid elem_type = get_element_type(argtype);
+
+ if (OidIsValid(elem_type))
{
- ReleaseSysCache(optup);
- return SearchSysCache(OPEROID,
- ObjectIdGetDatum(ARRAY_EQ_OP),
- 0, 0, 0);
+ optup = equality_oper(elem_type, true);
+ if (optup != NULL)
+ ReleaseSysCache(optup);
+ else
+ oproid = InvalidOid; /* element type has no "=" */
}
+ else
+ oproid = InvalidOid; /* bogus array type? */
}
- else
- {
- /*
- * Look for an "=" operator for the datatype. We require it to be
- * an exact or binary-compatible match, since most callers are not
- * prepared to cope with adding any run-time type coercion steps.
- */
- optup = compatible_oper(makeList1(makeString("=")),
- argtype, argtype, true);
- if (optup != NULL)
- {
- /*
- * Only believe that it's equality if it's mergejoinable,
- * hashjoinable, or uses eqsel() as oprrest.
- */
- Form_pg_operator pgopform = (Form_pg_operator) GETSTRUCT(optup);
-
- if (OidIsValid(pgopform->oprlsortop) ||
- pgopform->oprcanhash ||
- pgopform->oprrest == F_EQSEL)
- return optup;
- ReleaseSysCache(optup);
- }
+ if (OidIsValid(oproid))
+ {
+ optup = SearchSysCache(OPEROID,
+ ObjectIdGetDatum(oproid),
+ 0, 0, 0);
+ if (optup == NULL) /* should not fail */
+ elog(ERROR, "cache lookup failed for operator %u", oproid);
+ return optup;
}
+
if (!noError)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
@@ -197,53 +195,119 @@ equality_oper(Oid argtype, bool noError)
Operator
ordering_oper(Oid argtype, bool noError)
{
+ TypeCacheEntry *typentry;
+ Oid oproid;
Operator optup;
- Oid elem_type;
+
+ /*
+ * Look for a "<" operator for the datatype. We require it to be
+ * an exact or binary-compatible match, since most callers are not
+ * prepared to cope with adding any run-time type coercion steps.
+ *
+ * Note: the search algorithm used by typcache.c ensures that if a "<"
+ * operator is returned, it will be consistent with the "=" operator
+ * returned by equality_oper. This is critical for sorting and grouping
+ * purposes.
+ */
+ typentry = lookup_type_cache(argtype, TYPECACHE_LT_OPR);
+ oproid = typentry->lt_opr;
/*
* If the datatype is an array, then we can use array_lt ... but only
- * if there is a suitable ordering operator for the element type. (We
- * must run this test first, since the code below would find array_lt
- * if there's an element = operator, but would not notice the lack of
- * an element < operator.)
+ * if there is a suitable less-than operator for the element type.
+ * (This check is not in the raw typcache.c code ... should it be?)
*/
- elem_type = get_element_type(argtype);
- if (OidIsValid(elem_type))
+ if (oproid == ARRAY_LT_OP)
{
- optup = ordering_oper(elem_type, true);
- if (optup != NULL)
+ Oid elem_type = get_element_type(argtype);
+
+ if (OidIsValid(elem_type))
{
- ReleaseSysCache(optup);
- return SearchSysCache(OPEROID,
- ObjectIdGetDatum(ARRAY_LT_OP),
- 0, 0, 0);
+ optup = ordering_oper(elem_type, true);
+ if (optup != NULL)
+ ReleaseSysCache(optup);
+ else
+ oproid = InvalidOid; /* element type has no "<" */
}
+ else
+ oproid = InvalidOid; /* bogus array type? */
}
- else
+
+ if (OidIsValid(oproid))
{
- /*
- * Find the type's equality operator, and use its lsortop (it
- * *must* be mergejoinable). We use this definition because for
- * sorting and grouping purposes, it's important that the equality
- * and ordering operators are consistent.
- */
- optup = equality_oper(argtype, noError);
- if (optup != NULL)
- {
- Oid lsortop;
+ optup = SearchSysCache(OPEROID,
+ ObjectIdGetDatum(oproid),
+ 0, 0, 0);
+ if (optup == NULL) /* should not fail */
+ elog(ERROR, "cache lookup failed for operator %u", oproid);
+ return optup;
+ }
- lsortop = ((Form_pg_operator) GETSTRUCT(optup))->oprlsortop;
- ReleaseSysCache(optup);
- if (OidIsValid(lsortop))
- {
- optup = SearchSysCache(OPEROID,
- ObjectIdGetDatum(lsortop),
- 0, 0, 0);
- if (optup != NULL)
- return optup;
- }
+ if (!noError)
+ ereport(ERROR,
+ (errcode(ERRCODE_UNDEFINED_FUNCTION),
+ errmsg("could not identify an ordering operator for type %s",
+ format_type_be(argtype)),
+ errhint("Use an explicit ordering operator or modify the query.")));
+ return NULL;
+}
+
+/*
+ * reverse_ordering_oper - identify DESC sort operator (">") for a datatype
+ *
+ * On failure, return NULL if noError, else report a standard error
+ */
+Operator
+reverse_ordering_oper(Oid argtype, bool noError)
+{
+ TypeCacheEntry *typentry;
+ Oid oproid;
+ Operator optup;
+
+ /*
+ * Look for a ">" operator for the datatype. We require it to be
+ * an exact or binary-compatible match, since most callers are not
+ * prepared to cope with adding any run-time type coercion steps.
+ *
+ * Note: the search algorithm used by typcache.c ensures that if a ">"
+ * operator is returned, it will be consistent with the "=" operator
+ * returned by equality_oper. This is critical for sorting and grouping
+ * purposes.
+ */
+ typentry = lookup_type_cache(argtype, TYPECACHE_GT_OPR);
+ oproid = typentry->gt_opr;
+
+ /*
+ * If the datatype is an array, then we can use array_gt ... but only
+ * if there is a suitable greater-than operator for the element type.
+ * (This check is not in the raw typcache.c code ... should it be?)
+ */
+ if (oproid == ARRAY_GT_OP)
+ {
+ Oid elem_type = get_element_type(argtype);
+
+ if (OidIsValid(elem_type))
+ {
+ optup = reverse_ordering_oper(elem_type, true);
+ if (optup != NULL)
+ ReleaseSysCache(optup);
+ else
+ oproid = InvalidOid; /* element type has no ">" */
}
+ else
+ oproid = InvalidOid; /* bogus array type? */
}
+
+ if (OidIsValid(oproid))
+ {
+ optup = SearchSysCache(OPEROID,
+ ObjectIdGetDatum(oproid),
+ 0, 0, 0);
+ if (optup == NULL) /* should not fail */
+ elog(ERROR, "cache lookup failed for operator %u", oproid);
+ return optup;
+ }
+
if (!noError)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
@@ -286,16 +350,16 @@ ordering_oper_opid(Oid argtype)
}
/*
- * ordering_oper_funcid - convenience routine for oprfuncid(ordering_oper())
+ * reverse_ordering_oper_opid - convenience routine for oprid(reverse_ordering_oper())
*/
Oid
-ordering_oper_funcid(Oid argtype)
+reverse_ordering_oper_opid(Oid argtype)
{
Operator optup;
Oid result;
- optup = ordering_oper(argtype, false);
- result = oprfuncid(optup);
+ optup = reverse_ordering_oper(argtype, false);
+ result = oprid(optup);
ReleaseSysCache(optup);
return result;
}
diff --git a/src/backend/po/ru.po b/src/backend/po/ru.po
index f9fca185eab..10edcd01087 100644
--- a/src/backend/po/ru.po
+++ b/src/backend/po/ru.po
@@ -1,9 +1,10 @@
# ru.po
# POSTGRES Translated Messages into the Russian Language (KOI8-R)
#
-# $Header: /cvsroot/pgsql/src/backend/po/Attic/ru.po,v 1.11 2003/06/28 22:31:00 petere Exp $
+# $Header: /cvsroot/pgsql/src/backend/po/Attic/ru.po,v 1.11.2.1 2003/09/07 04:36:50 momjian Exp $
#
-# Changelog:
+# ChangeLog:
+# - July - August 23, 2003: updates for 7.4.x; <mokhov@cs.concordia.ca>
# - January 2, 2003: Fuzzy Fixes, Serguei A. Mokhov <mokhov@cs.concordia.ca>
# - October 12, 2002: Post-7.3 beta 2, Fuzzy Fixes, Serguei A. Mokhov <mokhov@cs.concordia.ca>
# - September 14, 2002: Post-7.3 beta 1, Take II, Serguei A. Mokhov <mokhov@cs.concordia.ca>
@@ -12,8297 +13,5240 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: PostgreSQL 7.3.x\n"
-"POT-Creation-Date: 2003-01-02 13:00-0500\n"
-"PO-Revision-Date: 2003-01-02 13:33-0500\n"
+"Project-Id-Version: PostgreSQL 7.4.x\n"
+"POT-Creation-Date: 2003-07-26 04:18-0300\n"
+"PO-Revision-Date: 2003-08-23 18:25-0500\n"
"Last-Translator: Serguei A. Mokhov <mokhov@cs.concordia.ca>\n"
"Language-Team: pgsql-rus <pgsql-rus@yahoogroups.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n"
-#: access/common/heaptuple.c:179
-msgid "heap_attisnull: zero attnum disallowed"
-msgstr "heap_attisnull: нулевой attnum не дозволен"
-
-#: access/common/heaptuple.c:182
-msgid "heap_attisnull: undefined negative attnum"
-msgstr "heap_attisnull: отрицательный attnum не определён"
-
-#: access/common/heaptuple.c:460
-#, c-format
-msgid "heap_getsysattr: invalid attnum %d"
-msgstr "heap_getsysattr: неверный attnum: %d"
-
-#: access/common/heaptuple.c:584
-#, c-format
-msgid "heap_formtuple: numberOfAttributes %d exceeds limit %d"
-msgstr ""
-"heap_formtuple: numberOfAttributes (число атрибутов) %d превышает лимит %d"
-
-#: access/common/heaptuple.c:687
-#, c-format
-msgid "heap_modifytuple: repl is \\%3d"
-msgstr "heap_modifytuple: значение repl: \\%3d"
-
-#: access/common/indextuple.c:55
-#, c-format
-msgid "index_formtuple: numberOfAttributes %d > %d"
-msgstr "index_formtuple: numberOfAttributes (число атрибутов) для %d > %d"
-
-#: access/common/indextuple.c:161
-#, c-format
-msgid "index_formtuple: data takes %lu bytes, max is %d"
-msgstr "index_formtuple: данные занимают %lu байт(ов), при максимуме: %d"
-
-#: access/common/tupdesc.c:420
-#, c-format
-msgid "Unable to look up type id %u"
-msgstr "Тип с ID %u не найден"
-
-#: access/common/tupdesc.c:646 executor/nodeFunctionscan.c:204
-#: parser/parse_relation.c:931 parser/parse_relation.c:1286
-#: parser/parse_relation.c:1596
-#, c-format
-msgid "Invalid typrelid for complex type %u"
-msgstr "Неверный typrelid для сложного типа %u"
-
-#: access/common/tupdesc.c:660 access/common/tupdesc.c:683
-msgid "TypeGetTupleDesc: number of aliases does not match number of attributes"
-msgstr "TypeGetTupleDesc: число алиасов не совпадает с числом атрибутов"
-
-#: access/common/tupdesc.c:679
-msgid "TypeGetTupleDesc: no column alias was provided"
-msgstr "TypeGetTupleDesc: алиасы колонок не указаны"
-
-#: access/common/tupdesc.c:698
-msgid "Unable to determine tuple description for function returning \"record\""
-msgstr ""
-"Не в состоянии определить описание строки для функции возпращающей тип "
-"\"record\""
-
-#: access/common/tupdesc.c:700 catalog/pg_proc.c:463
-#: executor/nodeFunctionscan.c:234 parser/parse_relation.c:1383
-#: parser/parse_relation.c:1637
-msgid "Unknown kind of return type specified for function"
-msgstr "Указан неизвестный тип возвращаемого значения для фунции"
-
-#: access/gist/gist.c:171 access/hash/hash.c:72 access/nbtree/nbtree.c:129
-#: access/rtree/rtree.c:128
-#, c-format
-msgid "%s already contains data"
-msgstr "%s уже содержит данные"
-
-#: access/gist/gist.c:399 access/gist/gist.c:606
-#, c-format
-msgid "gist: failed to add index item to %s"
-msgstr "gist: не получилось добавить элемент индекса к %s"
-
-#: access/gist/gist.c:1666
-#, c-format
-msgid "initGISTstate: numberOfAttributes %d > %d"
-msgstr "initGISTstate: numberOfAttributes для %d > %d"
-
-#: access/gist/gist.c:1928
+#: access/common/indextuple.c:57
#, c-format
-msgid "%sPage: %d %s blk: %d maxoff: %d free: %d"
-msgstr "%sСтр.: %d %s блк: %d макс для: %d свободно: %d"
-
-#: access/gist/gist.c:1938
-#, c-format
-msgid "%s Tuple. blk: %d size: %d"
-msgstr "%s Запись. блк: %d размер: %d"
-
-#: access/gist/gist.c:1953
-msgid "gist_redo: unimplemented"
-msgstr "gist_redo: не поддерживается"
-
-#: access/gist/gist.c:1959
-msgid "gist_undo: unimplemented"
-msgstr "gist_undo: не поддерживается"
-
-#: access/gist/gistscan.c:254
-#, c-format
-msgid "GiST scan list corrupted -- cannot find 0x%p"
-msgstr ""
-
-#: access/gist/gistscan.c:390
-#, c-format
-msgid "Bad operation in GiST scan adjust: %d"
-msgstr ""
-
-#: access/hash/hash.c:504
-msgid "hash_redo: unimplemented"
-msgstr "hash_redo: ещё не сделано"
-
-#: access/hash/hash.c:510
-msgid "hash_undo: unimplemented"
-msgstr "hash_undo: ещё не сделано"
-
-#: access/hash/hashinsert.c:51
-msgid "Hash indices valid for only one index key."
-msgstr ""
-
-#: access/hash/hashinsert.c:166
-msgid "hash item too large"
-msgstr ""
-
-#: access/hash/hashinsert.c:231
-#, c-format
-msgid "_hash_pgaddtup: failed to add index item to %s"
-msgstr "_hash_pgaddtup: не удалось добавить элемент индекса к %s"
-
-#: access/hash/hashovfl.c:61
-msgid "_hash_addovflpage: problem with _hash_getovfladdr."
-msgstr "_hash_addovflpage: проблема с _hash_getovfladdr."
-
-#: access/hash/hashovfl.c:196
-msgid "overflow_page: problem with _hash_initbitmap."
-msgstr "overflow_page: проблема с _hash_initbitmap."
-
-#: access/hash/hashovfl.c:568
-#, c-format
-msgid "_hash_squeezebucket: failed to add index item to %s"
-msgstr "_hash_squeezebucket: не удалось добавить элемент индекса к %s"
-
-#: access/hash/hashpage.c:93
-#, c-format
-msgid "Cannot initialize non-empty hash table %s"
-msgstr ""
-
-#: access/hash/hashpage.c:151
-msgid "Problem with _hash_initbitmap."
-msgstr "Проблема с _hash_initbitmap."
-
-#: access/hash/hashpage.c:196
-msgid "_hash_getbuf: internal error: hash AM does not use P_NEW"
-msgstr ""
+msgid "number of index attributes %d exceeds limit, %d"
+msgstr "число идексированных атрибутов: %d превышает лимит: %d"
-#: access/hash/hashpage.c:204
+#: access/common/indextuple.c:165
#, c-format
-msgid "_hash_getbuf: invalid access (%d) on new blk: %s"
-msgstr ""
-
-#: access/hash/hashpage.c:231
-#, c-format
-msgid "_hash_relbuf: invalid access (%d) on blk %x: %s"
-msgstr ""
-
-#: access/hash/hashpage.c:290
-#, c-format
-msgid "_hash_chgbufaccess: invalid access (%d) on blk %x: %s"
-msgstr ""
-
-#: access/hash/hashpage.c:325
-#, c-format
-msgid "_hash_setpagelock: invalid access (%d) on blk %x: %s"
-msgstr ""
-
-#: access/hash/hashpage.c:349
-#, c-format
-msgid "_hash_unsetpagelock: invalid access (%d) on blk %x: %s"
-msgstr ""
-
-#: access/hash/hashpage.c:537 access/hash/hashpage.c:674
-#, c-format
-msgid "_hash_splitpage: empty overflow page %d"
-msgstr ""
-
-#: access/hash/hashpage.c:576
-#, c-format
-msgid "_hash_splitpage: empty ovfl page %d!"
-msgstr ""
-
-#: access/hash/hashpage.c:629
-#, c-format
-msgid "_hash_splitpage: failed to add index item to %s"
-msgstr ""
-
-#: access/hash/hashscan.c:105
-#, c-format
-msgid "hash scan list trashed; can't find 0x%p"
-msgstr ""
-
-#: access/hash/hashutil.c:81
-msgid "hash indices cannot include null keys"
-msgstr ""
-
-#: access/heap/tuptoaster.c:899
-msgid "Failed to build TOAST tuple"
-msgstr ""
-
-#: access/heap/tuptoaster.c:915
-msgid "Failed to insert index entry for TOAST tuple"
-msgstr ""
-
-#: access/heap/tuptoaster.c:1074 access/heap/tuptoaster.c:1254
-#, c-format
-msgid "unexpected chunk number %d (expected %d) for toast value %u"
-msgstr ""
-
-#: access/heap/tuptoaster.c:1080 access/heap/tuptoaster.c:1087
-#: access/heap/tuptoaster.c:1260 access/heap/tuptoaster.c:1267
-#, c-format
-msgid "unexpected chunk size %d in chunk %d for toast value %u"
-msgstr ""
-
-#: access/heap/tuptoaster.c:1092
-#, c-format
-msgid "unexpected chunk number %d for toast value %u"
-msgstr ""
-
-#: access/heap/tuptoaster.c:1110 access/heap/tuptoaster.c:1294
-#, c-format
-msgid "missing chunk number %d for toast value %u"
-msgstr ""
-
-#: access/heap/heapam.c:144
-#, c-format
-msgid "heapgettup(%s, tid=0x%x[%d,%d], dir=%d, ...)"
-msgstr ""
-
-#: access/heap/heapam.c:150
-#, c-format
-msgid "heapgettup(%s, tid=0x%x, dir=%d, ...)"
-msgstr ""
-
-#: access/heap/heapam.c:153
-#, c-format
-msgid "heapgettup(..., b=0x%x, nkeys=%d, key=0x%x"
-msgstr ""
-
-#: access/heap/heapam.c:155
-#, c-format
-msgid "heapgettup: relation(%c)=`%s', %p"
-msgstr ""
-
-#: access/heap/heapam.c:203 access/heap/heapam.c:238 access/heap/heapam.c:278
-#: access/heap/heapam.c:372
-msgid "heapgettup: failed ReadBuffer"
-msgstr "heapgettup: ReadBuffer не удался"
+msgid "index tuple requires %lu bytes, maximum size is %lu"
+msgstr "строка индекса требуеи байт: %lu, при максимуме: %lu"
-#: access/heap/heapam.c:474
-#, c-format
-msgid "Relation %u does not exist"
-msgstr ""
-
-#: access/heap/heapam.c:553 catalog/namespace.c:189 tcop/utility.c:154
-#, c-format
-msgid "Relation \"%s\" does not exist"
-msgstr ""
-
-#: access/heap/heapam.c:605 access/heap/heapam.c:634 access/heap/heapam.c:663
-#, c-format
-msgid "%s is an index relation"
-msgstr ""
-
-#: access/heap/heapam.c:608 access/heap/heapam.c:637 access/heap/heapam.c:666
-#, c-format
-msgid "%s is a special relation"
-msgstr ""
-
-#: access/heap/heapam.c:611 access/heap/heapam.c:640 access/heap/heapam.c:669
-#, c-format
-msgid "%s is a composite type"
-msgstr ""
-
-#: access/heap/heapam.c:698
-msgid "heap_beginscan: !RelationIsValid(relation)"
-msgstr ""
-
-#: access/heap/heapam.c:812
-#, c-format
-msgid "heap_getnext([%s,nkeys=%d],dir=%d) called"
-msgstr ""
-
-#: access/heap/heapam.c:816
-msgid "heap_getnext returning EOS"
-msgstr "heap_getnext возращает EOS"
-
-#: access/heap/heapam.c:819
-msgid "heap_getnext returning tuple"
-msgstr ""
-
-#: access/heap/heapam.c:842
-msgid "heap_getnext: NULL relscan"
-msgstr ""
-
-#: access/heap/heapam.c:932
-#, c-format
-msgid "heap_fetch: ReadBuffer(%s, %lu) failed"
-msgstr "heap_fetch: ReadBuffer(%s, %lu) не удался"
-
-#: access/heap/heapam.c:1042
-#, c-format
-msgid "heap_get_latest_tid: %s relation: ReadBuffer(%lx) failed"
-msgstr ""
-
-#: access/heap/heapam.c:1284
-msgid "heap_delete: failed ReadBuffer"
-msgstr "heap_delete: ReadBuffer не удался"
-
-#: access/heap/heapam.c:1303
-msgid "heap_delete: (am)invalid tid"
-msgstr ""
-
-#: access/heap/heapam.c:1436
-msgid "simple_heap_delete: tuple already updated by self"
-msgstr ""
-
-#: access/heap/heapam.c:1444
-msgid "simple_heap_delete: tuple concurrently updated"
-msgstr ""
-
-#: access/heap/heapam.c:1448 executor/execMain.c:1324
-#, c-format
-msgid "Unknown status %u from heap_delete"
-msgstr ""
-
-#: access/heap/heapam.c:1482
-msgid "heap_update: failed ReadBuffer"
-msgstr "heap_update: ReadBuffer не удался"
-
-#: access/heap/heapam.c:1507
-msgid "heap_update: (am)invalid tid"
-msgstr ""
-
-#: access/heap/heapam.c:1770
-msgid "simple_heap_update: tuple already updated by self"
-msgstr ""
-
-#: access/heap/heapam.c:1778
-msgid "simple_heap_update: tuple concurrently updated"
-msgstr ""
-
-#: access/heap/heapam.c:1782 executor/execMain.c:1462
-#, c-format
-msgid "Unknown status %u from heap_update"
-msgstr ""
-
-#: access/heap/heapam.c:1806
-msgid "heap_mark4update: failed ReadBuffer"
-msgstr "heap_mark4update: ReadBuffer не удался"
-
-#: access/heap/heapam.c:1823
-msgid "heap_mark4update: (am)invalid tid"
-msgstr ""
-
-#: access/heap/heapam.c:2123
-msgid "heap_clean_redo: no block"
-msgstr ""
-
-#: access/heap/heapam.c:2127
-msgid "heap_clean_redo: uninitialized page"
-msgstr ""
-
-#: access/heap/heapam.c:2185
-#, c-format
-msgid "heap_delete_%sdo: no block"
-msgstr ""
-
-#: access/heap/heapam.c:2189
-#, c-format
-msgid "heap_delete_%sdo: uninitialized page"
-msgstr ""
-
-#: access/heap/heapam.c:2201
-msgid "heap_delete_undo: bad page LSN"
-msgstr ""
-
-#: access/heap/heapam.c:2208
-#, c-format
-msgid "heap_delete_%sdo: invalid lp"
-msgstr "heap_delete_%sdo: не верный lp"
-
-#: access/heap/heapam.c:2228
-msgid "heap_delete_undo: unimplemented"
-msgstr ""
-
-#: access/heap/heapam.c:2256
-#, c-format
-msgid "heap_insert_%sdo: uninitialized page"
-msgstr ""
-
-#: access/heap/heapam.c:2280
-msgid "heap_insert_redo: invalid max offset number"
-msgstr ""
-
-#: access/heap/heapam.c:2304
-msgid "heap_insert_redo: failed to add tuple"
-msgstr ""
-
-#: access/heap/heapam.c:2314
-msgid "heap_insert_undo: bad page LSN"
-msgstr ""
-
-#: access/heap/heapam.c:2316
-msgid "heap_insert_undo: unimplemented"
-msgstr ""
-
-#: access/heap/heapam.c:2347
-#, c-format
-msgid "heap_update_%sdo: no block"
-msgstr "heap_update_%sdo: нет блока"
-
-#: access/heap/heapam.c:2351
-#, c-format
-msgid "heap_update_%sdo: uninitialized old page"
-msgstr ""
-
-#: access/heap/heapam.c:2365
-msgid "heap_update_undo: bad old tuple page LSN"
-msgstr ""
-
-#: access/heap/heapam.c:2372
-#, c-format
-msgid "heap_update_%sdo: invalid lp"
-msgstr ""
-
-#: access/heap/heapam.c:2407 access/heap/heapam.c:2507
-msgid "heap_update_undo: unimplemented"
-msgstr ""
-
-#: access/heap/heapam.c:2428
-#, c-format
-msgid "heap_update_%sdo: uninitialized page"
-msgstr ""
-
-#: access/heap/heapam.c:2452
-msgid "heap_update_redo: invalid max offset number"
-msgstr ""
-
-#: access/heap/heapam.c:2496
-msgid "heap_update_redo: failed to add tuple"
-msgstr ""
-
-#: access/heap/heapam.c:2505
-msgid "heap_update_undo: bad new tuple page LSN"
-msgstr ""
-
-#: access/heap/heapam.c:2523
-msgid "_heap_unlock_tuple: can't open relation"
-msgstr ""
-
-#: access/heap/heapam.c:2528
-msgid "_heap_unlock_tuple: can't read buffer"
-msgstr ""
-
-#: access/heap/heapam.c:2532
-msgid "_heap_unlock_tuple: uninitialized page"
-msgstr ""
-
-#: access/heap/heapam.c:2536
-msgid "_heap_unlock_tuple: invalid itemid"
-msgstr ""
-
-#: access/heap/heapam.c:2540
-msgid "_heap_unlock_tuple: unused/deleted tuple in rollback"
-msgstr ""
-
-#: access/heap/heapam.c:2545
-msgid "_heap_unlock_tuple: invalid xmax in rollback"
-msgstr ""
-
-#: access/heap/heapam.c:2569
-#, c-format
-msgid "heap_redo: unknown op code %u"
-msgstr ""
-
-#: access/heap/heapam.c:2589
-#, c-format
-msgid "heap_undo: unknown op code %u"
-msgstr ""
-
-#: access/heap/hio.c:53
-msgid "RelationPutHeapTuple: failed to add tuple"
-msgstr ""
-
-#: access/heap/hio.c:113
-#, c-format
-msgid "Tuple is too big: size %lu, max size %ld"
-msgstr ""
-
-#: access/heap/hio.c:277
-#, c-format
-msgid "Tuple is too big: size %lu"
-msgstr ""
-
-#: access/index/indexam.c:91 access/index/indexam.c:100
-#, c-format
-msgid "index_%s: invalid %s regproc"
-msgstr ""
-
-#: access/index/indexam.c:131 access/index/indexam.c:154
-#: access/index/indexam.c:177
-#, c-format
-msgid "%s is not an index relation"
-msgstr ""
-
-#: access/index/indexam.c:652
-#, c-format
-msgid "Missing support function %d for attribute %d of index %s"
-msgstr ""
-
-#: access/index/genam.c:74
-msgid "RelationGetIndexScan: relation invalid"
-msgstr ""
-
-#: access/index/genam.c:136
-msgid "IndexScanEnd: invalid scan"
-msgstr ""
-
-#: access/index/istrat.c:238
-#, c-format
-msgid "StrategyTermEvaluate: impossible case %d"
-msgstr ""
-
-#: access/index/istrat.c:313
-#, c-format
-msgid "RelationGetStrategy: impossible case %d"
-msgstr ""
-
-#: access/index/istrat.c:319
-msgid "RelationGetStrategy: corrupted evaluation"
-msgstr ""
-
-#: access/index/istrat.c:438
-#, c-format
-msgid "RelationInvokeStrategy: cannot evaluate strategy %d"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:250
-#, c-format
-msgid "Cannot insert a duplicate key into unique index %s"
-msgstr "Не возможно вставить повторный ключ в уникальный индекс %s"
-
-#: access/nbtree/nbtinsert.c:389
-#, c-format
-msgid "btree: index item size %lu exceeds maximum %lu"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:525
-msgid "btree: concurrent ROOT page split"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:535
-#, c-format
-msgid "bt_insertonpg[%s]: no root page found"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:538
-#, c-format
-msgid "bt_insertonpg[%s]: root page unfound - fixing upper levels"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:585
-#, c-format
-msgid ""
-"_bt_getstackbuf: my bits moved right off the end of the world!\n"
-"\tRecreate index %s."
-msgstr ""
-"_bt_getstackbuf: моя крыша съехала и рассыпалась на битики!\n"
-"\tПересоздайте индекс %s."
-
-#: access/nbtree/nbtinsert.c:588
-#, c-format
-msgid "bt_insertonpg[%s]: parent page unfound - fixing branch"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:756
-msgid "btree: failed to add hikey to the right sibling"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:782
-msgid "btree: failed to add hikey to the left sibling"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1112
-#, c-format
-msgid "_bt_findsplitloc: can't find a feasible split point for %s"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1339
-msgid "btree: failed to add leftkey to new root page"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1356
-msgid "btree: failed to add rightkey to new root page"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1442
-msgid "bt_fixroot: not valid old root page"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1573
-#, c-format
-msgid "bt_fixtree[%s]: invalid start page (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1599
-#, c-format
-msgid "bt_fixtree[%s]: fixing root page"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1647
-#, c-format
-msgid "bt_fixlevel[%s]: invalid maxoff on start page (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1654
-#, c-format
-msgid ""
-"bt_fixtlevel[%s]: non-leftmost child page of leftmost parent (need to "
-"recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1657
-#, c-format
-msgid "bt_fixtlevel[%s]: invalid start child (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1683
-#, c-format
-msgid "bt_fixlevel[%s]: invalid item order(1) (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1715
-#, c-format
-msgid "bt_fixlevel[%s]: pointer disappeared (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1734
-#, c-format
-msgid "bt_fixlevel[%s]: invalid item order(2) (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1748
-#, c-format
-msgid "bt_fixlevel[%s]: invalid item order(3) (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1878
-#, c-format
-msgid "bt_fixbranch[%s]: left pointer unfound (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1885
-#, c-format
-msgid "bt_fixbranch[%s]: invalid item order (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1894
-#, c-format
-msgid "bt_fixbranch[%s]: right pointer unfound(1) (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1902
-#, c-format
-msgid "bt_fixbranch[%s]: right pointer unfound(2) (need to recreate index)"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1950
-#, c-format
-msgid "bt_fixbranch[%s]: fixing upper levels"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1981
-#, c-format
-msgid "bt_fixup[%s]: checking/fixing upper levels"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:1996
-#, c-format
-msgid "bt_fixup[%s]: fixing root page"
-msgstr ""
-
-#: access/nbtree/nbtinsert.c:2059
-#, c-format
-msgid "btree: failed to add item to the %s for %s"
-msgstr ""
-
-#: access/nbtree/nbtpage.c:66
-#, c-format
-msgid "Cannot initialize non-empty btree %s"
-msgstr ""
-
-#: access/nbtree/nbtpage.c:127
-#, c-format
-msgid "Index %s is not a btree"
-msgstr ""
-
-#: access/nbtree/nbtpage.c:131
-#, c-format
-msgid "Version mismatch on %s: version %d file, version %d code"
-msgstr ""
-
-#: access/nbtree/nbtpage.c:258
-#, c-format
-msgid "bt_getroot[%s]: fixing root page"
-msgstr ""
-
-#: access/nbtree/nbtree.c:806
-#, c-format
-msgid ""
-"_bt_restscan: my bits moved right off the end of the world!\n"
-"\tRecreate index %s."
-msgstr ""
-
-#: access/nbtree/nbtree.c:836
-msgid "_bt_restore_page: can't add item to page"
-msgstr ""
-
-#: access/nbtree/nbtree.c:859
-msgid "btree_delete_redo: block unfound"
-msgstr ""
-
-#: access/nbtree/nbtree.c:862
-msgid "btree_delete_redo: uninitialized page"
-msgstr ""
-
-#: access/nbtree/nbtree.c:898
-#, c-format
-msgid "btree_insert_%sdo: block unfound"
-msgstr ""
-
-#: access/nbtree/nbtree.c:901
-#, c-format
-msgid "btree_insert_%sdo: uninitialized page"
-msgstr ""
-
-#: access/nbtree/nbtree.c:915
-msgid "btree_insert_redo: failed to add item"
-msgstr ""
-
-#: access/nbtree/nbtree.c:924
-msgid "btree_insert_undo: bad page LSN"
-msgstr ""
-
-#: access/nbtree/nbtree.c:932
-msgid "btree_insert_undo: unimplemented"
-msgstr ""
-
-#: access/nbtree/nbtree.c:959
-#, c-format
-msgid "btree_split_%s: lost left sibling"
-msgstr ""
-
-#: access/nbtree/nbtree.c:965
-msgid "btree_split_undo: uninitialized left sibling"
-msgstr ""
-
-#: access/nbtree/nbtree.c:988
-msgid "btree_split_undo: bad left sibling LSN"
-msgstr ""
-
-#: access/nbtree/nbtree.c:989 access/nbtree/nbtree.c:1028
-msgid "btree_split_undo: unimplemented"
-msgstr ""
-
-#: access/nbtree/nbtree.c:997
-#, c-format
-msgid "btree_split_%s: lost right sibling"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1003
-msgid "btree_split_undo: uninitialized right sibling"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1027
-msgid "btree_split_undo: bad right sibling LSN"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1041
-msgid "btree_split_redo: lost next right page"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1045
-msgid "btree_split_redo: uninitialized next right page"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1082
-msgid "btree_newroot_redo: no root page"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1085
-msgid "btree_newroot_redo: no metapage"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1139
-#, c-format
-msgid "btree_redo: unknown op code %u"
-msgstr ""
-
-#: access/nbtree/nbtree.c:1159
-#, c-format
-msgid "btree_undo: unknown op code %u"
-msgstr ""
-
-#: access/nbtree/nbtsearch.c:545
-msgid "_bt_first: btree doesn't support is(not)null, yet"
-msgstr ""
-
-#: access/nbtree/nbtsearch.c:693
-msgid "_bt_first: equal items disappeared?"
-msgstr ""
-
-#: access/nbtree/nbtsearch.c:1004
+#: access/common/heaptuple.c:584
#, c-format
-msgid "Illegal scan direction %d"
-msgstr ""
-
-#: access/nbtree/nbtsort.c:288
-msgid "btree: failed to add item to the page in _bt_sort"
-msgstr ""
+msgid "number of attributes %d exceeds limit, %d"
+msgstr "число атрибутов: %d превышает лимит: %d"
-#: access/nbtree/nbtsort.c:353
+#: access/common/printtup.c:279
+#: tcop/fastpath.c:187
+#: tcop/fastpath.c:517
+#: tcop/postgres.c:1430
#, c-format
-msgid "btree: index item size %lu exceeds maximum %ld"
-msgstr ""
+msgid "unsupported format code: %d"
+msgstr "неподдерживаемый код формата: %d"
-#: access/nbtree/nbtutils.c:230
-msgid "_bt_orderkeys: key(s) for attribute 1 missed"
-msgstr ""
+#: access/common/tupdesc.c:660
+#: access/common/tupdesc.c:687
+msgid "number of aliases does not match number of attributes"
+msgstr "число алиасов не совпадает с числом атрибутов"
-#: access/nbtree/nbtutils.c:308
-#, c-format
-msgid "_bt_orderkeys: key(s) for attribute %d missed"
-msgstr ""
-
-#: access/nbtree/nbtutils.c:465
-#, c-format
-msgid "_bt_getstrategynumber: unable to identify operator %u"
-msgstr ""
+#: access/common/tupdesc.c:681
+msgid "no column alias was provided"
+msgstr "алиас колонки не указан"
-#: access/rtree/rtree.c:331
-#, c-format
-msgid "rtdoinsert: failed to add index item to %s"
-msgstr ""
+#: access/common/tupdesc.c:704
+msgid "could not determine tuple description for function returning record"
+msgstr "не в состоянии определить описание строки для функции возпращающей запись"
-#: access/rtree/rtree.c:523 access/rtree/rtree.c:547
+#: access/hash/hashovfl.c:166
+#: access/hash/hashovfl.c:185
+#: access/hash/hashovfl.c:208
+#: access/hash/hashovfl.c:254
#, c-format
-msgid "rtdosplit: failed to add index item to %s"
+msgid "out of overflow pages in hash index \"%s\""
msgstr ""
-#: access/rtree/rtree.c:643
-msgid "Variable-length rtree keys are not supported."
+#: access/hash/hashutil.c:83
+msgid "hash indexes cannot include null keys"
msgstr ""
-#: access/rtree/rtree.c:663
+#: access/heap/heapam.c:580
+#: access/heap/heapam.c:615
+#: access/heap/heapam.c:650
#, c-format
-msgid "rtintinsert: failed to add index item to %s"
-msgstr ""
-
-#: access/rtree/rtree.c:689 access/rtree/rtree.c:694
-#, c-format
-msgid "rtnewroot: failed to add index item to %s"
-msgstr ""
+msgid "\"%s\" is an index relation"
+msgstr "\"%s\" является индексом"
-#: access/rtree/rtree.c:781
+#: access/heap/heapam.c:585
+#: access/heap/heapam.c:620
+#: access/heap/heapam.c:655
#, c-format
-msgid "rtree: index item size %lu exceeds maximum %lu"
-msgstr ""
-
-#: access/rtree/rtree.c:1068
-msgid "rtpicksplit: failed to find a workable page split"
-msgstr ""
-
-#: access/rtree/rtree.c:1347
-msgid "rtree_redo: unimplemented"
-msgstr ""
-
-#: access/rtree/rtree.c:1353
-msgid "rtree_undo: unimplemented"
-msgstr ""
+msgid "\"%s\" is a special relation"
+msgstr "\"%s\" является специальной связью"
-#: access/rtree/rtscan.c:255
+#: access/heap/heapam.c:590
+#: access/heap/heapam.c:625
+#: access/heap/heapam.c:660
#, c-format
-msgid "rtree scan list corrupted -- cannot find 0x%p"
-msgstr ""
+msgid "\"%s\" is a composite type"
+msgstr "\"%s\" являтся сложным типом"
-#: access/rtree/rtscan.c:391
+#: access/heap/hio.c:109
#, c-format
-msgid "Bad operation in rtree scan adjust: %d"
+msgid "tuple is too big: size %lu, maximum size %lu"
msgstr ""
-#: access/transam/clog.c:546 access/transam/clog.c:598
+#: access/index/indexam.c:134
+#: access/index/indexam.c:159
+#: access/index/indexam.c:184
#, c-format
-msgid "open of %s failed: %m"
-msgstr "не удалось открыть %s: %m"
+msgid "\"%s\" is not an index relation"
+msgstr "\"%s\" не является индексом"
-#: access/transam/clog.c:547
+#: access/nbtree/nbtinsert.c:242
#, c-format
-msgid "clog file %s doesn't exist, reading as zeroes"
+msgid "duplicate key violates UNIQUE constraint \"%s\""
msgstr ""
-#: access/transam/clog.c:553 access/transam/clog.c:606
+#: access/nbtree/nbtinsert.c:394
+#: access/nbtree/nbtsort.c:402
#, c-format
-msgid "lseek of clog file %u, offset %u failed: %m"
+msgid "index tuple size %lu exceeds btree maximum, %lu"
msgstr ""
-#: access/transam/clog.c:558
+#: access/nbtree/nbtpage.c:150
+#: access/nbtree/nbtpage.c:329
#, c-format
-msgid "read of clog file %u, offset %u failed: %m"
-msgstr ""
+msgid "index \"%s\" is not a btree"
+msgstr "индекс \"%s\" не является b-деревом"
-#: access/transam/clog.c:602 access/transam/xlog.c:1378
+#: access/nbtree/nbtpage.c:156
+#: access/nbtree/nbtpage.c:335
#, c-format
-msgid "creation of file %s failed: %m"
+msgid "version mismatch in \"%s\": file version %d, code version %d"
msgstr ""
-#: access/transam/clog.c:615
-#, c-format
-msgid "write of clog file %u, offset %u failed: %m"
+#: access/rtree/rtree.c:645
+msgid "variable-length rtree keys are not supported"
msgstr ""
-#: access/transam/clog.c:834
-msgid "unable to truncate commit log: apparent wraparound"
-msgstr ""
-
-#: access/transam/clog.c:889
+#: access/rtree/rtree.c:785
#, c-format
-msgid "could not open transaction-commit log directory (%s): %m"
+msgid "index tuple size %lu exceeds rtree maximum, %lu"
msgstr ""
-#: access/transam/clog.c:905
-#, c-format
-msgid "removing commit log file %s"
-msgstr "удаление commit-лог-файла %s"
-
-#: access/transam/clog.c:914
-#, c-format
-msgid "could not read transaction-commit log directory (%s): %m"
-msgstr ""
-
-#: access/transam/xact.c:412
-msgid "You may only have 2^32-1 commands per transaction"
-msgstr "Вы можете иметь до 2^32-1 команд в одной транзакции"
-
-#: access/transam/xact.c:702
-#, c-format
-msgid "RecordTransactionAbort: xact %u already committed"
-msgstr ""
-
-#: access/transam/xact.c:917
-msgid "CommitTransaction and not in in-progress state"
-msgstr ""
-
-#: access/transam/xact.c:1058
-msgid "AbortTransaction and not in in-progress state"
-msgstr ""
-
-#: access/transam/xact.c:1143
-msgid "CleanupTransaction and not in abort state"
-msgstr ""
-
-#: access/transam/xact.c:1175
-msgid "StartTransactionCommand: can't prevent chain"
-msgstr "StartTransactionCommand: не в состоянии предотвратить цепочку"
-
-#: access/transam/xact.c:1194
-msgid "StartTransactionCommand: unexpected TBLOCK_BEGIN"
-msgstr "StartTransactionCommand: неожиданный TBLOCK_BEGIN"
-
-#: access/transam/xact.c:1215
-msgid "StartTransactionCommand: unexpected TBLOCK_END"
-msgstr "StartTransactionCommand: неожиданный TBLOCK_END"
-
-#: access/transam/xact.c:1238
-msgid "StartTransactionCommand: unexpected TBLOCK_ENDABORT"
-msgstr "StartTransactionCommand: неожиданный TBLOCK_ENDABORT"
+#: access/transam/xact.c:405
+msgid "cannot have more than 2^32-1 commands in a transaction"
+msgstr "нелтьзя иметь более 2^32-1 команд в одной транзакции"
#. translator: %s represents an SQL statement name
-#: access/transam/xact.c:1454
+#: access/transam/xact.c:1374
#, c-format
msgid "%s cannot run inside a transaction block"
msgstr "%s не может выполняться внутри транзакционного блока"
#. translator: %s represents an SQL statement name
-#: access/transam/xact.c:1464
+#: access/transam/xact.c:1386
#, c-format
msgid "%s cannot be executed from a function"
msgstr "%s не может выполняться внутри функции"
-#: access/transam/xact.c:1468
-msgid "PreventTransactionChain: can't prevent chain"
-msgstr "PreventTransactionChain: не в состоянии предотвратить цепочку"
-
-#. translator: %s represents an SQL statement name
-#: access/transam/xact.c:1475
-#, c-format
-msgid "%s will be committed automatically"
-msgstr ""
-
#. translator: %s represents an SQL statement name
-#: access/transam/xact.c:1519
+#: access/transam/xact.c:1429
#, c-format
-msgid "%s may only be used in begin/end transaction blocks"
-msgstr ""
-
-#: access/transam/xact.c:1541
-msgid "BEGIN: already a transaction in progress"
-msgstr "BEGIN: транзакция уже в процессе выполнения"
+msgid "%s may only be used in BEGIN/END transaction blocks"
+msgstr "%s может выполняться только внутри транзакционного блока BEGIN/END"
-#: access/transam/xact.c:1605
-msgid "COMMIT: no transaction in progress"
-msgstr "COMMIT: нет транзакции в процессе выполнения"
+#: access/transam/xact.c:1452
+msgid "there is already a transaction in progress"
+msgstr "транзакция уже в процессе выполнения"
-#: access/transam/xact.c:1642 access/transam/xact.c:1689
-msgid "ROLLBACK: no transaction in progress"
-msgstr "ROLLBACK: нет транзакции в процессе выполнения"
+#: access/transam/xact.c:1514
+#: access/transam/xact.c:1552
+#: access/transam/xact.c:1600
+msgid "there is no transaction in progress"
+msgstr "нет транзакции в процессе выполнения"
-#: access/transam/xact.c:1768 access/transam/xact.c:1779
+#: access/transam/slru.c:492
#, c-format
-msgid "xact_redo: unknown op code %u"
-msgstr "xact_redo: неизвестный код операции: %u"
-
-#: access/transam/xact.c:1777
-msgid "xact_undo: can't undo committed xaction"
-msgstr ""
+msgid "file \"%s\" doesn't exist, reading as zeroes"
+msgstr "файл \"%s\" не существует, читается как нули"
-#: access/transam/xact.c:1814
-msgid "XactPushRollback: already installed"
+#: access/transam/slru.c:613
+#: access/transam/slru.c:620
+#: access/transam/slru.c:627
+#: access/transam/slru.c:634
+#: access/transam/slru.c:641
+#, c-format
+msgid "could not access status of transaction %u"
msgstr ""
-#: access/transam/xlog.c:505
+#: access/transam/slru.c:614
#, c-format
-msgid "XLogInsert: invalid info mask %02X"
-msgstr ""
+msgid "open of file \"%s\" failed: %m"
+msgstr "не удалось открыть \"%s\": %m"
-#: access/transam/xlog.c:610
+#: access/transam/slru.c:621
+#: access/transam/xlog.c:1387
#, c-format
-msgid "XLogInsert: can backup %d blocks at most"
-msgstr ""
+msgid "creation of file \"%s\" failed: %m"
+msgstr "не удалось создать файл \"%s\": %m"
-#: access/transam/xlog.c:628
+#: access/transam/slru.c:628
#, c-format
-msgid "XLogInsert: invalid record length %u"
-msgstr ""
+msgid "lseek of file \"%s\", offset %u failed: %m"
+msgstr "не удалось выполнить lseek() для файла \"%s\", смещение %u: %m"
-#: access/transam/xlog.c:785 access/transam/xlog.c:2625 scan.l:36
-#: utils/adt/name.c:52 utils/adt/varchar.c:83 utils/adt/varchar.c:357
-#: utils/adt/varlena.c:226
+#: access/transam/slru.c:635
#, c-format
-msgid "%s"
-msgstr "%s"
+msgid "read of file \"%s\", offset %u failed: %m"
+msgstr "не удалось считать файл \"%s\", смещение %u: %m"
-#: access/transam/xlog.c:1029
+#: access/transam/slru.c:642
#, c-format
-msgid "XLogWrite: write request %X/%X is past end of log %X/%X"
-msgstr ""
+msgid "write of file \"%s\", offset %u failed: %m"
+msgstr "не удалось записать файл \"%s\", смещение %u: %m"
-#: access/transam/xlog.c:1046 access/transam/xlog.c:1156
-#: access/transam/xlog.c:3329
+#: access/transam/slru.c:820
#, c-format
-msgid "close of log file %u, segment %u failed: %m"
+msgid "could not truncate \"%s\": apparent wraparound"
msgstr ""
-#: access/transam/xlog.c:1081
-msgid "XLogWrite: time for a checkpoint, signaling postmaster"
-msgstr ""
+#: access/transam/slru.c:879
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "не получилось отктрыть директорию \"%s\": %m"
-#: access/transam/xlog.c:1100
+#: access/transam/slru.c:895
#, c-format
-msgid "lseek of log file %u, segment %u, offset %u failed: %m"
-msgstr ""
+msgid "removing file \"%s/%s\""
+msgstr "удаление файла \"%s/%s\""
-#: access/transam/xlog.c:1112
+#: access/transam/slru.c:907
#, c-format
-msgid "write of log file %u, segment %u, offset %u failed: %m"
-msgstr ""
+msgid "could not read directory \"%s\": %m"
+msgstr "не получилось cчитать директорию \"%s\": %m"
-#: access/transam/xlog.c:1208
+#: access/transam/xlog.c:1049
+#: access/transam/xlog.c:1165
+#: access/transam/xlog.c:3555
#, c-format
-msgid "XLogFlush%s%s: request %X/%X; write %X/%X; flush %X/%X"
+msgid "close of log file %u, segment %u failed: %m"
msgstr ""
-#: access/transam/xlog.c:1313
+#: access/transam/xlog.c:1105
+#: access/transam/xlog.c:1867
#, c-format
-msgid "XLogFlush: request %X/%X is not satisfied --- flushed only to %X/%X"
+msgid "lseek of log file %u, segment %u, offset %u failed: %m"
msgstr ""
-#: access/transam/xlog.c:1356 access/transam/xlog.c:1437
-#: access/transam/xlog.c:1547 access/transam/xlog.c:1551
+#: access/transam/xlog.c:1119
#, c-format
-msgid "open of %s (log file %u, segment %u) failed: %m"
-msgstr "не удалось открыть %s (лог-файл: %u, сегмент: %u): %m"
+msgid "write of log file %u, segment %u, offset %u failed: %m"
+msgstr ""
-#: access/transam/xlog.c:1405
+#: access/transam/xlog.c:1363
+#: access/transam/xlog.c:1452
+#: access/transam/xlog.c:1566
+#: access/transam/xlog.c:1572
#, c-format
-msgid "ZeroFill failed to write %s: %m"
-msgstr ""
+msgid "open of \"%s\" (log file %u, segment %u) failed: %m"
+msgstr "не удалось открыть \"%s\" (лог-файл: %u, сегмент: %u): %m"
-#: access/transam/xlog.c:1410
+#: access/transam/xlog.c:1416
#, c-format
-msgid "fsync of file %s failed: %m"
-msgstr ""
+msgid "failed to write \"%s\": %m"
+msgstr "не удалось записать \"%s\": %m"
-#: access/transam/xlog.c:1515
+#: access/transam/xlog.c:1423
#, c-format
-msgid ""
-"link from %s to %s (initialization of log file %u, segment %u) failed: %m"
-msgstr ""
+msgid "fsync of file \"%s\" failed: %m"
+msgstr "fsync файла \"%s\" не удался: %m"
-#: access/transam/xlog.c:1520
+#: access/transam/xlog.c:1530
#, c-format
-msgid ""
-"rename from %s to %s (initialization of log file %u, segment %u) failed: %m"
+msgid "link from \"%s\" to \"%s\" (initialization of log file %u, segment %u) failed: %m"
msgstr ""
-#: access/transam/xlog.c:1601
+#: access/transam/xlog.c:1537
#, c-format
-msgid "could not open transaction log directory (%s): %m"
-msgstr ""
+msgid "rename from \"%s\" to \"%s\" (initialization of log file %u, segment %u) failed: %m"
+msgstr "не удалось переименовать \"%s\" в \"%s\" (инициализация лог-файла: %u, сегмент: %u): %m"
-#: access/transam/xlog.c:1616
+#: access/transam/xlog.c:1624
#, c-format
-msgid "archiving transaction log file %s"
+msgid "could not open transaction log directory \"%s\": %m"
msgstr ""
-#: access/transam/xlog.c:1618
-msgid "archiving log files is not implemented!"
-msgstr "архивация логов не поддерживается!"
-
-#: access/transam/xlog.c:1632
+#: access/transam/xlog.c:1640
#, c-format
-msgid "recycled transaction log file %s"
-msgstr ""
+msgid "archiving transaction log file \"%s\""
+msgstr "архивирование лога транзакций: \"%s\""
-#: access/transam/xlog.c:1638
+#: access/transam/xlog.c:1657
#, c-format
-msgid "removing transaction log file %s"
-msgstr "удаление лог-файла транзакций: %s"
+msgid "recycled transaction log file \"%s\""
+msgstr "переиспользование лога транзакций: \"%s\""
-#: access/transam/xlog.c:1647
+#: access/transam/xlog.c:1664
#, c-format
-msgid "could not read transaction log directory (%s): %m"
-msgstr ""
+msgid "removing transaction log file \"%s\""
+msgstr "удаление лога транзакций: \"%s\""
-#: access/transam/xlog.c:1720
+#: access/transam/xlog.c:1675
#, c-format
-msgid "ReadRecord: bad resource manager data checksum in record at %X/%X"
-msgstr ""
+msgid "could not read transaction log directory \"%s\": %m"
+msgstr "не получилось считать файл директорию лога транзакций \"%s\": %m"
-#: access/transam/xlog.c:1742
+#: access/transam/xlog.c:1749
#, c-format
-msgid "ReadRecord: bad checksum of backup block %d in record at %X/%X"
+msgid "bad resource manager data checksum in record at %X/%X"
msgstr ""
-#: access/transam/xlog.c:1811
+#: access/transam/xlog.c:1772
#, c-format
-msgid "ReadRecord: invalid record offset at %X/%X"
+msgid "bad checksum of backup block %d in record at %X/%X"
msgstr ""
-#: access/transam/xlog.c:1834
+#: access/transam/xlog.c:1842
#, c-format
-msgid "ReadRecord: lseek of log file %u, segment %u, offset %u failed: %m"
+msgid "invalid record offset at %X/%X"
msgstr ""
-#: access/transam/xlog.c:1840 access/transam/xlog.c:1924
+#: access/transam/xlog.c:1875
+#: access/transam/xlog.c:1965
#, c-format
-msgid "ReadRecord: read of log file %u, segment %u, offset %u failed: %m"
+msgid "read of log file %u, segment %u, offset %u failed: %m"
msgstr ""
-#: access/transam/xlog.c:1850
+#: access/transam/xlog.c:1886
#, c-format
-msgid "ReadRecord: contrecord is requested by %X/%X"
+msgid "contrecord is requested by %X/%X"
msgstr ""
-#: access/transam/xlog.c:1864
+#: access/transam/xlog.c:1901
#, c-format
-msgid "ReadRecord: record with zero length at %X/%X"
+msgid "record with zero length at %X/%X"
msgstr ""
-#: access/transam/xlog.c:1888
+#: access/transam/xlog.c:1926
#, c-format
-msgid "ReadRecord: record length %u at %X/%X too long"
+msgid "record length %u at %X/%X too long"
msgstr ""
-#: access/transam/xlog.c:1894
+#: access/transam/xlog.c:1933
#, c-format
-msgid "ReadRecord: invalid resource manager id %u at %X/%X"
+msgid "invalid resource manager id %u at %X/%X"
msgstr ""
-#: access/transam/xlog.c:1932
+#: access/transam/xlog.c:1974
#, c-format
-msgid ""
-"ReadRecord: there is no ContRecord flag in log file %u, segment %u, offset %u"
+msgid "there is no contrecord flag in log file %u, segment %u, offset %u"
msgstr ""
-#: access/transam/xlog.c:1940
+#: access/transam/xlog.c:1983
#, c-format
-msgid ""
-"ReadRecord: invalid ContRecord length %u in log file %u, segment %u, offset %"
-"u"
+msgid "invalid contrecord length %u in log file %u, segment %u, offset %u"
msgstr ""
-#: access/transam/xlog.c:2004
+#: access/transam/xlog.c:2049
#, c-format
-msgid ""
-"ReadRecord: invalid magic number %04X in log file %u, segment %u, offset %u"
+msgid "invalid magic number %04X in log file %u, segment %u, offset %u"
msgstr ""
-#: access/transam/xlog.c:2010
+#: access/transam/xlog.c:2056
#, c-format
-msgid ""
-"ReadRecord: invalid info bits %04X in log file %u, segment %u, offset %u"
+msgid "invalid info bits %04X in log file %u, segment %u, offset %u"
msgstr ""
-#: access/transam/xlog.c:2018
+#: access/transam/xlog.c:2065
#, c-format
-msgid ""
-"ReadRecord: unexpected pageaddr %X/%X in log file %u, segment %u, offset %u"
+msgid "unexpected pageaddr %X/%X in log file %u, segment %u, offset %u"
msgstr ""
#. translator: SUI = startup id
-#: access/transam/xlog.c:2040
+#: access/transam/xlog.c:2088
#, c-format
-msgid ""
-"ReadRecord: out-of-sequence SUI %u (after %u) in log file %u, segment %u, "
-"offset %u"
+msgid "out-of-sequence SUI %u (after %u) in log file %u, segment %u, offset %u"
msgstr ""
-#: access/transam/xlog.c:2099
+#: access/transam/xlog.c:2149
msgid "invalid LC_COLLATE setting"
-msgstr ""
+msgstr "неверное значение LC_COLLATE"
-#: access/transam/xlog.c:2103
+#: access/transam/xlog.c:2154
msgid "invalid LC_CTYPE setting"
-msgstr ""
+msgstr "неверное значение LC_CTYPE"
-#: access/transam/xlog.c:2121
+#: access/transam/xlog.c:2173
msgid "sizeof(ControlFileData) is larger than BLCKSZ; fix either one"
msgstr ""
-#: access/transam/xlog.c:2129
+#: access/transam/xlog.c:2183
#, c-format
-msgid "WriteControlFile: could not create control file (%s): %m"
+msgid "could not create control file \"%s\": %m"
msgstr ""
-#: access/transam/xlog.c:2138
+#: access/transam/xlog.c:2194
+#: access/transam/xlog.c:2371
#, c-format
-msgid "WriteControlFile: write to control file failed: %m"
+msgid "write to control file failed: %m"
msgstr ""
-#: access/transam/xlog.c:2142
+#: access/transam/xlog.c:2200
+#: access/transam/xlog.c:2377
#, c-format
-msgid "WriteControlFile: fsync of control file failed: %m"
+msgid "fsync of control file failed: %m"
msgstr ""
-#: access/transam/xlog.c:2158 access/transam/xlog.c:2281
+#: access/transam/xlog.c:2218
+#: access/transam/xlog.c:2360
#, c-format
-msgid "could not open control file (%s): %m"
-msgstr ""
+msgid "could not open control file \"%s\": %m"
+msgstr "не получилось отктрыть файл управления \"%s\": %m"
-#: access/transam/xlog.c:2161
+#: access/transam/xlog.c:2224
#, c-format
msgid "read from control file failed: %m"
msgstr ""
-#: access/transam/xlog.c:2173
+#: access/transam/xlog.c:2236
+#: access/transam/xlog.c:2266
+#: access/transam/xlog.c:2273
+#: access/transam/xlog.c:2280
+#: access/transam/xlog.c:2287
+#: access/transam/xlog.c:2294
+#: access/transam/xlog.c:2303
+#: access/transam/xlog.c:2310
+#: access/transam/xlog.c:2318
+#: utils/init/miscinit.c:793
+msgid "database files are incompatible with server"
+msgstr ""
+
+#: access/transam/xlog.c:2237
#, c-format
-msgid ""
-"The database cluster was initialized with PG_CONTROL_VERSION %d,\n"
-"\tbut the server was compiled with PG_CONTROL_VERSION %d.\n"
-"\tIt looks like you need to initdb."
+msgid "The database cluster was initialized with PG_CONTROL_VERSION %d, but the server was compiled with PG_CONTROL_VERSION %d."
msgstr ""
-#: access/transam/xlog.c:2186
+#: access/transam/xlog.c:2240
+#: access/transam/xlog.c:2270
+msgid "It looks like you need to initdb."
+msgstr ""
+
+#: access/transam/xlog.c:2250
msgid "invalid checksum in control file"
msgstr ""
-#: access/transam/xlog.c:2202
+#: access/transam/xlog.c:2267
#, c-format
-msgid ""
-"The database cluster was initialized with CATALOG_VERSION_NO %d,\n"
-"\tbut the backend was compiled with CATALOG_VERSION_NO %d.\n"
-"\tIt looks like you need to initdb."
+msgid "The database cluster was initialized with CATALOG_VERSION_NO %d, but the server was compiled with CATALOG_VERSION_NO %d."
msgstr ""
-#: access/transam/xlog.c:2208
+#: access/transam/xlog.c:2274
#, c-format
-msgid ""
-"The database cluster was initialized with BLCKSZ %d,\n"
-"\tbut the backend was compiled with BLCKSZ %d.\n"
-"\tIt looks like you need to initdb."
+msgid "The database cluster was initialized with BLCKSZ %d, but the server was compiled with BLCKSZ %d."
msgstr ""
-#: access/transam/xlog.c:2214
+#: access/transam/xlog.c:2277
+#: access/transam/xlog.c:2284
+#: access/transam/xlog.c:2291
+#: access/transam/xlog.c:2298
+#: access/transam/xlog.c:2306
+#: access/transam/xlog.c:2313
+#: access/transam/xlog.c:2322
+msgid "It looks like you need to recompile or initdb."
+msgstr ""
+
+#: access/transam/xlog.c:2281
#, c-format
-msgid ""
-"The database cluster was initialized with RELSEG_SIZE %d,\n"
-"\tbut the backend was compiled with RELSEG_SIZE %d.\n"
-"\tIt looks like you need to recompile or initdb."
+msgid "The database cluster was initialized with RELSEG_SIZE %d, but the server was compiled with RELSEG_SIZE %d."
msgstr ""
-#: access/transam/xlog.c:2221
+#: access/transam/xlog.c:2288
#, c-format
-msgid ""
-"The database cluster was initialized with NAMEDATALEN %d,\n"
-"\tbut the backend was compiled with NAMEDATALEN %d.\n"
-"\tIt looks like you need to recompile or initdb."
+msgid "The database cluster was initialized with NAMEDATALEN %d, but the server was compiled with NAMEDATALEN %d."
msgstr ""
-#: access/transam/xlog.c:2228
+#: access/transam/xlog.c:2295
#, c-format
-msgid ""
-"The database cluster was initialized with FUNC_MAX_ARGS %d,\n"
-"\tbut the backend was compiled with FUNC_MAX_ARGS %d.\n"
-"\tIt looks like you need to recompile or initdb."
+msgid "The database cluster was initialized with FUNC_MAX_ARGS %d, but the server was compiled with FUNC_MAX_ARGS %d."
msgstr ""
-#: access/transam/xlog.c:2236
-msgid ""
-"The database cluster was initialized without HAVE_INT64_TIMESTAMP\n"
-"\tbut the backend was compiled with HAVE_INT64_TIMESTAMP.\n"
-"\tIt looks like you need to recompile or initdb."
+#: access/transam/xlog.c:2304
+msgid "The database cluster was initialized without HAVE_INT64_TIMESTAMP but the server was compiled with HAVE_INT64_TIMESTAMP."
msgstr ""
-#: access/transam/xlog.c:2242
-msgid ""
-"The database cluster was initialized with HAVE_INT64_TIMESTAMP\n"
-"\tbut the backend was compiled without HAVE_INT64_TIMESTAMP.\n"
-"\tIt looks like you need to recompile or initdb."
+#: access/transam/xlog.c:2311
+msgid "The database cluster was initialized with HAVE_INT64_TIMESTAMP but the server was compiled without HAVE_INT64_TIMESTAMP."
msgstr ""
-#: access/transam/xlog.c:2249
+#: access/transam/xlog.c:2319
#, c-format
-msgid ""
-"The database cluster was initialized with LOCALE_NAME_BUFLEN %d,\n"
-"\tbut the backend was compiled with LOCALE_NAME_BUFLEN %d.\n"
-"\tIt looks like you need to initdb."
+msgid "The database cluster was initialized with LOCALE_NAME_BUFLEN %d, but the server was compiled with LOCALE_NAME_BUFLEN %d."
msgstr ""
-#: access/transam/xlog.c:2256
-#, c-format
-msgid ""
-"The database cluster was initialized with LC_COLLATE '%s',\n"
-"\twhich is not recognized by setlocale().\n"
-"\tIt looks like you need to initdb."
+#: access/transam/xlog.c:2325
+#: access/transam/xlog.c:2332
+msgid "database files are incompatible with operating system"
msgstr ""
-#: access/transam/xlog.c:2262
+#: access/transam/xlog.c:2326
#, c-format
-msgid ""
-"The database cluster was initialized with LC_CTYPE '%s',\n"
-"\twhich is not recognized by setlocale().\n"
-"\tIt looks like you need to initdb."
+msgid "The database cluster was initialized with LC_COLLATE \"%s\", which is not recognized by setlocale()."
msgstr ""
-#: access/transam/xlog.c:2289
-#, c-format
-msgid "write to control file failed: %m"
+#: access/transam/xlog.c:2329
+#: access/transam/xlog.c:2336
+msgid "It looks like you need to initdb or install locale support."
msgstr ""
-#: access/transam/xlog.c:2293
+#: access/transam/xlog.c:2333
#, c-format
-msgid "fsync of control file failed: %m"
+msgid "The database cluster was initialized with LC_CTYPE \"%s\", which is not recognized by setlocale()."
msgstr ""
-#: access/transam/xlog.c:2433
+#: access/transam/xlog.c:2519
#, c-format
-msgid "BootStrapXLOG failed to write log file: %m"
+msgid "failed to write bootstrap xlog file: %m"
msgstr ""
-#: access/transam/xlog.c:2437
+#: access/transam/xlog.c:2525
#, c-format
-msgid "BootStrapXLOG failed to fsync log file: %m"
+msgid "failed to fsync bootstrap xlog file: %m"
msgstr ""
-#: access/transam/xlog.c:2503
-msgid "control file context is broken"
+#: access/transam/xlog.c:2593
+msgid "control file contains invalid data"
msgstr ""
-#: access/transam/xlog.c:2506
+#: access/transam/xlog.c:2597
#, c-format
msgid "database system was shut down at %s"
msgstr "система была отключена: %s"
-#: access/transam/xlog.c:2509
+#: access/transam/xlog.c:2601
#, c-format
msgid "database system shutdown was interrupted at %s"
msgstr "отключение системы было прервано: %s"
-#: access/transam/xlog.c:2512
+#: access/transam/xlog.c:2605
#, c-format
-msgid ""
-"database system was interrupted being in recovery at %s\n"
-"\tThis probably means that some data blocks are corrupted\n"
-"\tand you will have to use the last backup for recovery."
+msgid "database system was interrupted while in recovery at %s"
+msgstr "система была прервана во время восстановления на %s"
+
+#: access/transam/xlog.c:2607
+msgid "This probably means that some data is corrupted and you will have to use the last backup for recovery."
msgstr ""
-#: access/transam/xlog.c:2517
+#: access/transam/xlog.c:2611
#, c-format
msgid "database system was interrupted at %s"
msgstr "система была прервана: %s"
-#: access/transam/xlog.c:2528
+#: access/transam/xlog.c:2629
#, c-format
msgid "checkpoint record is at %X/%X"
msgstr "контрольная точка: %X/%X"
-#: access/transam/xlog.c:2537
+#: access/transam/xlog.c:2639
#, c-format
msgid "using previous checkpoint record at %X/%X"
msgstr "используется предыдущая контрольная точка: %X/%X"
-#: access/transam/xlog.c:2542
-msgid "unable to locate a valid checkpoint record"
-msgstr "не в состоянии найти корректную контрольную точку"
+#: access/transam/xlog.c:2645
+msgid "could not locate a valid checkpoint record"
+msgstr "не получилось найти корректную контрольную точку"
-#: access/transam/xlog.c:2548
+#: access/transam/xlog.c:2652
#, c-format
msgid "redo record is at %X/%X; undo record is at %X/%X; shutdown %s"
msgstr "redo-запись: %X/%X; undo-запись: %X/%X; отключение: %s"
-#: access/transam/xlog.c:2552
+#: access/transam/xlog.c:2657
#, c-format
msgid "next transaction id: %u; next oid: %u"
msgstr "id следующей транзакции: %u; следующий OID: %u"
-#: access/transam/xlog.c:2555
+#: access/transam/xlog.c:2661
msgid "invalid next transaction id"
msgstr ""
-#: access/transam/xlog.c:2566
+#: access/transam/xlog.c:2685
msgid "invalid redo in checkpoint record"
msgstr ""
-#: access/transam/xlog.c:2574
+#: access/transam/xlog.c:2694
msgid "invalid redo/undo record in shutdown checkpoint"
msgstr ""
-#: access/transam/xlog.c:2583
-msgid ""
-"database system was not properly shut down; automatic recovery in progress"
+#: access/transam/xlog.c:2706
+msgid "database system was not properly shut down; automatic recovery in progress"
msgstr ""
-#: access/transam/xlog.c:2603
+#: access/transam/xlog.c:2734
#, c-format
msgid "redo starts at %X/%X"
msgstr ""
-#: access/transam/xlog.c:2634
+#: access/transam/xlog.c:2766
#, c-format
msgid "redo done at %X/%X"
msgstr ""
-#: access/transam/xlog.c:2640
+#: access/transam/xlog.c:2773
msgid "redo is not required"
msgstr ""
-#: access/transam/xlog.c:2722
+#: access/transam/xlog.c:2842
#, c-format
msgid "undo starts at %X/%X"
msgstr ""
-#: access/transam/xlog.c:2732
+#: access/transam/xlog.c:2853
#, c-format
msgid "undo done at %X/%X"
msgstr ""
-#: access/transam/xlog.c:2736
+#: access/transam/xlog.c:2858
msgid "undo is not required"
msgstr ""
-#: access/transam/xlog.c:2770
+#: access/transam/xlog.c:2948
msgid "database system is ready"
msgstr "система готова к использованию"
-#: access/transam/xlog.c:2898
-msgid "shutting down"
-msgstr "отключение в процессе"
-
-#: access/transam/xlog.c:2911
-msgid "database system is shut down"
-msgstr "система отключена"
-
-#: access/transam/xlog.c:2932
-msgid "CreateCheckPoint: cannot be called inside transaction block"
+#. translator: %s is "primary" or "secondary"
+#: access/transam/xlog.c:2981
+#, c-format
+msgid "invalid %s checkpoint link in control file"
msgstr ""
-#: access/transam/xlog.c:3047
-msgid "active transaction while database system is shutting down"
-msgstr ""
+#: access/transam/xlog.c:2982
+#: access/transam/xlog.c:2993
+#: access/transam/xlog.c:3001
+#: access/transam/xlog.c:3010
+#: access/transam/xlog.c:3018
+msgid "primary"
+msgstr "первичный"
-#: access/transam/xlog.c:3093
-msgid ""
-"concurrent transaction log activity while database system is shutting down"
-msgstr ""
+#: access/transam/xlog.c:2982
+#: access/transam/xlog.c:2993
+#: access/transam/xlog.c:3001
+#: access/transam/xlog.c:3010
+#: access/transam/xlog.c:3018
+msgid "secondary"
+msgstr "двоичный"
-#: access/transam/xlog.c:3324 access/transam/xlog.c:3352
+#. translator: %s is "primary" or "secondary"
+#: access/transam/xlog.c:2992
#, c-format
-msgid "fsync of log file %u, segment %u failed: %m"
+msgid "invalid %s checkpoint record"
+msgstr "неверная контрольная точка %s"
+
+#. translator: %s is "primary" or "secondary"
+#: access/transam/xlog.c:3000
+#, c-format
+msgid "invalid resource manager id in %s checkpoint record"
msgstr ""
-#: access/transam/xlog.c:3358
+#. translator: %s is "primary" or "secondary"
+#: access/transam/xlog.c:3009
#, c-format
-msgid "fdatasync of log file %u, segment %u failed: %m"
+msgid "invalid xl_info in %s checkpoint record"
msgstr ""
-#: access/transam/xlog.c:3366
+#. translator: %s is "primary" or "secondary"
+#: access/transam/xlog.c:3017
#, c-format
-msgid "bogus wal_sync_method %d"
+msgid "invalid length of %s checkpoint record"
msgstr ""
-#: access/transam/xlogutils.c:253
-msgid "_xl_remove_hash_entry: file was not found in cache"
+#: access/transam/xlog.c:3082
+msgid "shutting down"
+msgstr "отключение в процессе"
+
+#: access/transam/xlog.c:3096
+msgid "database system is shut down"
+msgstr "система отключена"
+
+#: access/transam/xlog.c:3119
+msgid "checkpoint cannot be made inside transaction block"
+msgstr "контрольная точка не может располагаться внутри транзакционного блока"
+
+#: access/transam/xlog.c:3307
+msgid "concurrent transaction log activity while database system is shutting down"
msgstr ""
-#: access/transam/xlogutils.c:350
-msgid "XLogOpenRelation: out of memory for cache"
+#: access/transam/xlog.c:3548
+#: access/transam/xlog.c:3580
+#, c-format
+msgid "fsync of log file %u, segment %u failed: %m"
msgstr ""
-#: access/transam/xlogutils.c:353
-msgid "XLogOpenRelation: file found on insert into cache"
+#: access/transam/xlog.c:3588
+#, c-format
+msgid "fdatasync of log file %u, segment %u failed: %m"
msgstr ""
-#: bootstrap/bootstrap.c:194
+#: bootstrap/bootstrap.c:196
msgid ""
"Usage:\n"
-" postgres -boot [-d level] [-D datadir] [-F] [-o file] [-x num] dbname\n"
-" -d 1-5 debug mode\n"
+" postgres -boot [OPTION]... DBNAME\n"
+" -c NAME=VALUE set run-time parameter\n"
+" -d 1-5 debug level\n"
" -D datadir data directory\n"
" -F turn off fsync\n"
" -o file send debug output to file\n"
" -x num internal use\n"
msgstr ""
"Использование:\n"
-" postgres -boot [-d уровень] [-D дирданных] [-F] [-o файл] [-x номер] "
-"имябд\n"
-" -d 1-5 режим отладки\n"
-" -D дирданных директория с данными\n"
+" postgres -boot [ОПЦИЯ]... ИМЯБД\n"
+" -c ИМЯ=ЗНАЧЕНИЕ set run-time parameter\n"
+" -d 1-5 уровень отладки\n"
+" -D ДИРДАННЫХ директория с данными\n"
" -F выключить fsync\n"
-" -o файл направить debug-вывод в файл\n"
-" -x номер для внутреннего использования\n"
+" -o ФАЙЛ направить вывод режима отладки в файл\n"
+" -x НОМЕР для внутреннего использования\n"
+
+#: bootstrap/bootstrap.c:319
+#: postmaster/postmaster.c:567
+#: tcop/postgres.c:2407
+#, c-format
+msgid "--%s requires a value"
+msgstr "--%s требует параметр"
+
+#: bootstrap/bootstrap.c:324
+#: postmaster/postmaster.c:572
+#: tcop/postgres.c:2412
+#, c-format
+msgid "-c %s requires a value"
+msgstr "-c %s требует параметр"
-#: bootstrap/bootstrap.c:308 postmaster/postmaster.c:309
+#: bootstrap/bootstrap.c:357
+#: postmaster/postmaster.c:314
+#: tcop/postgres.c:2482
#, c-format
msgid ""
"%s does not know where to find the database system data.\n"
"You must specify the directory that contains the database system\n"
"either by specifying the -D invocation option or by setting the\n"
"PGDATA environment variable.\n"
-"\n"
msgstr ""
"Модуль %s не в состоянии найти данные (базы и т.д.) системы.\n"
"Вы должны указать директорию, которая содержит данные\n"
"путём указания опции -D при запуске или установив переменную\n"
"окружения PGDATA.\n"
-"\n"
-
-#: bootstrap/bootstrap.c:408
-#, c-format
-msgid "Unsupported XLOG op %d"
-msgstr ""
-
-#: bootstrap/bootstrap.c:511
-#, c-format
-msgid "open relation %s, attrsize %d"
-msgstr ""
-
-#: bootstrap/bootstrap.c:527
-#, c-format
-msgid "create attribute %d name %s len %d num %d type %u"
-msgstr ""
-
-#: bootstrap/bootstrap.c:546
-#, c-format
-msgid "closerel: close of '%s' when '%s' was expected"
-msgstr ""
-
-#: bootstrap/bootstrap.c:550
-#, c-format
-msgid "closerel: close of '%s' before any relation was opened"
-msgstr ""
-#: bootstrap/bootstrap.c:555
-msgid "no open relation to close"
-msgstr ""
-
-#: bootstrap/bootstrap.c:558
+#: catalog/dependency.c:173
#, c-format
-msgid "close relation %s"
-msgstr ""
-
-#: bootstrap/bootstrap.c:582
-msgid "warning: no open relations allowed with 'create' command"
+msgid "cannot drop %s because other objects depend on it"
msgstr ""
-#: bootstrap/bootstrap.c:591
-#, c-format
-msgid "column %s %s"
-msgstr "колонка %s %s"
-
-#: bootstrap/bootstrap.c:681
-#, c-format
-msgid "inserting row oid %u, %d columns"
+#: catalog/dependency.c:175
+msgid "Use DROP ... CASCADE to drop the dependent objects too."
msgstr ""
-#: bootstrap/bootstrap.c:693
-msgid "row inserted"
-msgstr "запись добавлена"
-
-#: bootstrap/bootstrap.c:715
+#: catalog/dependency.c:233
#, c-format
-msgid "inserting column %d value '%s'"
+msgid "failed to drop all objects depending on %s"
msgstr ""
-#: bootstrap/bootstrap.c:721
-msgid "Typ != NULL"
-msgstr "Typ != NULL"
-
-#: bootstrap/bootstrap.c:728
+#: catalog/dependency.c:330
+#: catalog/dependency.c:729
#, c-format
-msgid "unable to find atttypid %u in Typ list"
+msgid "cannot drop %s because it is required by the database system"
msgstr ""
-#: bootstrap/bootstrap.c:739 bootstrap/bootstrap.c:760
-#, c-format
-msgid " -> %s"
-msgstr " -> %s"
-
-#: bootstrap/bootstrap.c:750
+#: catalog/dependency.c:466
#, c-format
-msgid "type oid %u not found"
+msgid "cannot drop %s because %s requires it"
msgstr ""
-#: bootstrap/bootstrap.c:751
-#, c-format
-msgid "Typ == NULL, typeindex = %u"
-msgstr "Typ == NULL, typeindex = %u"
-
-#: bootstrap/bootstrap.c:763
-msgid "inserted"
-msgstr "добавлено"
-
-#: bootstrap/bootstrap.c:773
+#: catalog/dependency.c:468
#, c-format
-msgid "inserting column %d NULL"
+msgid "You may drop %s instead."
msgstr ""
-#: bootstrap/bootstrap.c:820
-msgid "Memory manager fault: cleanup called twice.\n"
-msgstr ""
-
-#: bootstrap/bootstrap.c:867
-#, c-format
-msgid "external type: %s"
-msgstr "внешний тип: %s"
-
-#: bootstrap/bootstrap.c:891
+#: catalog/dependency.c:536
+#: catalog/dependency.c:686
+#: catalog/dependency.c:714
#, c-format
-msgid "Error: unknown type '%s'.\n"
-msgstr "Ошибка: неизвестный тип '%s'.\n"
-
-#: bootstrap/bootstrap.c:907
-msgid "AllocateAttribute: malloc failed"
-msgstr "AllocateAttribute: malloc не удался"
-
-#: bootstrap/bootstrap.c:1058
-msgid ""
-"There are too many string constants and identifiers for the compiler to "
-"handle."
+msgid "drop auto-cascades to %s"
msgstr ""
-#: bootscanner.l:128
+#: catalog/dependency.c:541
+#: catalog/dependency.c:691
#, c-format
-msgid "syntax error at line %d: unexpected character %s"
-msgstr "ошибка синтаксиса в строке %d: неожидаемый символ %s"
-
-#: bootscanner.l:138
-#, c-format
-msgid "syntax error at line %d: unexpected token %s"
-msgstr "ошибка синтаксиса в строке %d: неожидаемый токен %s"
-
-#: bootparse.y:59
-msgid "start transaction"
-msgstr "начало транзакции"
-
-#: bootparse.y:67
-msgid "commit transaction"
-msgstr "подтверждение транзакции"
-
-#: bootparse.y:158
-#, c-format
-msgid "creating%s%s relation %s..."
-msgstr ""
-
-#: bootparse.y:179
-msgid "create bootstrap: warning, open relation exists, closing first"
-msgstr ""
-
-#: bootparse.y:189
-msgid "bootstrap relation created"
+msgid "%s depends on %s"
msgstr ""
-#: bootparse.y:202
-#, c-format
-msgid "relation created with oid %u"
-msgstr "создан объект с OID %u"
-
-#: bootparse.y:213
-#, c-format
-msgid "inserting row with oid %u..."
-msgstr "добавляется строка с OID %u..."
-
-#: bootparse.y:215
-msgid "inserting row..."
-msgstr "добавляется строка..."
-
-#: bootparse.y:221
-#, c-format
-msgid "incorrect number of columns in row (expected %d, got %d)"
-msgstr "неверое число колонок в строке (ожидалось %d, получено %d)"
-
-#: bootparse.y:225
-msgid "relation not open"
-msgstr "объект не открыт"
-
-#: bootparse.y:306
-msgid "too many columns"
-msgstr "слишком много колонок"
-
-#: catalog/aclchk.c:60
-#, c-format
-msgid "acl size = %d, # acls = %d"
-msgstr "размер acl = %d, число acl'ов = %d"
-
-#: catalog/aclchk.c:64
-#, c-format
-msgid "\tacl[%d]: %s"
-msgstr "\tacl[%d]: %s"
-
-#: catalog/aclchk.c:153
+#: catalog/dependency.c:548
+#: catalog/dependency.c:698
#, c-format
-msgid "bogus GrantStmt.objtype %d"
+msgid "drop cascades to %s"
msgstr ""
-#: catalog/aclchk.c:173
-#, c-format
-msgid "invalid privilege type %s for table object"
+#: catalog/aclchk.c:127
+msgid "grant options can only be granted to individual users"
msgstr ""
-#: catalog/aclchk.c:202
+#: catalog/aclchk.c:194
#, c-format
-msgid "relation %u not found"
+msgid "invalid privilege type %s for table"
msgstr ""
-#: catalog/aclchk.c:209
+#: catalog/aclchk.c:235
#, c-format
msgid "\"%s\" is an index"
msgstr "\"%s\" является индексом"
-#: catalog/aclchk.c:268
+#: catalog/aclchk.c:297
#, c-format
-msgid "invalid privilege type %s for database object"
+msgid "invalid privilege type %s for database"
msgstr ""
-#: catalog/aclchk.c:298
+#: catalog/aclchk.c:329
+#: commands/comment.c:440
+#: commands/dbcommands.c:481
+#: commands/dbcommands.c:602
+#: commands/dbcommands.c:691
+#: utils/adt/acl.c:1311
+#: utils/init/postinit.c:261
+#: utils/init/postinit.c:273
#, c-format
-msgid "database \"%s\" not found"
-msgstr "база \"%s\" не найдена"
-
-#: catalog/aclchk.c:302 catalog/aclchk.c:474 catalog/pg_conversion.c:146
-#: commands/dbcommands.c:535 commands/user.c:911 tcop/utility.c:861
-#: utils/init/miscinit.c:615
-msgid "permission denied"
-msgstr "доступ запрещён"
+msgid "database \"%s\" does not exist"
+msgstr "база данных \"%s\" не существует"
-#: catalog/aclchk.c:359
+#: catalog/aclchk.c:396
#, c-format
-msgid "invalid privilege type %s for function object"
+msgid "invalid privilege type %s for function"
msgstr ""
-#: catalog/aclchk.c:389 parser/parse_func.c:885 parser/parse_func.c:1332
-#, c-format
-msgid "function %u not found"
-msgstr "Функция %u не найдена"
-
-#: catalog/aclchk.c:452
+#: catalog/aclchk.c:493
#, c-format
-msgid "invalid privilege type %s for language object"
+msgid "invalid privilege type %s for language"
msgstr ""
-#: catalog/aclchk.c:481
+#: catalog/aclchk.c:521
+#: commands/functioncmds.c:440
+#: commands/proclang.c:200
+#: commands/proclang.c:255
+#: utils/adt/acl.c:1729
#, c-format
-msgid "language \"%s\" not found"
-msgstr "язык \"%s\" не найден"
+msgid "language \"%s\" does not exist"
+msgstr "язык \"%s\" не существует"
# TO REVIEW
-#: catalog/aclchk.c:485
+#: catalog/aclchk.c:527
#, c-format
msgid "language \"%s\" is not trusted"
msgstr "язык \"%s\" недоверямый"
-#: catalog/aclchk.c:542
-#, c-format
-msgid "invalid privilege type %s for namespace object"
-msgstr ""
-
-#: catalog/aclchk.c:568
-#, c-format
-msgid "namespace \"%s\" not found"
-msgstr ""
-
-#: catalog/aclchk.c:644
-#, c-format
-msgid "privilege_to_string: unrecognized privilege %d"
-msgstr ""
-
-#: catalog/aclchk.c:666
-#, c-format
-msgid "non-existent group \"%s\""
-msgstr ""
-
-#: catalog/aclchk.c:736
-#, c-format
-msgid "in_group: group %u not found"
-msgstr ""
-
-#: catalog/aclchk.c:764
-msgid "aclcheck: null ACL, returning OK"
-msgstr ""
-
-#: catalog/aclchk.c:779
-msgid "aclcheck: zero-length ACL, returning OK"
-msgstr ""
-
-#: catalog/aclchk.c:788
-msgid "aclcheck: first entry in ACL is not 'world' entry"
-msgstr ""
-
-#: catalog/aclchk.c:792
+#: catalog/aclchk.c:593
#, c-format
-msgid "aclcheck: using world=%d"
+msgid "invalid privilege type %s for schema"
msgstr ""
-#: catalog/aclchk.c:808
+#: catalog/aclchk.c:621
+#: catalog/namespace.c:245
+#: catalog/namespace.c:1200
+#: catalog/namespace.c:1238
+#: catalog/namespace.c:1800
+#: commands/comment.c:490
+#: commands/schemacmds.c:181
+#: commands/schemacmds.c:247
+#: utils/adt/acl.c:1933
#, c-format
-msgid "aclcheck: found user %u/%d"
-msgstr ""
+msgid "schema \"%s\" does not exist"
+msgstr "схема \"%s\" не существует"
-#: catalog/aclchk.c:825 catalog/aclchk.c:846
+#: catalog/aclchk.c:724
+#: commands/user.c:1454
+#: commands/user.c:1696
+#: commands/user.c:1731
+#: libpq/pqcomm.c:475
#, c-format
-msgid "aclcheck: found group %u/%d"
-msgstr ""
+msgid "group \"%s\" does not exist"
+msgstr "группа \"%s\" не существует"
-#: catalog/aclchk.c:858
+#: catalog/aclchk.c:796
#, c-format
-msgid "aclcheck: bogus ACL id type: %d"
-msgstr ""
+msgid "group with ID %u does not exist"
+msgstr "группа с ID %u не существует"
-#: catalog/aclchk.c:879 commands/user.c:1304
+#: catalog/aclchk.c:865
#, c-format
-msgid "%s: permission denied"
-msgstr "%s: нет доступа"
+msgid "permission denied for relation %s"
+msgstr "доступ запрещён для связи %s"
-#: catalog/aclchk.c:882
+#: catalog/aclchk.c:867
#, c-format
-msgid "%s: must be owner"
-msgstr ""
+msgid "permission denied for database %s"
+msgstr "доступ запрещён для базы %s"
-#: catalog/aclchk.c:885
+#: catalog/aclchk.c:869
#, c-format
-msgid "%s: unexpected AclResult %d"
-msgstr ""
+msgid "permission denied for function %s"
+msgstr "доступ запрещён для фунции %s"
-#: catalog/aclchk.c:913
+#: catalog/aclchk.c:871
#, c-format
-msgid "pg_class_aclcheck: invalid user id %u"
-msgstr ""
+msgid "permission denied for operator %s"
+msgstr "доступ запрещён для оператора %s"
-#: catalog/aclchk.c:928
+#: catalog/aclchk.c:873
#, c-format
-msgid "pg_class_aclcheck: relation %u not found"
-msgstr ""
-
-#: catalog/aclchk.c:941
-msgid "pg_class_aclcheck: catalog update: permission denied"
-msgstr ""
+msgid "permission denied for type %s"
+msgstr "доступ запрещён для типа %s"
-#: catalog/aclchk.c:953
+#: catalog/aclchk.c:875
#, c-format
-msgid "pg_class_aclcheck: %u is superuser"
-msgstr ""
+msgid "permission denied for language %s"
+msgstr "доступ запрещён для языка %s"
-#: catalog/aclchk.c:1021
+#: catalog/aclchk.c:877
#, c-format
-msgid "pg_database_aclcheck: database %u not found"
-msgstr ""
+msgid "permission denied for schema %s"
+msgstr "доступ запрещён для схемы %s"
-#: catalog/aclchk.c:1076
+#: catalog/aclchk.c:879
#, c-format
-msgid "pg_proc_aclcheck: function %u not found"
-msgstr ""
+msgid "permission denied for operator class %s"
+msgstr "доступ запрещён для класса операторов %s"
-#: catalog/aclchk.c:1129
+#: catalog/aclchk.c:881
#, c-format
-msgid "pg_language_aclcheck: language %u not found"
-msgstr ""
+msgid "permission denied for conversion %s"
+msgstr "доступ запрещён для конверсии %s"
-#: catalog/aclchk.c:1186
+#: catalog/aclchk.c:887
#, c-format
-msgid "pg_namespace_aclcheck: namespace %u not found"
-msgstr ""
+msgid "must be owner of relation %s"
+msgstr "нужно быть владельцем связи %s"
-#: catalog/aclchk.c:1234
+#: catalog/aclchk.c:889
#, c-format
-msgid "pg_class_ownercheck: relation %u not found"
-msgstr ""
+msgid "must be owner of database %s"
+msgstr "нужно быть владельцем базы %s"
-#: catalog/aclchk.c:1260
+#: catalog/aclchk.c:891
#, c-format
-msgid "pg_type_ownercheck: type %u not found"
-msgstr "pg_type_ownercheck: тип '%u не найден"
+msgid "must be owner of function %s"
+msgstr "нужно быть владельцем функции %s"
-#: catalog/aclchk.c:1286
+#: catalog/aclchk.c:893
#, c-format
-msgid "pg_oper_ownercheck: operator %u not found"
-msgstr ""
+msgid "must be owner of operator %s"
+msgstr "нужно быть владельцем оператора %s"
-#: catalog/aclchk.c:1312
+#: catalog/aclchk.c:895
#, c-format
-msgid "pg_proc_ownercheck: function %u not found"
-msgstr ""
+msgid "must be owner of type %s"
+msgstr "нужно быть владельцем типа %s"
-#: catalog/aclchk.c:1338
+#: catalog/aclchk.c:897
#, c-format
-msgid "pg_namespace_ownercheck: namespace %u not found"
-msgstr ""
+msgid "must be owner of language %s"
+msgstr "нужно быть владельцем языка %s"
-#: catalog/aclchk.c:1365
+#: catalog/aclchk.c:899
#, c-format
-msgid "pg_opclass_ownercheck: operator class %u not found"
-msgstr ""
+msgid "must be owner of schema %s"
+msgstr "нужно быть владельцем схемы %s"
-#: catalog/dependency.c:163
+#: catalog/aclchk.c:901
#, c-format
-msgid ""
-"Cannot drop %s because other objects depend on it\n"
-"\tUse DROP ... CASCADE to drop the dependent objects too"
-msgstr ""
+msgid "must be owner of operator class %s"
+msgstr "нужно быть владельцем класса операторов %s"
-#: catalog/dependency.c:253 catalog/dependency.c:572
+#: catalog/aclchk.c:903
#, c-format
-msgid "Cannot drop %s because it is required by the database system"
-msgstr ""
+msgid "must be owner of conversion %s"
+msgstr "нужно быть владельцем конверсии %s"
-#: catalog/dependency.c:257
+#: catalog/aclchk.c:961
#, c-format
-msgid "findAutoDeletableObjects: unknown dependency type '%c' for %s"
-msgstr ""
+msgid "user with ID %u does not exist"
+msgstr "пользователь с ID %u не существует"
-#: catalog/dependency.c:386
+#: catalog/aclchk.c:978
+#: catalog/aclchk.c:1294
#, c-format
-msgid ""
-"Cannot drop %s because %s requires it\n"
-"\tYou may drop %s instead"
-msgstr ""
+msgid "relation with OID %u does not exist"
+msgstr "связь с OID %u не существует"
-#: catalog/dependency.c:412
+#: catalog/aclchk.c:1073
+#: catalog/aclchk.c:1473
#, c-format
-msgid "recursiveDeletion: multiple INTERNAL dependencies for %s"
-msgstr ""
+msgid "database with OID %u does not exist"
+msgstr "база данных с OID %u не существует"
-#: catalog/dependency.c:424
+#: catalog/aclchk.c:1130
+#: catalog/aclchk.c:1378
+#: tcop/fastpath.c:231
#, c-format
-msgid "recursiveDeletion: incorrect use of PIN dependency with %s"
-msgstr ""
+msgid "function with OID %u does not exist"
+msgstr "функция с OID %u не существует"
-#: catalog/dependency.c:428 catalog/dependency.c:576
+#: catalog/aclchk.c:1185
#, c-format
-msgid "recursiveDeletion: unknown dependency type '%c' for %s"
-msgstr ""
+msgid "language with OID %u does not exist"
+msgstr "язык с OID %u не существует"
-#: catalog/dependency.c:454 catalog/dependency.c:532 catalog/dependency.c:558
+#: catalog/aclchk.c:1244
+#: catalog/aclchk.c:1406
#, c-format
-msgid "Drop auto-cascades to %s"
-msgstr ""
+msgid "schema with OID %u does not exist"
+msgstr "схема с OID %u не существует"
-#: catalog/dependency.c:458 catalog/dependency.c:536
+#: catalog/aclchk.c:1322
#, c-format
-msgid "%s depends on %s"
-msgstr ""
+msgid "type with OID %u does not exist"
+msgstr "тип с OID %u не существует"
-#: catalog/dependency.c:464 catalog/dependency.c:542
+#: catalog/aclchk.c:1350
#, c-format
-msgid "Drop cascades to %s"
-msgstr ""
+msgid "operator with OID %u does not exist"
+msgstr "оператро с OID %u не существует"
-#: catalog/dependency.c:693
+#: catalog/aclchk.c:1434
#, c-format
-msgid "doDeletion: Unsupported object class %u"
-msgstr ""
+msgid "operator class with OID %u does not exist"
+msgstr "класс операторов с OID %u не существует"
-#: catalog/dependency.c:776
-#, c-format
-msgid "find_expr_references_walker: bogus varlevelsup %d"
+#: catalog/pg_aggregate.c:80
+msgid "cannot determine transition datatype"
msgstr ""
-#: catalog/dependency.c:780
-#, c-format
-msgid "find_expr_references_walker: bogus varno %d"
+#: catalog/pg_aggregate.c:81
+msgid "An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type."
msgstr ""
-#: catalog/dependency.c:800
+#: catalog/pg_aggregate.c:110
#, c-format
-msgid "find_expr_references_walker: bogus varattno %d"
+msgid "return type of transition function %s is not %s"
msgstr ""
-#: catalog/dependency.c:844
-msgid "find_expr_references_walker: already-planned subqueries not supported"
+#: catalog/pg_aggregate.c:132
+msgid "must not omit initval when transfn is strict and transtype is not compatible with input type"
msgstr ""
-#: catalog/dependency.c:1180
-#, c-format
-msgid "getObjectClass: Unknown object class %u"
+#: catalog/pg_aggregate.c:165
+#: catalog/pg_proc.c:112
+#: catalog/pg_proc.c:535
+msgid "cannot determine result datatype"
msgstr ""
-#: catalog/dependency.c:1237
-#, c-format
-msgid "getObjectDescription: Cast %u does not exist"
+#: catalog/pg_aggregate.c:166
+msgid "An aggregate returning ANYARRAY or ANYELEMENT must have one of them as its base type."
msgstr ""
-#: catalog/dependency.c:1271
+#: catalog/pg_aggregate.c:280
+#: commands/typecmds.c:896
+#: commands/typecmds.c:966
+#: commands/typecmds.c:998
+#: commands/typecmds.c:1030
+#: parser/parse_func.c:319
+#: parser/parse_func.c:1491
#, c-format
-msgid "getObjectDescription: Constraint %u does not exist"
-msgstr ""
+msgid "function %s does not exist"
+msgstr "функция %s не существует"
-#: catalog/dependency.c:1301
+#: catalog/pg_aggregate.c:285
#, c-format
-msgid "getObjectDescription: Conversion %u does not exist"
+msgid "function %s returns a set"
msgstr ""
-#: catalog/dependency.c:1330
+#: catalog/pg_aggregate.c:316
+#: catalog/pg_aggregate.c:325
#, c-format
-msgid "getObjectDescription: Default %u does not exist"
+msgid "function %s requires run-time type coercion"
msgstr ""
-#: catalog/dependency.c:1355
-#, c-format
-msgid "getObjectDescription: Language %u does not exist"
-msgstr "getObjectDescription: Язык %u не существует"
-
-#: catalog/dependency.c:1380
-#, c-format
-msgid "cache lookup of opclass %u failed"
-msgstr "поиск в кзше опкласса %u не удался"
-
-#: catalog/dependency.c:1398 utils/adt/ruleutils.c:425
-#, c-format
-msgid "syscache lookup for AM %u failed"
-msgstr "поиск в системном кзше AM %u не удался"
-
-#: catalog/dependency.c:1430
-#, c-format
-msgid "getObjectDescription: Rule %u does not exist"
-msgstr "getObjectDescription: Првило %u не существует"
-
-#: catalog/dependency.c:1464
+#: catalog/heap.c:227
#, c-format
-msgid "getObjectDescription: Trigger %u does not exist"
-msgstr "getObjectDescription: Триггер %u не существует"
+msgid "permission denied to create \"%s.%s\""
+msgstr "доступ запрещён по созданию \"%s.%s\""
-#: catalog/dependency.c:1484
-#, c-format
-msgid "getObjectDescription: Schema %u does not exist"
-msgstr "getObjectDescription: Схема %u не существует"
-
-#: catalog/dependency.c:1516 catalog/heap.c:1660 catalog/pg_constraint.c:470
-#: utils/adt/ruleutils.c:3121
-#, c-format
-msgid "cache lookup of relation %u failed"
+#: catalog/heap.c:229
+msgid "System catalog modifications are currently disallowed."
msgstr ""
-#: catalog/heap.c:156 catalog/heap.c:159
+#: catalog/heap.c:356
+#: commands/tablecmds.c:1843
#, c-format
-msgid "SystemAttributeDefinition: invalid attribute number %d"
-msgstr "SystemAttributeDefinition: неверный номер атрибута: %d"
-
-#: catalog/heap.c:226
-#, c-format
-msgid ""
-"cannot create %s.%s: system catalog modifications are currently disallowed"
+msgid "tables can have at most %d columns"
msgstr ""
-#: catalog/heap.c:353
-#, c-format
-msgid "Number of columns is out of range (0 to %d)"
-msgstr "Число колонок вне диапазона (от 0 до %d)"
-
-#: catalog/heap.c:368
+#: catalog/heap.c:373
#, c-format
-msgid "name of column \"%s\" conflicts with an existing system column"
-msgstr "имя колонки \"%s\" конфликтует с существующей системной колонкой"
+msgid "column name \"%s\" conflicts with a system column name"
+msgstr "имя колонки \"%s\" конфликтует с системной колонкой"
-#: catalog/heap.c:382
+#: catalog/heap.c:389
#, c-format
msgid "column name \"%s\" is duplicated"
msgstr "повторное имя колонки: \"%s\""
-#: catalog/heap.c:420
-#, c-format
-msgid ""
-"Attribute \"%s\" has an unknown type\n"
-"\tProceeding with relation creation anyway"
-msgstr ""
-
-#: catalog/heap.c:424
-#, c-format
-msgid "Attribute \"%s\" has pseudo-type %s"
-msgstr "Атрибут \"%s\" имеет псевдо-тип %s"
-
-#: catalog/heap.c:431
+#: catalog/heap.c:429
#, c-format
-msgid "Attribute \"%s\" has composite type %s"
-msgstr "Атрибут \"%s\" имеет сложный тип %s"
+msgid "attribute \"%s\" has type UNKNOWN"
+msgstr "атрибут \"%s\" имеет тип UNKNOWN"
-#: catalog/heap.c:714
-#, c-format
-msgid "Relation '%s' already exists"
-msgstr "Объект '%s' уже существует"
-
-#: catalog/heap.c:871
-#, c-format
-msgid "DeleteRelationTuple: cache lookup failed for relation %u"
-msgstr "DeleteRelationTuple: поиск в кэше связи %u не удался"
-
-#: catalog/heap.c:950
-#, c-format
-msgid "RemoveAttributeById: Failed to find attribute %d in relation %u"
-msgstr ""
-
-#: catalog/heap.c:1029
-#, c-format
-msgid "RemoveAttrDefault: no default found for rel %u attnum %d"
+#: catalog/heap.c:430
+msgid "Proceeding with relation creation anyway."
msgstr ""
-#: catalog/heap.c:1065
+#: catalog/heap.c:437
#, c-format
-msgid "RemoveAttrDefaultById: cache lookup failed for attrdef %u"
-msgstr "RemoveAttrDefaultById: поиск в кэше attrdef %u не удался"
+msgid "attribute \"%s\" has pseudo-type %s"
+msgstr "арибут \"%s\" имеет псевдо-тип %s"
-#: catalog/heap.c:1088
+#: catalog/heap.c:447
#, c-format
-msgid "RemoveAttrDefaultById: cache lookup failed for rel %u attr %d"
-msgstr "RemoveAttrDefaultById: поиск в кэше для связи %u и attr %d не удался"
+msgid "attribute \"%s\" has composite type %s"
+msgstr "атрибут \"%s\" имеет сложный тип %s"
-#: catalog/heap.c:1143
+#: catalog/heap.c:734
+#: catalog/index.c:543
+#: commands/tablecmds.c:1378
#, c-format
-msgid "heap_drop_with_catalog: FlushRelationBuffers returned %d"
-msgstr "heap_drop_with_catalog: FlushRelationBuffers возвратила %d"
+msgid "relation \"%s\" already exists"
+msgstr "объект \"%s\" уже существует"
-#: catalog/heap.c:1264 parser/parse_relation.c:1503 utils/adt/ruleutils.c:3278
+#: catalog/heap.c:1556
+#: commands/tablecmds.c:2892
+#: commands/tablecmds.c:2934
#, c-format
-msgid "cache lookup of attribute %d in relation %u failed"
-msgstr ""
+msgid "constraint \"%s\" for relation \"%s\" already exists"
+msgstr "констрейнт \"%s\" для связи \"%s\" уже существует"
-#: catalog/heap.c:1522 commands/tablecmds.c:2634 commands/tablecmds.c:2672
+#: catalog/heap.c:1572
#, c-format
-msgid "constraint \"%s\" already exists for relation \"%s\""
-msgstr ""
-
-#: catalog/heap.c:1536 commands/tablecmds.c:206
-#, c-format
-msgid "Duplicate CHECK constraint name: '%s'"
-msgstr ""
+msgid "CHECK constraint \"%s\" already exists"
+msgstr "CHECK-ограничение \"%s\" уже существует"
-#: catalog/heap.c:1596
+#: catalog/heap.c:1634
#, c-format
-msgid "Only relation \"%s\" can be referenced in CHECK constraint expression"
+msgid "only relation \"%s\" can be referenced in CHECK constraint"
msgstr ""
-#: catalog/heap.c:1603 commands/tablecmds.c:2754 commands/typecmds.c:1588
-msgid "cannot use subselect in CHECK constraint expression"
+#: catalog/heap.c:1643
+#: commands/tablecmds.c:3021
+#: commands/typecmds.c:1828
+msgid "cannot use sub-select in CHECK constraint"
msgstr ""
-#: catalog/heap.c:1605 commands/tablecmds.c:2756 commands/typecmds.c:1590
-msgid "cannot use aggregate function in CHECK constraint expression"
+#: catalog/heap.c:1647
+#: commands/tablecmds.c:3025
+#: commands/typecmds.c:1832
+msgid "cannot use aggregate in CHECK constraint"
msgstr ""
-#: catalog/heap.c:1715
+#: catalog/heap.c:1754
msgid "cannot use column references in DEFAULT clause"
msgstr ""
-#: catalog/heap.c:1721
+#: catalog/heap.c:1762
msgid "DEFAULT clause must not return a set"
msgstr ""
-#: catalog/heap.c:1727
-msgid "cannot use subselects in DEFAULT clause"
-msgstr ""
-
-#: catalog/heap.c:1729
-msgid "cannot use aggregate functions in DEFAULT clause"
-msgstr ""
-
-#: catalog/heap.c:1750 rewrite/rewriteHandler.c:487
-#, c-format
-msgid ""
-"Column \"%s\" is of type %s but default expression is of type %s\n"
-"\tYou will need to rewrite or cast the expression"
-msgstr ""
-
-#: catalog/index.c:124
-#, c-format
-msgid "Function %u does not exist"
-msgstr "Функция %u не существует"
-
-#: catalog/index.c:143 catalog/index.c:280
-#, c-format
-msgid "Opclass %u does not exist"
-msgstr "Opclass %u не существует"
-
-#: catalog/index.c:157 catalog/index.c:293
-#, c-format
-msgid "Type %u does not exist"
-msgstr "Тип %u не существует"
-
-#: catalog/index.c:238
-#, c-format
-msgid "cannot create index: column %d does not exist"
-msgstr "нельзя создать индекс: колонка %d не существует"
-
-#: catalog/index.c:543
-msgid "must index at least one column"
-msgstr "покрайней мере одна колонка должна быть индексирована"
-
-#: catalog/index.c:548
-msgid "User-defined indexes on system catalogs are not supported"
-msgstr "Пользовательские индексы на системные каталоги не поддерживаются"
-
-#: catalog/index.c:558
-msgid "Shared indexes cannot be created after initdb"
-msgstr ""
-
-#: catalog/index.c:561
-#, c-format
-msgid "relation named \"%s\" already exists"
-msgstr "объект с именем \"%s\" уже существует"
-
-#: catalog/index.c:674
-msgid "index_create: constraint must be PRIMARY or UNIQUE"
-msgstr ""
-
-#: catalog/index.c:824
-#, c-format
-msgid "index_drop: cache lookup failed for index %u"
-msgstr "index_drop: поиск в кэше индекса %u не удался"
-
-#: catalog/index.c:837
-#, c-format
-msgid "index_drop: FlushRelationBuffers returned %d"
-msgstr "index_drop: FlushRelationBuffers возвратила %d"
-
-#: catalog/index.c:1039
-#, c-format
-msgid "relation %s isn't an indexable relation"
-msgstr "объект %s не является индексируемым"
-
-#: catalog/index.c:1110
-#, c-format
-msgid "setRelhasindex: cannot find relation %u in pg_class"
+#: catalog/heap.c:1770
+msgid "cannot use sub-select in DEFAULT clause"
msgstr ""
-#: catalog/index.c:1226
-#, c-format
-msgid "setNewRelfilenode: cannot find relation %u in pg_class"
+#: catalog/heap.c:1774
+msgid "cannot use aggregate in DEFAULT clause"
msgstr ""
-#: catalog/index.c:1338
+#: catalog/heap.c:1792
+#: rewrite/rewriteHandler.c:560
#, c-format
-msgid "UpdateStats: cannot find relation %u in pg_class"
+msgid "column \"%s\" is of type %s but default expression is of type %s"
msgstr ""
-#: catalog/index.c:1617
-msgid "IndexBuildHeapScan: concurrent insert in progress"
+#: catalog/heap.c:1797
+#: parser/analyze.c:2788
+#: parser/parse_node.c:232
+#: parser/parse_target.c:425
+#: rewrite/rewriteHandler.c:565
+msgid "You will need to rewrite or cast the expression."
msgstr ""
-#: catalog/index.c:1632
-msgid "IndexBuildHeapScan: concurrent delete in progress"
-msgstr ""
+#: catalog/index.c:526
+msgid "user-defined indexes on system catalogs are not supported"
+msgstr "пользовательские индексы на системные каталоги не поддерживаются"
-#: catalog/index.c:1637 commands/vacuum.c:1207 commands/vacuumlazy.c:359
-#: commands/vacuumlazy.c:846
-msgid "Unexpected HeapTupleSatisfiesVacuum result"
+#: catalog/index.c:538
+msgid "shared indexes cannot be created after initdb"
msgstr ""
-#: catalog/index.c:1725
+#: catalog/index.c:995
#, c-format
-msgid "IndexGetRelation: can't find index id %u"
-msgstr "IndexGetRelation: не получается найти индекс с id %u"
-
-#: catalog/index.c:1774
-msgid "reindex_index: can't open index relation"
-msgstr ""
-
-#: catalog/index.c:1785
-msgid "reindex_index: can't open heap relation"
-msgstr ""
+msgid "relation \"%s\" isn't an indexable relation"
+msgstr "связт \"%s\" не является индексируемым объектом"
-#: catalog/index.c:1799 catalog/index.c:1922
+#: catalog/index.c:1755
+#: catalog/index.c:1882
#, c-format
msgid "the target relation %u is shared"
msgstr ""
-#: catalog/index.c:1805
+#: catalog/index.c:1763
#, c-format
msgid "the target relation %u is nailed"
msgstr ""
-#: catalog/namespace.c:168 catalog/namespace.c:215 catalog/namespace.c:1153
-#: parser/parse_expr.c:845 parser/parse_target.c:147
-msgid "Cross-database references are not implemented"
-msgstr ""
-
-#: catalog/namespace.c:186
-#, c-format
-msgid "Relation \"%s\".\"%s\" does not exist"
-msgstr "Объект \"%s\".\"%s\" не существует"
-
-#: catalog/namespace.c:222
-msgid "TEMP tables may not specify a namespace"
-msgstr ""
-
-#: catalog/namespace.c:236 catalog/namespace.c:1182 catalog/namespace.c:1217
-#: catalog/namespace.c:1802
-#, c-format
-msgid "Namespace \"%s\" does not exist"
-msgstr ""
-
-#: catalog/namespace.c:246 catalog/namespace.c:1227
-msgid "No namespace has been selected to create in"
-msgstr ""
-
-#: catalog/namespace.c:298
-#, c-format
-msgid "Cache lookup failed for relation %u"
-msgstr "Поиск в кэше связи %u не удался"
-
-#: catalog/namespace.c:380
-#, c-format
-msgid "Cache lookup failed for type %u"
+#: catalog/namespace.c:167
+#: catalog/namespace.c:220
+#: catalog/namespace.c:1167
+#: parser/parse_expr.c:1117
+#: parser/parse_target.c:162
+msgid "cross-database references are not implemented"
msgstr ""
-#: catalog/namespace.c:581
-#, c-format
-msgid "Cache lookup failed for procedure %u"
-msgstr ""
-
-#: catalog/namespace.c:793
-#, c-format
-msgid "Cache lookup failed for operator %u"
-msgstr "Поиск в кэше операторы %u не удался"
-
-#: catalog/namespace.c:1006
-#, c-format
-msgid "Cache lookup failed for opclass %u"
-msgstr "Поиск в кэше опкласса %u не удался"
-
-#: catalog/namespace.c:1087
+#: catalog/namespace.c:187
#, c-format
-msgid "Cache lookup failed for converions %u"
-msgstr "Поиск в кэше конверсии %u не удался"
-
-#: catalog/namespace.c:1156 gram.y:2291 gram.y:6839
-#, c-format
-msgid "Improper qualified name (too many dotted names): %s"
-msgstr ""
-
-#: catalog/namespace.c:1260
-msgid "Improper relation name (too many dotted names)"
-msgstr ""
-
-#: catalog/namespace.c:1472
-msgid "recomputeNamespacePath: invalid list syntax"
-msgstr ""
+msgid "relation \"%s.%s\" does not exist"
+msgstr "связь \"%s.%s\" не существует"
-#: catalog/namespace.c:1601
+#: catalog/namespace.c:192
#, c-format
-msgid "%s: not authorized to create temp tables"
-msgstr ""
+msgid "relation \"%s\" does not exist"
+msgstr "связь \"%s\" не существует"
-#: catalog/pg_aggregate.c:62
-msgid "no aggregate name supplied"
+#: catalog/namespace.c:229
+msgid "TEMP tables may not specify a schema name"
msgstr ""
-#: catalog/pg_aggregate.c:65
-msgid "aggregate must have a transition function"
+#: catalog/namespace.c:257
+#: catalog/namespace.c:1249
+msgid "no schema has been selected to create in"
msgstr ""
-#: catalog/pg_aggregate.c:87
+#: catalog/namespace.c:1172
+#: parser/parse_expr.c:1149
+#: parser/parse_target.c:170
#, c-format
-msgid "return type of transition function %s is not %s"
-msgstr ""
-
-#: catalog/pg_aggregate.c:99
-msgid ""
-"must not omit initval when transfn is strict and transtype is not compatible "
-"with input type"
+msgid "improper qualified name (too many dotted names): %s"
msgstr ""
-#: catalog/pg_constraint.c:437
+#: catalog/namespace.c:1284
#, c-format
-msgid "RemoveConstraintById: constraint %u not found"
+msgid "improper relation name (too many dotted names): %s"
msgstr ""
-#: catalog/pg_constraint.c:475
+#: catalog/namespace.c:1628
#, c-format
-msgid "RemoveConstraintById: relation %s has relchecks = 0"
-msgstr ""
+msgid "permission denied to create temp tables in database \"%s\""
+msgstr "доступ запрещён по созданию временных таблиц в базе \"%s\""
-#: catalog/pg_constraint.c:502
+#: catalog/pg_largeobject.c:110
+#: storage/large_object/inv_api.c:128
+#: storage/large_object/inv_api.c:248
#, c-format
-msgid "RemoveConstraintById: Constraint %u is not a known type"
-msgstr ""
-
-#: catalog/pg_conversion.c:57
-msgid "no conversion name supplied"
+msgid "large object %u does not exist"
msgstr ""
-#: catalog/pg_conversion.c:64
+#: catalog/pg_conversion.c:66
#, c-format
-msgid "conversion name \"%s\" already exists"
-msgstr "конверсия с именем \"%s\" уже существует"
+msgid "conversion \"%s\" already exists"
+msgstr "конверсия \"%s\" уже существует"
-#: catalog/pg_conversion.c:75
+#: catalog/pg_conversion.c:79
#, c-format
msgid "default conversion for %s to %s already exists"
-msgstr ""
-
-#: catalog/pg_conversion.c:141 catalog/pg_conversion.c:308
-#, c-format
-msgid "Conversion %u search from syscache failed"
-msgstr ""
-
-#: catalog/pg_conversion.c:192
-#, c-format
-msgid "conversion %u does not exist"
-msgstr "конверсия %u не существует"
+msgstr "конверсия по умолчанию для %s в %s уже существует"
-#: catalog/pg_conversion.c:302 commands/conversioncmds.c:97
+#: catalog/pg_conversion.c:308
+#: commands/conversioncmds.c:109
+#: commands/conversioncmds.c:133
#, c-format
-msgid "conversion %s not found"
-msgstr ""
-
-#: catalog/pg_largeobject.c:108
-#, c-format
-msgid "LargeObjectDrop: large object %u not found"
-msgstr "LargeObjectDrop: большой объект %u не найден"
-
-#: catalog/pg_namespace.c:43
-msgid "no namespace name supplied"
-msgstr ""
+msgid "conversion \"%s\" does not exist"
+msgstr "конверсия \"%s\" не существует"
-#: catalog/pg_namespace.c:49
+#: catalog/pg_namespace.c:51
+#: commands/schemacmds.c:256
#, c-format
-msgid "namespace \"%s\" already exists"
-msgstr ""
+msgid "schema \"%s\" already exists"
+msgstr "схема \"%s\" уже существует"
-#: catalog/pg_operator.c:215 catalog/pg_operator.c:401
+#: catalog/pg_operator.c:217
+#: catalog/pg_operator.c:406
#, c-format
msgid "\"%s\" is not a valid operator name"
msgstr "\"%s\" не является верным именем оператора"
-#: catalog/pg_operator.c:404
+#: catalog/pg_operator.c:412
msgid "at least one of leftarg or rightarg must be specified"
msgstr ""
-#: catalog/pg_operator.c:410
+#: catalog/pg_operator.c:420
msgid "only binary operators can have commutators"
msgstr ""
-#: catalog/pg_operator.c:412
+#: catalog/pg_operator.c:424
msgid "only binary operators can have join selectivity"
msgstr ""
-#: catalog/pg_operator.c:414
+#: catalog/pg_operator.c:428
msgid "only binary operators can hash"
msgstr ""
-#: catalog/pg_operator.c:416
+#: catalog/pg_operator.c:432
msgid "only binary operators can mergejoin"
msgstr ""
-#: catalog/pg_operator.c:426
+#: catalog/pg_operator.c:444
#, c-format
-msgid "OperatorDef: operator \"%s\" already defined"
-msgstr "OperatorDef: оператор \"%s\" уже определён"
-
-#: catalog/pg_operator.c:623
-#, c-format
-msgid "OperatorDef: operator %u not found"
-msgstr ""
+msgid "operator %s already exists"
+msgstr "оператор %s уже существует"
-#: catalog/pg_operator.c:711
+#: catalog/pg_operator.c:726
msgid "operator cannot be its own negator or sort operator"
msgstr ""
-#: catalog/pg_operator.c:728
-#, c-format
-msgid "OperatorDef: can't create operator shell \"%s\""
-msgstr ""
-
-#: catalog/pg_proc.c:86 commands/functioncmds.c:140 parser/parse_func.c:1393
+#: catalog/pg_proc.c:88
+#: commands/functioncmds.c:150
+#: parser/parse_func.c:1514
#, c-format
msgid "functions cannot have more than %d arguments"
msgstr "функции не могут иметь число аргументов более %d"
-#: catalog/pg_proc.c:127
-msgid "lookup for procedure by source needs fix (Jan)"
+#: catalog/pg_proc.c:113
+#: catalog/pg_proc.c:536
+msgid "A function returning ANYARRAY or ANYELEMENT must have at least one argument of either type."
msgstr ""
-#: catalog/pg_proc.c:139
+#: catalog/pg_proc.c:168
#, c-format
-msgid "method %s already an attribute of type %s"
+msgid "\"%s\" is already an attribute of type %s"
msgstr ""
-#: catalog/pg_proc.c:189
+#: catalog/pg_proc.c:220
#, c-format
-msgid "function %s already exists with same argument types"
-msgstr ""
+msgid "function \"%s\" already exists with same argument types"
+msgstr "функция \"%s\" с таким набором аргументов уже существует"
-#: catalog/pg_proc.c:192
-#, c-format
-msgid "ProcedureCreate: you do not have permission to replace function %s"
-msgstr ""
+#: catalog/pg_proc.c:234
+msgid "cannot change return type of existing function"
+msgstr "нельзя поменять тип возвращаемого значения для существующей фунции"
-#: catalog/pg_proc.c:201
-msgid ""
-"ProcedureCreate: cannot change return type of existing function.\n"
-"\tUse DROP FUNCTION first."
+#: catalog/pg_proc.c:235
+msgid "Use DROP FUNCTION first."
msgstr ""
-#: catalog/pg_proc.c:208
+#: catalog/pg_proc.c:243
#, c-format
-msgid "function %s is an aggregate"
-msgstr "функция %s не является агрегатом"
+msgid "function \"%s\" is an aggregate"
+msgstr "функция \"%s\" является агрегатом"
-#: catalog/pg_proc.c:211
+#: catalog/pg_proc.c:248
#, c-format
-msgid "function %s is not an aggregate"
-msgstr "функция %s не является агрегатом"
+msgid "function \"%s\" is not an aggregate"
+msgstr "функция \"%s\" не является агрегатом"
-#: catalog/pg_proc.c:323
+#: catalog/pg_proc.c:367
+#: catalog/pg_proc.c:388
+#: catalog/pg_proc.c:398
+#: catalog/pg_proc.c:422
+#: catalog/pg_proc.c:430
+#: catalog/pg_proc.c:482
+#: catalog/pg_proc.c:494
+#: catalog/pg_proc.c:514
#, c-format
-msgid "function declared to return %s, but no SELECT provided"
+msgid "return type mismatch in function declared to return %s"
msgstr ""
-#: catalog/pg_proc.c:341
-msgid "function declared to return void, but final statement is a SELECT"
+#: catalog/pg_proc.c:369
+#: catalog/pg_proc.c:400
+msgid "Function's final statement must be a SELECT."
msgstr ""
-#: catalog/pg_proc.c:347
-#, c-format
-msgid "function declared to return %s, but final statement is not a SELECT"
+#: catalog/pg_proc.c:390
+msgid "Function's final statement must not be a SELECT."
msgstr ""
-#: catalog/pg_proc.c:368
-#, c-format
-msgid "function declared to return %s returns multiple columns in final SELECT"
+#: catalog/pg_proc.c:424
+msgid "Final SELECT must return exactly one column."
msgstr ""
-#: catalog/pg_proc.c:373
+#: catalog/pg_proc.c:432
#, c-format
-msgid "return type mismatch in function: declared to return %s, returns %s"
+msgid "Actual return type is %s."
msgstr ""
-#: catalog/pg_proc.c:421 catalog/pg_proc.c:447
-#, c-format
-msgid ""
-"function declared to return %s does not SELECT the right number of columns (%"
-"d)"
+#: catalog/pg_proc.c:484
+msgid "Final SELECT returns too many columns."
msgstr ""
-#: catalog/pg_proc.c:430
+#: catalog/pg_proc.c:496
#, c-format
-msgid "function declared to return %s returns %s instead of %s at column %d"
+msgid "Final SELECT returns %s instead of %s at column %d."
msgstr ""
-#: catalog/pg_proc.c:486 catalog/pg_proc.c:525 catalog/pg_proc.c:568
-#: commands/functioncmds.c:739 utils/adt/ruleutils.c:3163
-#, c-format
-msgid "cache lookup of function %u failed"
-msgstr "поиск в кзше функции %u не удался"
+#: catalog/pg_proc.c:516
+msgid "Final SELECT returns too few columns."
+msgstr ""
-#: catalog/pg_proc.c:491 catalog/pg_proc.c:530 catalog/pg_proc.c:590
-msgid "null prosrc"
-msgstr "null prosrc"
+#: catalog/pg_proc.c:541
+#, c-format
+msgid "return type %s is not supported for SQL functions"
+msgstr ""
-#: catalog/pg_proc.c:495
+#: catalog/pg_proc.c:578
#, c-format
msgid "there is no built-in function named \"%s\""
msgstr "встроенной функции \"%s\" не существует"
-#: catalog/pg_proc.c:535
-msgid "null probin"
-msgstr "null probin"
-
-#: catalog/pg_proc.c:578
+#: catalog/pg_proc.c:671
#, c-format
msgid "SQL functions cannot return type %s"
msgstr "SQL-функции не могут возвращать тип %s"
-#: catalog/pg_proc.c:584
+#: catalog/pg_proc.c:687
#, c-format
msgid "SQL functions cannot have arguments of type %s"
msgstr "SQL-функции не могут иметь аргументы типа %s"
-#: catalog/pg_type.c:171 catalog/pg_type.c:175
+#: catalog/pg_type.c:195
+#: catalog/pg_type.c:201
#, c-format
-msgid "TypeCreate: invalid type internal size %d"
+msgid "invalid type internal size %d"
msgstr ""
-#: catalog/pg_type.c:180
-msgid "TypeCreate: fixed size types must have storage PLAIN"
+#: catalog/pg_type.c:208
+msgid "fixed-size types must have storage PLAIN"
msgstr ""
-#: catalog/pg_type.c:257
+#: catalog/pg_type.c:289
+#: catalog/pg_type.c:511
#, c-format
-msgid "type %s already exists"
-msgstr "тип %s уже существует"
+msgid "type \"%s\" already exists"
+msgstr "тип \"%s\" уже существует"
-#: catalog/pg_type.c:437
+#: catalog/pg_type.c:503
+#: commands/functioncmds.c:109
+#: commands/typecmds.c:407
+#: commands/typecmds.c:786
+#: commands/typecmds.c:1113
+#: commands/typecmds.c:1233
+#: commands/typecmds.c:1353
+#: commands/typecmds.c:1440
+#: commands/typecmds.c:2034
+#: parser/parse_func.c:1526
+#: parser/parse_type.c:201
+#: parser/parse_type.c:227
+#: tcop/utility.c:95
#, c-format
-msgid "type %s does not exist"
-msgstr "тип %s не существует"
+msgid "type \"%s\" does not exist"
+msgstr "тип \"%s\" не существует"
-#: catalog/pg_type.c:443
+#: commands/aggregatecmds.c:97
#, c-format
-msgid "type named %s already exists"
-msgstr "тип %s уже существует"
+msgid "aggregate attribute \"%s\" not recognized"
+msgstr "агрегатный атрибут \"%s\" не распознан"
-#: commands/analyze.c:199
-#, c-format
-msgid "Skipping \"%s\" --- only table or database owner can ANALYZE it"
+#: commands/aggregatecmds.c:107
+msgid "aggregate basetype must be specified"
msgstr ""
-#: commands/analyze.c:213 commands/vacuum.c:784
-#, c-format
-msgid ""
-"Skipping \"%s\" --- can not process indexes, views or special system tables"
+#: commands/aggregatecmds.c:111
+msgid "aggregate stype must be specified"
msgstr ""
-"Пропускается \"%s\" --- индексы, виды илм специальные системные таблицы не "
-"обрабатываются"
-
-#: commands/analyze.c:242
-#, c-format
-msgid "Analyzing %s.%s"
-msgstr "Анализируется %s.%s"
-#: commands/analyze.c:431 utils/adt/ruleutils.c:2498
-#, c-format
-msgid "cache lookup of type %u failed"
+#: commands/aggregatecmds.c:115
+msgid "aggregate sfunc must be specified"
msgstr ""
-#: commands/analyze.c:638
-#, c-format
-msgid "acquire_sample_rows: ReadBuffer(%s,%u) failed"
-msgstr "acquire_sample_rows: ReadBuffer(%s,%u) не удался"
-
-#: commands/aggregatecmds.c:93
+#: commands/aggregatecmds.c:138
#, c-format
-msgid "DefineAggregate: attribute \"%s\" not recognized"
-msgstr ""
-
-#: commands/aggregatecmds.c:101
-msgid "Define: \"basetype\" unspecified"
-msgstr ""
-
-#: commands/aggregatecmds.c:103
-msgid "Define: \"stype\" unspecified"
-msgstr ""
-
-#: commands/aggregatecmds.c:105
-msgid "Define: \"sfunc\" unspecified"
+msgid "aggregate transition datatype cannot be %s"
msgstr ""
-#: commands/aggregatecmds.c:123
+#: commands/aggregatecmds.c:259
#, c-format
-msgid "Aggregate transition datatype cannot be %s"
+msgid "function %s(*) already exists in schema \"%s\""
msgstr ""
-#: commands/aggregatecmds.c:174
+#: commands/aggregatecmds.c:265
+#: commands/functioncmds.c:680
#, c-format
-msgid "RemoveAggregate: couldn't find pg_proc tuple for %s"
+msgid "function %s already exists in schema \"%s\""
msgstr ""
-#: commands/async.c:153
-#, c-format
-msgid "Async_Notify: %s"
-msgstr "Async_Notify: %s"
-
-#: commands/async.c:201
-#, c-format
-msgid "Async_Listen: %s"
-msgstr "Async_Listen: %s"
-
-#: commands/async.c:224
+#: commands/analyze.c:200
#, c-format
-msgid "Async_Listen: We are already listening on %s"
+msgid "skipping \"%s\" --- only table or database owner can ANALYZE it"
msgstr ""
-#: commands/async.c:296
+#: commands/analyze.c:215
#, c-format
-msgid "Async_Unlisten %s"
-msgstr "Async_Unlisten %s"
+msgid "skipping \"%s\" --- cannot ANALYZE indexes, views or special system tables"
+msgstr "пропускается \"%s\" --- индексы, виды или специальные системные таблицы не анализируются"
-#: commands/async.c:354
-msgid "Async_UnlistenAll"
-msgstr "Async_UnlistenAll"
-
-#: commands/async.c:456
-msgid "AtCommit_Notify"
-msgstr "AtCommit_Notify"
-
-#: commands/async.c:488
-msgid "AtCommit_Notify: notifying self"
-msgstr ""
-
-#: commands/async.c:495
+#: commands/analyze.c:245
#, c-format
-msgid "AtCommit_Notify: notifying pid %d"
-msgstr ""
-
-#: commands/async.c:544
-msgid "AtCommit_Notify: done"
-msgstr "AtCommit_Notify: завершено"
-
-#: commands/async.c:621
-msgid "Async_NotifyHandler: perform async notify"
-msgstr ""
-
-#: commands/async.c:626
-msgid "Async_NotifyHandler: done"
-msgstr "Async_NotifyHandler: завершено"
+msgid "analyzing \"%s.%s\""
+msgstr "анализируется \"%s.%s\""
-#: commands/async.c:693
-msgid "EnableNotifyInterrupt: perform async notify"
+#: commands/cluster.c:150
+#, c-format
+msgid "there is no previously clustered index for table \"%s\""
msgstr ""
-#: commands/async.c:698
-msgid "EnableNotifyInterrupt: done"
-msgstr "EnableNotifyInterrupt: завершено"
-
-#: commands/async.c:749
-msgid "ProcessIncomingNotify"
-msgstr "ProcessIncomingNotify"
-
-#: commands/async.c:785
+#: commands/cluster.c:164
+#: commands/tablecmds.c:3988
#, c-format
-msgid "ProcessIncomingNotify: received %s from %d"
-msgstr "ProcessIncomingNotify: получено %s от %d"
-
-#: commands/async.c:820
-msgid "ProcessIncomingNotify: done"
-msgstr "ProcessIncomingNotify: завершено"
+msgid "index \"%s\" for table \"%s\" does not exist"
+msgstr "индекс \"%s\" для таблицы \"%s\" не существует"
-#: commands/async.c:847
+#: commands/cluster.c:321
#, c-format
-msgid "NOTIFY for %s"
-msgstr "NOTIFY для %s"
+msgid "\"%s\" is not an index for table \"%s\""
+msgstr "\"%s\" не является индексом для таблицы \"%s\""
-#: commands/cluster.c:119
-#, c-format
-msgid "CLUSTER: You do not own relation %s"
+#: commands/cluster.c:334
+msgid "cannot cluster on partial index"
msgstr ""
-#: commands/cluster.c:137 commands/cluster.c:541 commands/cluster.c:560
-#, c-format
-msgid "Cache lookup failed for index %u"
-msgstr "Поиск в кэше индекса %u не удался"
-
-#: commands/cluster.c:150
-#, c-format
-msgid "CLUSTER: No previously clustered index found on table \"%s\""
+#: commands/cluster.c:352
+msgid "cannot cluster when index access method does not handle nulls"
msgstr ""
-#: commands/cluster.c:159
+#: commands/cluster.c:353
#, c-format
-msgid "CLUSTER: cannot find index \"%s\" for table \"%s\""
+msgid "You may be able to work around this by marking column \"%s\" NOT NULL."
msgstr ""
-#: commands/cluster.c:312
-#, c-format
-msgid "CLUSTER: \"%s\" is not an index for table \"%s\""
+#: commands/cluster.c:365
+msgid "cannot cluster on expressional index when index access method does not handle nulls"
msgstr ""
-#: commands/cluster.c:324
+#: commands/cluster.c:379
#, c-format
-msgid "CLUSTER: cannot cluster system relation \"%s\""
-msgstr ""
+msgid "\"%s\" is a system catalog"
+msgstr "\"%s\" является системным каталогом"
-#: commands/cluster.c:332
-msgid "CLUSTER cannot be used on temp tables of other processes"
+#: commands/cluster.c:389
+msgid "cannot cluster temp tables of other processes"
msgstr ""
-#: commands/cluster.c:627
+#: commands/async.c:225
#, c-format
-msgid "cache lookup failed for index %u"
-msgstr "поиск в кэше индекса %u не удался"
-
-#: commands/cluster.c:679 commands/cluster.c:686
-#, c-format
-msgid "CLUSTER: Cannot find tuple for relation %u"
+msgid "already listening on \"%s\""
msgstr ""
-#: commands/cluster.c:698 commands/cluster.c:704
+#: commands/conversioncmds.c:66
#, c-format
-msgid "CLUSTER: FlushRelationBuffers returned %d"
-msgstr "CLUSTER: FlushRelationBuffers возвратила %d"
-
-#: commands/cluster.c:766
-msgid "CLUSTER: expected both swapped tables to have TOAST tables"
+msgid "source encoding \"%s\" does not exist"
msgstr ""
-#: commands/cluster.c:772 commands/cluster.c:777
+#: commands/conversioncmds.c:73
#, c-format
-msgid "CLUSTER: expected one dependency record for TOAST table, found %ld"
+msgid "destination encoding \"%s\" does not exist"
msgstr ""
-#: commands/comment.c:111
+#: commands/conversioncmds.c:151
#, c-format
-msgid "An attempt was made to comment on a unknown type: %d"
+msgid "conversion \"%s\" already exists in schema \"%s\""
msgstr ""
-#: commands/comment.c:306
+#: commands/comment.c:309
+#: commands/indexcmds.c:583
+#: commands/indexcmds.c:617
#, c-format
msgid "relation \"%s\" is not an index"
msgstr "объект \"%s\" не является индексом"
-#: commands/comment.c:311
+#: commands/comment.c:316
#, c-format
msgid "relation \"%s\" is not a sequence"
-msgstr ""
+msgstr "связь \"%s\" не является последовательностью"
-#: commands/comment.c:316
+#: commands/comment.c:323
+#: commands/indexcmds.c:109
+#: commands/indexcmds.c:669
#, c-format
msgid "relation \"%s\" is not a table"
msgstr "объект \"%s\" не является таблицей"
-#: commands/comment.c:321
+#: commands/comment.c:330
#, c-format
msgid "relation \"%s\" is not a view"
msgstr "объект \"%s\" не является видом"
-#: commands/comment.c:357
-msgid "CommentAttribute: must specify relation.attribute"
-msgstr ""
-
-#: commands/comment.c:374 commands/tablecmds.c:1953 commands/tablecmds.c:2087
-#: commands/tablecmds.c:2205 commands/tablecmds.c:2422
-#: optimizer/prep/prepunion.c:802 parser/parse_func.c:1176
-#: parser/parse_relation.c:1551 parser/parse_relation.c:1614
-#: parser/parse_relation.c:1770 parser/parse_type.c:88
+#: commands/comment.c:386
+#: commands/tablecmds.c:2020
+#: commands/tablecmds.c:2164
+#: commands/tablecmds.c:2292
+#: commands/tablecmds.c:2456
+#: commands/tablecmds.c:2669
+#: parser/parse_func.c:1270
+#: parser/parse_relation.c:1583
+#: parser/parse_relation.c:1641
+#: parser/parse_relation.c:1820
+#: parser/parse_type.c:94
#, c-format
-msgid "Relation \"%s\" has no column \"%s\""
-msgstr "Связь \"%s\" не имеет колонки \"%s\""
+msgid "attribute \"%s\" of relation \"%s\" does not exist"
+msgstr "атрибут \"%s\" для связи \"%s\" не существует"
-#: commands/comment.c:403
-msgid "CommentDatabase: database name may not be qualified"
-msgstr ""
-
-#: commands/comment.c:409 commands/dbcommands.c:531 utils/adt/acl.c:1038
-#, c-format
-msgid "database \"%s\" does not exist"
-msgstr "база данных \"%s\" не существует"
-
-#: commands/comment.c:414
-#, c-format
-msgid "you are not permitted to comment on database \"%s\""
+#: commands/comment.c:417
+msgid "database name may not be qualified"
msgstr ""
-#: commands/comment.c:419
-msgid "Database comments may only be applied to the current database"
+#: commands/comment.c:449
+msgid "database comments may only be applied to the current database"
msgstr ""
-#: commands/comment.c:442
-msgid "CommentSchema: schema name may not be qualified"
+#: commands/comment.c:481
+#: commands/schemacmds.c:172
+msgid "schema name may not be qualified"
msgstr ""
-#: commands/comment.c:449
-#, c-format
-msgid "CommentSchema: Schema \"%s\" could not be found"
-msgstr "CommentSchema: Схема \"%s\" не найдена"
-
-#: commands/comment.c:521 commands/comment.c:555
+#: commands/comment.c:564
#, c-format
msgid "rule \"%s\" does not exist"
msgstr "правило \"%s\" не существует"
-#: commands/comment.c:527
+#: commands/comment.c:572
#, c-format
-msgid ""
-"There are multiple rules \"%s\"\n"
-"\tPlease specify a relation name as well as a rule name"
+msgid "there are multiple rules \"%s\""
msgstr ""
-#: commands/comment.c:732
-msgid "CommentTrigger: must specify relation and trigger"
+#: commands/comment.c:573
+msgid "Specify a relation name as well as a rule name."
msgstr ""
-#: commands/comment.c:765
+#: commands/comment.c:815
+#: commands/trigger.c:484
+#: commands/trigger.c:697
#, c-format
msgid "trigger \"%s\" for relation \"%s\" does not exist"
msgstr "триггер \"%s\" для связи \"%s\" не существует"
-#: commands/comment.c:807
-msgid "CommentConstraint: must specify relation and constraint"
-msgstr ""
-
-#: commands/comment.c:841
+#: commands/comment.c:894
#, c-format
-msgid "Relation \"%s\" has multiple constraints named \"%s\""
+msgid "relation \"%s\" has multiple constraints named \"%s\""
msgstr ""
-#: commands/comment.c:851
+#: commands/comment.c:906
#, c-format
msgid "constraint \"%s\" for relation \"%s\" does not exist"
msgstr ""
-#: commands/conversioncmds.c:58
-#, c-format
-msgid "Invalid for encoding name: %s"
-msgstr "Невернаое имя исходной кодировки (for): %s"
+#: commands/copy.c:684
+#: commands/copy.c:692
+#: commands/copy.c:700
+#: commands/copy.c:708
+#: commands/dbcommands.c:103
+#: commands/dbcommands.c:111
+#: commands/dbcommands.c:119
+#: commands/dbcommands.c:127
+#: commands/functioncmds.c:220
+#: commands/functioncmds.c:228
+#: commands/functioncmds.c:236
+#: commands/functioncmds.c:244
+#: commands/functioncmds.c:252
+#: commands/sequence.c:895
+#: commands/sequence.c:908
+#: commands/sequence.c:916
+#: commands/sequence.c:924
+#: commands/sequence.c:932
+#: commands/sequence.c:940
+#: commands/user.c:525
+#: commands/user.c:537
+#: commands/user.c:545
+#: commands/user.c:553
+#: commands/user.c:561
+#: commands/user.c:569
+#: commands/user.c:775
+#: commands/user.c:787
+#: commands/user.c:795
+#: commands/user.c:803
+#: commands/user.c:1275
+#: commands/user.c:1283
+msgid "conflicting or redundant options"
+msgstr ""
-#: commands/conversioncmds.c:62
+#: commands/dbcommands.c:153
#, c-format
-msgid "Invalid to encoding name: %s"
-msgstr "Неверное имя кодировки назначения (to): %s"
+msgid "%d is not a valid encoding code"
+msgstr "%d не является верным кодом кодировки"
-#: commands/copy.c:128
+#: commands/dbcommands.c:162
#, c-format
-msgid "CopySendData: %m"
-msgstr "CopySendData: %m"
-
-#: commands/copy.c:303
-msgid "COPY: BINARY option appears more than once"
-msgstr ""
+msgid "%s is not a valid encoding name"
+msgstr "%s не является верным именем кодировки"
-#: commands/copy.c:310
-msgid "COPY: OIDS option appears more than once"
-msgstr ""
+#: commands/dbcommands.c:183
+msgid "permission denied to create database"
+msgstr "доступ запрещён по созданию базы"
-#: commands/copy.c:317
-msgid "COPY: DELIMITER string may only be defined once in query"
+#: commands/dbcommands.c:192
+msgid "must be superuser to create database for another user"
msgstr ""
-#: commands/copy.c:324
-msgid "COPY: NULL representation may only be defined once in query"
+#: commands/dbcommands.c:203
+msgid "cannot use an alternate location on this platform"
msgstr ""
-#: commands/copy.c:329
+#: commands/dbcommands.c:217
+#: commands/dbcommands.c:384
+#: commands/dbcommands.c:632
#, c-format
-msgid "COPY: option \"%s\" not recognized"
-msgstr ""
-
-#: commands/copy.c:334
-msgid "You can not specify the DELIMITER in BINARY mode."
-msgstr ""
-
-#: commands/copy.c:337
-msgid "You can not specify NULL in BINARY mode."
-msgstr ""
-
-#: commands/copy.c:357
-msgid ""
-"You must have Postgres superuser privilege to do a COPY directly to or from "
-"a file. Anyone can COPY to stdout or from stdin. Psql's \\copy command "
-"also works for anyone."
-msgstr ""
-
-#: commands/copy.c:366
-msgid "COPY BINARY is not supported to stdout or from stdin"
-msgstr ""
-
-#: commands/copy.c:372
-msgid "COPY delimiter must be a single character"
-msgstr ""
+msgid "database \"%s\" already exists"
+msgstr "база \"%s\" уже существует"
-#: commands/copy.c:378
+#: commands/dbcommands.c:231
#, c-format
-msgid "COPY: table \"%s\" does not have OIDs"
-msgstr "COPY: таблица \"%s\" не содержит OIDs"
+msgid "template \"%s\" does not exist"
+msgstr "шаблон \"%s\" не существует"
-#: commands/copy.c:399 commands/copy.c:444
+#: commands/dbcommands.c:242
#, c-format
-msgid "You cannot copy view %s"
-msgstr "Вы не можете копировать вид %s"
+msgid "permission denied to copy database \"%s\""
+msgstr "доступ запрещён по копированию базы \"%s\""
-#: commands/copy.c:402
+#: commands/dbcommands.c:263
#, c-format
-msgid "You cannot change sequence relation %s"
+msgid "source database \"%s\" is being accessed by other users"
msgstr ""
-#: commands/copy.c:405 commands/copy.c:450
-#, c-format
-msgid "You cannot copy object %s"
-msgstr "Вы не можете копировать объект %s"
-
-#: commands/copy.c:425
+#: commands/dbcommands.c:274
#, c-format
-msgid ""
-"COPY command, running in backend with effective uid %d, could not open file "
-"'%s' for reading. Errno = %s (%d)."
+msgid "invalid backend encoding %d"
msgstr ""
-"Команда COPY, выполняющаяся в backendе с эффективным UID %d, не смогла "
-"открыть файл '%s' для чтения. Errno = %s (%d)."
-
-#: commands/copy.c:434 commands/copy.c:490
-#, c-format
-msgid "COPY: %s is a directory"
-msgstr "COPY: %s является директорией"
-#: commands/copy.c:447
-#, c-format
-msgid "You cannot copy sequence %s"
+#: commands/dbcommands.c:304
+#: commands/dbcommands.c:308
+#: commands/dbcommands.c:312
+msgid "database path may not contain single quotes"
msgstr ""
-#: commands/copy.c:474
-msgid "Relative path not allowed for server side COPY command"
-msgstr ""
+#: commands/dbcommands.c:337
+#, c-format
+msgid "could not create database directory \"%s\": %m"
+msgstr "не получилось создать директорию баз данных \"%s\": %m"
-#: commands/copy.c:482
+#: commands/dbcommands.c:342
#, c-format
-msgid ""
-"COPY command, running in backend with effective uid %d, could not open file "
-"'%s' for writing. Errno = %s (%d)."
+msgid "could not remove temp directory \"%s\": %m"
msgstr ""
-"Команда COPY, выполняющаяся в backendе с эффективным UID %d, не смогла "
-"открыть файл '%s' для записи. Errno = %s (%d)."
-#: commands/copy.c:561
+#: commands/dbcommands.c:353
#, c-format
-msgid "COPY: couldn't lookup info for type %u"
+msgid "could not link \"%s\" to \"%s\": %m"
msgstr ""
-#: commands/copy.c:565 commands/copy.c:835
-msgid "COPY BINARY: cstring not supported"
+#: commands/dbcommands.c:462
+msgid "cannot drop the currently open database"
msgstr ""
-#: commands/copy.c:906
-msgid "COPY BINARY: file signature not recognized"
+#: commands/dbcommands.c:495
+msgid "cannot drop a template database"
msgstr ""
-#: commands/copy.c:910
-msgid "COPY BINARY: incompatible integer layout"
+#: commands/dbcommands.c:506
+#: commands/dbcommands.c:622
+#, c-format
+msgid "database \"%s\" is being accessed by other users"
msgstr ""
-#: commands/copy.c:914
-msgid "COPY BINARY: bogus file header (missing flags)"
+#: commands/dbcommands.c:613
+msgid "current database may not be renamed"
msgstr ""
-#: commands/copy.c:918
-msgid "COPY BINARY: unrecognized critical flags in header"
-msgstr ""
+#: commands/dbcommands.c:644
+msgid "permission denied to rename database"
+msgstr "доступ запрещён по переименованию базы"
-#: commands/copy.c:922
-msgid "COPY BINARY: bogus file header (missing length)"
+#: commands/dbcommands.c:863
+msgid "relative paths are not allowed as database locations"
msgstr ""
-#: commands/copy.c:928
-msgid "COPY BINARY: bogus file header (wrong length)"
+#: commands/dbcommands.c:867
+msgid "absolute paths are not allowed as database locations"
msgstr ""
-#: commands/copy.c:979
-msgid "NULL Oid"
-msgstr "NULL Oid"
-
-#: commands/copy.c:985
-msgid "Invalid Oid"
-msgstr "Неверный Oid"
-
-#: commands/copy.c:1002
+#: commands/dbcommands.c:879
#, c-format
-msgid "Missing data for column \"%s\""
-msgstr "Отсутствуют данные для колонки \"%s\""
-
-#: commands/copy.c:1034
-msgid "Extra data after last expected column"
+msgid "postmaster environment variable \"%s\" not found"
msgstr ""
-#: commands/copy.c:1058
+#: commands/dbcommands.c:884
#, c-format
-msgid "COPY BINARY: tuple field count is %d, expected %d"
+msgid "postmaster environment variable \"%s\" must be absolute path"
msgstr ""
-#: commands/copy.c:1065 commands/copy.c:1071 commands/copy.c:1086
-#: commands/copy.c:1100 commands/copy.c:1109 commands/copy.c:1121
-#: commands/copy.c:1136
-msgid "COPY BINARY: unexpected EOF"
+#: commands/dbcommands.c:893
+msgid "alternate path is too long"
msgstr ""
-#: commands/copy.c:1067
+#: commands/dbcommands.c:924
#, c-format
-msgid "COPY BINARY: sizeof(Oid) is %d, expected %d"
-msgstr ""
-
-#: commands/copy.c:1073
-msgid "COPY BINARY: Invalid Oid"
-msgstr ""
+msgid "could not remove \"%s\": %m"
+msgstr "не получилось удалить \"%s\": %m"
-#: commands/copy.c:1090
+#: commands/dbcommands.c:939
#, c-format
-msgid "COPY BINARY: sizeof(field %d) is %d, expected %d"
+msgid "could not remove database directory \"%s\": %m"
msgstr ""
-#: commands/copy.c:1102
-msgid "COPY BINARY: bogus varlena length"
+#: commands/copy.c:177
+#: commands/copy.c:189
+#: commands/copy.c:222
+#: commands/copy.c:232
+msgid "COPY BINARY is not supported to stdout or from stdin"
msgstr ""
-#: commands/copy.c:1284
+#: commands/copy.c:285
#, c-format
-msgid "GetInputFunction: Cache lookup of type %u failed"
+msgid "failed to write COPY file: %m"
msgstr ""
-#: commands/copy.c:1300
-#, c-format
-msgid "GetTypeElement: Cache lookup of type %u failed"
+#: commands/copy.c:293
+msgid "connection lost during COPY to stdout"
msgstr ""
-#: commands/copy.c:1442
-msgid "CopyReadAttribute: end of record marker corrupted"
+#: commands/copy.c:376
+#: commands/copy.c:394
+#: commands/copy.c:398
+#: commands/copy.c:458
+#: commands/copy.c:507
+#: tcop/fastpath.c:292
+#: tcop/postgres.c:281
+#: tcop/postgres.c:304
+msgid "unexpected EOF on client connection"
msgstr ""
-#: commands/copy.c:1594
+#: commands/copy.c:410
#, c-format
-msgid "Attribute \"%s\" specified more than once"
-msgstr "Атрибут \"%s\" указан более одного раза"
-
-#: commands/dbcommands.c:99 commands/dbcommands.c:105
-#: commands/dbcommands.c:111 commands/dbcommands.c:117
-msgid "CREATE DATABASE: conflicting options"
+msgid "COPY from stdin failed: %s"
msgstr ""
-#: commands/dbcommands.c:121
+#: commands/copy.c:425
#, c-format
-msgid "CREATE DATABASE: option \"%s\" not recognized"
+msgid "unexpected message type 0x%02X during COPY from stdin"
msgstr ""
-#: commands/dbcommands.c:141
-#, c-format
-msgid "%d is not a valid encoding code"
-msgstr "%d не является верным кодом кодировки"
+#: commands/copy.c:719
+msgid "cannot specify DELIMITER in BINARY mode"
+msgstr ""
-#: commands/dbcommands.c:147
-#, c-format
-msgid "%s is not a valid encoding name"
-msgstr "%s не является верным именем кодировки"
+#: commands/copy.c:724
+msgid "cannot specify NULL in BINARY mode"
+msgstr ""
-#: commands/dbcommands.c:151
-msgid "CREATE DATABASE: bogus encoding parameter"
+#: commands/copy.c:742
+#: executor/execMain.c:462
+#: tcop/utility.c:260
+msgid "transaction is read-only"
+msgstr "транзакция установлена \"только для чтения\""
+
+#: commands/copy.c:753
+msgid "must be superuser to COPY to or from a file"
msgstr ""
-#: commands/dbcommands.c:164 commands/dbcommands.c:171
-msgid "CREATE DATABASE: permission denied"
+#: commands/copy.c:754
+msgid "Anyone can COPY to stdout or from stdin. psql's \\copy command also works for anyone."
msgstr ""
-#: commands/dbcommands.c:186 commands/dbcommands.c:326
-#, c-format
-msgid "CREATE DATABASE: database \"%s\" already exists"
+#: commands/copy.c:763
+msgid "COPY delimiter must be a single character"
msgstr ""
-#: commands/dbcommands.c:198
+#: commands/copy.c:771
#, c-format
-msgid "CREATE DATABASE: template \"%s\" does not exist"
-msgstr ""
+msgid "table \"%s\" does not have OIDs"
+msgstr "таблица \"%s\" не содержит OIDs"
-#: commands/dbcommands.c:208
+#: commands/copy.c:799
#, c-format
-msgid "CREATE DATABASE: permission to copy \"%s\" denied"
-msgstr ""
+msgid "cannot copy to view \"%s\""
+msgstr "нельзя копировать в вид \"%s\""
-#: commands/dbcommands.c:227
+#: commands/copy.c:804
#, c-format
-msgid ""
-"CREATE DATABASE: source database \"%s\" is being accessed by other users"
-msgstr ""
+msgid "cannot copy to sequence \"%s\""
+msgstr "нельзя копировать в последовательность \"%s\""
-#: commands/dbcommands.c:235
-msgid "CREATE DATABASE: invalid backend encoding"
-msgstr ""
+#: commands/copy.c:809
+#, c-format
+msgid "cannot copy to non-table relation \"%s\""
+msgstr "нельзя копировать в не-таблицу \"%s\""
-#: commands/dbcommands.c:263 commands/dbcommands.c:265
-#: commands/dbcommands.c:267
-msgid "database path may not contain single quotes"
-msgstr ""
+#: commands/copy.c:828
+#, c-format
+msgid "could not open file \"%s\" for reading: %m"
+msgstr "не получилось отктрыть файл \"%s\" для чтения: %m"
-#: commands/dbcommands.c:290
+#: commands/copy.c:837
+#: commands/copy.c:899
#, c-format
-msgid "CREATE DATABASE: unable to create database directory '%s': %m"
-msgstr ""
+msgid "\"%s\" is a directory"
+msgstr "\"%s\" является директорией"
-#: commands/dbcommands.c:293
+#: commands/copy.c:849
#, c-format
-msgid "CREATE DATABASE: unable to remove temp directory '%s': %m"
-msgstr ""
+msgid "cannot copy from view \"%s\""
+msgstr "нельзя копировать из вида \"%s\""
-#: commands/dbcommands.c:300
+#: commands/copy.c:854
#, c-format
-msgid "CREATE DATABASE: could not link '%s' to '%s': %m"
-msgstr ""
+msgid "cannot copy from sequence \"%s\""
+msgstr "нельзя копировать из последовательности \"%s\""
-#: commands/dbcommands.c:310
-msgid "CREATE DATABASE: could not initialize database directory"
-msgstr ""
+#: commands/copy.c:859
+#, c-format
+msgid "cannot copy from non-table relation \"%s\""
+msgstr "нельзя копировать из не-таблицы \"%s\""
-#: commands/dbcommands.c:312
-msgid ""
-"CREATE DATABASE: could not initialize database directory; delete failed as "
-"well"
+#: commands/copy.c:881
+msgid "relative path not allowed for COPY to file"
msgstr ""
-#: commands/dbcommands.c:402
-msgid "DROP DATABASE: cannot be executed on the currently open database"
-msgstr ""
+#: commands/copy.c:890
+#, c-format
+msgid "could not open file \"%s\" for writing: %m"
+msgstr "не получилось отктрыть файл \"%s\" для записи: %m"
-#: commands/dbcommands.c:419
+#: commands/copy.c:1114
#, c-format
-msgid "DROP DATABASE: database \"%s\" does not exist"
-msgstr ""
+msgid "COPY FROM, line %d"
+msgstr "COPY FROM, строка %d"
-#: commands/dbcommands.c:422
-msgid "DROP DATABASE: permission denied"
+#: commands/copy.c:1282
+msgid "COPY file signature not recognized"
msgstr ""
-#: commands/dbcommands.c:430
-msgid "DROP DATABASE: database is marked as a template"
+#: commands/copy.c:1288
+msgid "invalid COPY file header (missing flags)"
msgstr ""
-#: commands/dbcommands.c:439
-#, c-format
-msgid "DROP DATABASE: database \"%s\" is being accessed by other users"
+#: commands/copy.c:1294
+msgid "unrecognized critical flags in COPY file header"
msgstr ""
-#: commands/dbcommands.c:456
-#, c-format
-msgid ""
-"DROP DATABASE: Database \"%s\" doesn't exist despite earlier reports to the "
-"contrary"
+#: commands/copy.c:1300
+msgid "invalid COPY file header (missing length)"
msgstr ""
-#: commands/dbcommands.c:700
-msgid "Relative paths are not allowed as database locations"
+#: commands/copy.c:1308
+msgid "invalid COPY file header (wrong length)"
msgstr ""
-#: commands/dbcommands.c:702
-msgid "Absolute paths are not allowed as database locations"
+#: commands/copy.c:1376
+msgid "null OID in COPY data"
msgstr ""
-#: commands/dbcommands.c:712
-#, c-format
-msgid "Postmaster environment variable '%s' not set"
+#: commands/copy.c:1384
+#: commands/copy.c:1499
+msgid "invalid OID in COPY data"
msgstr ""
-#: commands/dbcommands.c:714
+#: commands/copy.c:1403
#, c-format
-msgid "Postmaster environment variable '%s' must be absolute path"
-msgstr ""
+msgid "missing data for column \"%s\""
+msgstr "отсутствуют данные для колонки \"%s\""
-#: commands/dbcommands.c:720
-msgid "Alternate path is too long"
+#: commands/copy.c:1449
+#: commands/copy.c:1460
+msgid "extra data after last expected column"
msgstr ""
-#: commands/dbcommands.c:749
+#: commands/copy.c:1486
#, c-format
-msgid "could not remove '%s': %m"
+msgid "row field count is %d, expected %d"
msgstr ""
-#: commands/dbcommands.c:758
-#, c-format
-msgid "database directory '%s' could not be removed"
+#: commands/copy.c:1691
+#: commands/copy.c:1709
+msgid "literal carriage return found in data"
msgstr ""
-#: commands/dbcommands.c:830 commands/vacuum.c:581
-#, c-format
-msgid "database %u does not exist"
+#: commands/copy.c:1692
+#: commands/copy.c:1710
+msgid "Use \"\\r\" to represent carriage return."
msgstr ""
-#: commands/define.c:68 commands/define.c:157 commands/define.c:185
-#: commands/define.c:215
-#, c-format
-msgid "Define: \"%s\" requires a parameter"
+#: commands/copy.c:1728
+msgid "literal newline found in data"
msgstr ""
-#: commands/define.c:93 commands/define.c:239
-#, c-format
-msgid "Define: cannot interpret argument of \"%s\""
+#: commands/copy.c:1729
+msgid ""
+"Use \"\\n"
+"\" to represent newline."
msgstr ""
-#: commands/define.c:106 commands/define.c:115 commands/define.c:128
-#: commands/define.c:144
-#, c-format
-msgid "Define: \"%s\" requires a numeric value"
+#: commands/copy.c:1826
+#: commands/copy.c:1842
+msgid "end-of-copy marker does not match previous newline style"
msgstr ""
-#: commands/define.c:169
-#, c-format
-msgid "Define: argument of \"%s\" must be a name"
+#: commands/copy.c:1830
+#: commands/copy.c:1836
+msgid "end-of-copy marker corrupt"
msgstr ""
-#: commands/define.c:201
-#, c-format
-msgid "Define: argument of \"%s\" must be a type name"
+#: commands/copy.c:1911
+#: commands/copy.c:1933
+msgid "unexpected EOF in COPY data"
msgstr ""
-#: commands/define.c:222
+#: commands/copy.c:1920
#, c-format
-msgid "Define: \"%s\" requires an integral value"
+msgid "invalid size for field %d"
msgstr ""
-#: commands/define.c:242
+#: commands/copy.c:1947
#, c-format
-msgid "Define: invalid argument for \"%s\": \"%s\""
-msgstr "Define: неверный аргумент для \"%s\": \"%s\""
+msgid "incorrect binary data format in field %d"
+msgstr ""
-#: commands/explain.c:890
+#: commands/copy.c:2067
+#: parser/parse_target.c:500
#, c-format
-msgid "show_sort_keys: no tlist entry for key %d"
-msgstr ""
+msgid "attribute \"%s\" specified more than once"
+msgstr "атрибут \"%s\" указан более одного раза"
-#: commands/functioncmds.c:81
+#: commands/functioncmds.c:83
#, c-format
-msgid "SQL function cannot return shell type \"%s\""
-msgstr "SQL-функции не могут возвращать тип shell \"%s\""
+msgid "SQL function cannot return shell type %s"
+msgstr "SQL-функция не может возвращать тип оболочки %s"
-#: commands/functioncmds.c:84
+#: commands/functioncmds.c:88
#, c-format
-msgid "Return type \"%s\" is only a shell"
+msgid "return type %s is only a shell"
msgstr ""
-#: commands/functioncmds.c:103 commands/functioncmds.c:159
-#: commands/typecmds.c:345 commands/typecmds.c:352 commands/typecmds.c:689
-#: commands/typecmds.c:933 commands/typecmds.c:1052 commands/typecmds.c:1177
-#: commands/typecmds.c:1264 parser/parse_func.c:1403 parser/parse_oper.c:98
-#: parser/parse_oper.c:107 parser/parse_type.c:191 parser/parse_type.c:213
-#: parser/parse_type.c:219
+#: commands/functioncmds.c:114
#, c-format
-msgid "Type \"%s\" does not exist"
-msgstr "Тип \"%s\" не существует"
+msgid "type \"%s\" is not yet defined"
+msgstr "тип \"%s\" ещё не определён"
-#: commands/functioncmds.c:106
-#, c-format
-msgid "ProcedureCreate: type %s is not yet defined"
-msgstr "ProcedureCreate: тип %s ещё не определён"
+#: commands/functioncmds.c:115
+msgid "Creating a shell type definition."
+msgstr ""
-#: commands/functioncmds.c:116
+#: commands/functioncmds.c:162
#, c-format
-msgid "could not create type %s"
-msgstr "не получилось создать тип %s"
+msgid "SQL function cannot accept shell type %s"
+msgstr "SQL-функция не может принимать значение типа оболочки %s"
-#: commands/functioncmds.c:150
+#: commands/functioncmds.c:167
#, c-format
-msgid "SQL function cannot accept shell type \"%s\""
-msgstr "SQL-функции не могут принимать значение типа shell \"%s\""
+msgid "argument type %s is only a shell"
+msgstr "тип аргумента %s является только оболочкой"
-#: commands/functioncmds.c:153
+#: commands/functioncmds.c:175
+#: parser/parse_oper.c:113
+#: parser/parse_oper.c:124
#, c-format
-msgid "Argument type \"%s\" is only a shell"
-msgstr "Тип аргумента \"%s\" только shell"
-
-#: commands/functioncmds.c:164
-msgid "Functions cannot accept set arguments"
-msgstr "Функции не принимают аргументы-множества (set)"
-
-#: commands/functioncmds.c:200 commands/functioncmds.c:206
-#: commands/functioncmds.c:212 commands/functioncmds.c:218
-#: commands/functioncmds.c:224
-msgid "conflicting or redundant options"
-msgstr ""
+msgid "type %s does not exist"
+msgstr "тип %s не существует"
-#: commands/functioncmds.c:228
-msgid "invalid CREATE FUNCTION option"
-msgstr ""
+#: commands/functioncmds.c:182
+msgid "functions cannot accept set arguments"
+msgstr "функции не принимают аргументы-множества (set)"
-#: commands/functioncmds.c:234
+#: commands/functioncmds.c:265
msgid "no function body specified"
msgstr ""
-#: commands/functioncmds.c:239
+#: commands/functioncmds.c:272
msgid "no language specified"
msgstr "язык не указан"
-#: commands/functioncmds.c:250
-msgid "invalid volatility"
-msgstr ""
-
-#: commands/functioncmds.c:297
-#, c-format
-msgid "Unrecognized function attribute '%s' ignored"
-msgstr ""
-
-#: commands/functioncmds.c:339
-#, c-format
-msgid "CREATE FUNCTION: only one AS item needed for %s language"
-msgstr ""
-
-#: commands/functioncmds.c:399 utils/adt/acl.c:1442
-#, c-format
-msgid "language \"%s\" does not exist"
-msgstr "язык \"%s\" не существует"
-
-#: commands/functioncmds.c:505
-#, c-format
-msgid "RemoveFunction: couldn't find tuple for function %s"
-msgstr ""
-
-#: commands/functioncmds.c:515
-#, c-format
-msgid ""
-"RemoveFunction: function '%s' is an aggregate\n"
-"\tUse DROP AGGREGATE to remove it"
-msgstr ""
-
-#: commands/functioncmds.c:522
+#: commands/functioncmds.c:333
#, c-format
-msgid "Removing built-in function \"%s\""
+msgid "unrecognized function attribute \"%s\" ignored"
msgstr ""
-#: commands/functioncmds.c:560
+#: commands/functioncmds.c:377
#, c-format
-msgid "RemoveFunctionById: couldn't find tuple for function %u"
+msgid "only one AS item needed for language \"%s\""
msgstr ""
-#: commands/functioncmds.c:582
+#: commands/functioncmds.c:559
+#: commands/functioncmds.c:665
#, c-format
-msgid "RemoveFunctionById: couldn't find pg_aggregate tuple for %u"
-msgstr ""
-
-#: commands/functioncmds.c:614
-#, c-format
-msgid "SetFunctionReturnType: couldn't find tuple for function %u"
-msgstr ""
+msgid "\"%s\" is an aggregate function"
+msgstr "функция \"%s\" является агрегатом"
-#: commands/functioncmds.c:619
-#, c-format
-msgid "SetFunctionReturnType: function %u doesn't return OPAQUE"
+#: commands/functioncmds.c:561
+msgid "Use DROP AGGREGATE to drop aggregate functions."
msgstr ""
-#: commands/functioncmds.c:652
+#: commands/functioncmds.c:568
#, c-format
-msgid "SetFunctionArgType: couldn't find tuple for function %u"
-msgstr ""
+msgid "removing built-in function \"%s\""
+msgstr "удаление встроенной функции \"%s\""
-#: commands/functioncmds.c:658
-#, c-format
-msgid "SetFunctionArgType: function %u doesn't take OPAQUE"
+#: commands/functioncmds.c:667
+msgid "Use ALTER AGGREGATE to rename aggregate functions."
msgstr ""
-#: commands/functioncmds.c:693 commands/functioncmds.c:884
+#: commands/functioncmds.c:805
+#: commands/functioncmds.c:1039
#, c-format
msgid "source data type %s does not exist"
msgstr "исходный тип данных %s не существует"
-#: commands/functioncmds.c:698 commands/functioncmds.c:889
+#: commands/functioncmds.c:812
+#: commands/functioncmds.c:1046
#, c-format
msgid "target data type %s does not exist"
msgstr "тип данных назначения %s не существует"
-#: commands/functioncmds.c:702
+#: commands/functioncmds.c:818
msgid "source data type and target data type are the same"
msgstr ""
-#: commands/functioncmds.c:706
+#: commands/functioncmds.c:824
#, c-format
msgid "source data type %s is only a shell"
msgstr ""
-#: commands/functioncmds.c:710
+#: commands/functioncmds.c:830
#, c-format
msgid "target data type %s is only a shell"
msgstr ""
-#: commands/functioncmds.c:714
+#: commands/functioncmds.c:836
#, c-format
msgid "source data type %s is a pseudo-type"
msgstr ""
-#: commands/functioncmds.c:718
+#: commands/functioncmds.c:842
#, c-format
msgid "target data type %s is a pseudo-type"
msgstr ""
-#: commands/functioncmds.c:723 commands/functioncmds.c:904
+#: commands/functioncmds.c:850
+#: commands/functioncmds.c:1065
#, c-format
msgid "must be owner of type %s or type %s"
msgstr ""
-#: commands/functioncmds.c:743
-msgid "cast function must take 1 argument"
+#: commands/functioncmds.c:872
+msgid "cast function must take one argument"
msgstr ""
-#: commands/functioncmds.c:745
+#: commands/functioncmds.c:876
msgid "argument of cast function must match source data type"
msgstr ""
-#: commands/functioncmds.c:747
+#: commands/functioncmds.c:880
msgid "return data type of cast function must match target data type"
msgstr ""
-#: commands/functioncmds.c:749
+#: commands/functioncmds.c:891
msgid "cast function must not be volatile"
msgstr ""
-#: commands/functioncmds.c:751
+#: commands/functioncmds.c:896
msgid "cast function must not be an aggregate function"
msgstr ""
-#: commands/functioncmds.c:753
+#: commands/functioncmds.c:900
msgid "cast function must not return a set"
msgstr ""
-#: commands/functioncmds.c:774
-msgid "Must be superuser to create a cast WITHOUT FUNCTION"
+#: commands/functioncmds.c:923
+msgid "must be superuser to create a cast WITHOUT FUNCTION"
msgstr ""
-#: commands/functioncmds.c:787
+#: commands/functioncmds.c:938
msgid "source and target datatypes are not physically compatible"
msgstr ""
-#: commands/functioncmds.c:803
+#: commands/functioncmds.c:973
#, c-format
-msgid "CreateCast: bogus CoercionContext %c"
-msgstr ""
-
-#: commands/functioncmds.c:820
-#, c-format
-msgid "cast from data type %s to data type %s already exists"
-msgstr ""
+msgid "cast from type %s to type %s already exists"
+msgstr "конверсия типа %s в тип %s уже существует"
-#: commands/functioncmds.c:897
+#: commands/functioncmds.c:1056
#, c-format
msgid "cast from type %s to type %s does not exist"
msgstr "конверсия типа %s в тип %s не существует"
-#: commands/functioncmds.c:940
+#: commands/define.c:71
+#: commands/define.c:169
+#: commands/define.c:201
+#: commands/define.c:235
#, c-format
-msgid "could not find tuple for cast %u"
-msgstr ""
+msgid "%s requires a parameter"
+msgstr "%s требует параметр"
-#: commands/indexcmds.c:92
-msgid "DefineIndex: must specify at least one attribute"
-msgstr ""
-
-#: commands/indexcmds.c:94
+#: commands/define.c:110
+#: commands/define.c:121
+#: commands/define.c:136
+#: commands/define.c:154
#, c-format
-msgid "Cannot use more than %d attributes in an index"
-msgstr ""
+msgid "%s requires a numeric value"
+msgstr "%s требует цифровое значение"
-#: commands/indexcmds.c:105
+#: commands/define.c:183
#, c-format
-msgid "DefineIndex: relation \"%s\" is not a table"
+msgid "argument of %s must be a name"
msgstr ""
-#: commands/indexcmds.c:114
-msgid "Existing indexes are inactive. REINDEX first"
-msgstr ""
-
-#: commands/indexcmds.c:142
+#: commands/define.c:219
#, c-format
-msgid "DefineIndex: access method \"%s\" not found"
+msgid "argument of %s must be a type name"
msgstr ""
-#: commands/indexcmds.c:148
+#: commands/define.c:244
#, c-format
-msgid "DefineIndex: access method \"%s\" does not support UNIQUE indexes"
-msgstr ""
+msgid "%s requires an integer value"
+msgstr "%s требует целое значение"
-#: commands/indexcmds.c:151
+#: commands/define.c:265
#, c-format
-msgid "DefineIndex: access method \"%s\" does not support multi-column indexes"
-msgstr ""
+msgid "invalid argument for %s: \"%s\""
+msgstr "неверный аргумент для %s: \"%s\""
-#: commands/indexcmds.c:185
-msgid "Functional index can only have one attribute"
-msgstr ""
-
-#: commands/indexcmds.c:189
+#: commands/indexcmds.c:152
+#: commands/opclasscmds.c:91
+#: commands/opclasscmds.c:497
+#: commands/opclasscmds.c:647
#, c-format
-msgid "Index function can take at most %d arguments"
-msgstr ""
-
-#: commands/indexcmds.c:244
-msgid "Partial-index predicates may refer only to the base relation"
-msgstr ""
-
-#: commands/indexcmds.c:252
-msgid "Cannot use subselect in index predicate"
+msgid "access method \"%s\" does not exist"
msgstr ""
-#: commands/indexcmds.c:254
-msgid "Cannot use aggregate in index predicate"
+#: commands/opclasscmds.c:112
+msgid "must be superuser to create an operator class"
msgstr ""
-#: commands/indexcmds.c:261
-msgid "Functions in index predicate must be marked isImmutable"
-msgstr ""
-
-#: commands/indexcmds.c:299 commands/indexcmds.c:389
+#: commands/opclasscmds.c:154
#, c-format
-msgid "DefineIndex: attribute \"%s\" not found"
-msgstr ""
-
-#: commands/indexcmds.c:324
-msgid "DefineIndex: functional index may not use an aggregate function"
+msgid "invalid operator number %d, must be between 1 and %d"
msgstr ""
-#: commands/indexcmds.c:326
-msgid ""
-"DefineIndex: functional index must use a real function, not a type coercion\n"
-"\tTry specifying the index opclass you want to use, instead"
-msgstr ""
-
-#: commands/indexcmds.c:334
-msgid "DefineIndex: cannot index on a function returning a set"
-msgstr ""
-
-#: commands/indexcmds.c:350
-msgid "DefineIndex: index function must be marked isImmutable"
-msgstr ""
-
-#: commands/indexcmds.c:385
-msgid "missing attribute for define index"
-msgstr ""
-
-#: commands/indexcmds.c:418
+#: commands/opclasscmds.c:160
#, c-format
-msgid ""
-"data type %s has no default operator class for access method \"%s\"\n"
-"\tYou must specify an operator class for the index or define a\n"
-"\tdefault operator class for the data type"
-msgstr ""
+msgid "operator number %d appears more than once"
+msgstr "номер оператора %d указан больше одного раза"
-#: commands/indexcmds.c:449 commands/indexcmds.c:457
+#: commands/opclasscmds.c:192
#, c-format
-msgid ""
-"DefineIndex: operator class \"%s\" not supported by access method \"%s\""
+msgid "invalid procedure number %d, must be between 1 and %d"
msgstr ""
-#: commands/indexcmds.c:468
+#: commands/opclasscmds.c:198
#, c-format
-msgid "operator class \"%s\" does not accept data type %s"
+msgid "DefineOpClass: procedure number %d appears more than once"
msgstr ""
-#: commands/indexcmds.c:522
-#, c-format
-msgid "pg_opclass contains multiple default opclasses for data type %s"
+#: commands/opclasscmds.c:214
+msgid "storage type specified more than once"
msgstr ""
-#: commands/indexcmds.c:544 commands/indexcmds.c:576 commands/indexcmds.c:619
+#: commands/opclasscmds.c:241
#, c-format
-msgid "relation \"%s\" is of type \"%c\""
+msgid "storage type may not be different from datatype for access method \"%s\""
msgstr ""
-#: commands/indexcmds.c:573
+#: commands/opclasscmds.c:259
#, c-format
-msgid "index \"%s\" does not exist"
+msgid "operator class \"%s\" for access method \"%s\" already exists"
msgstr ""
-#: commands/indexcmds.c:584
+#: commands/opclasscmds.c:287
#, c-format
-msgid ""
-"\"%s\" is a system index. call REINDEX under standalone postgres with -O -P "
-"options"
+msgid "could not make class \"%s\" be default for type %s"
msgstr ""
-#: commands/indexcmds.c:587
+#: commands/opclasscmds.c:290
#, c-format
-msgid ""
-"\"%s\" is a system index. call REINDEX under standalone postgres with -P -O "
-"options"
+msgid "Class \"%s\" already is the default."
msgstr ""
-#: commands/indexcmds.c:602
+#: commands/indexcmds.c:479
+#: commands/indexcmds.c:489
+#: commands/opclasscmds.c:526
+#: commands/opclasscmds.c:536
+#: commands/opclasscmds.c:669
+#: commands/opclasscmds.c:680
#, c-format
-msgid "index \"%s\" wasn't reindexed"
+msgid "operator class \"%s\" does not exist for access method \"%s\""
msgstr ""
-#: commands/indexcmds.c:634
+#: commands/opclasscmds.c:701
#, c-format
-msgid "table \"%s\" wasn't reindexed"
+msgid "operator class \"%s\" for access method \"%s\" already exists in schema \"%s\""
msgstr ""
-#: commands/indexcmds.c:658
-msgid "REINDEX DATABASE: Can be executed only on the currently open database."
+#: commands/indexcmds.c:92
+msgid "must specify at least one attribute"
msgstr ""
-#: commands/indexcmds.c:661
-msgid "REINDEX DATABASE: Permission denied."
+#: commands/indexcmds.c:96
+#, c-format
+msgid "cannot use more than %d attributes in an index"
msgstr ""
-#: commands/indexcmds.c:664
-msgid "must be called under standalone postgres with -O -P options"
+#: commands/indexcmds.c:120
+msgid "existing indexes are inactive"
msgstr ""
-#: commands/indexcmds.c:666
-msgid "must be called under standalone postgres with -P -O options"
+#: commands/indexcmds.c:121
+msgid "REINDEX the table first."
msgstr ""
-#: commands/indexcmds.c:732
+#: commands/indexcmds.c:160
#, c-format
-msgid "relation %u was reindexed"
+msgid "access method \"%s\" does not support UNIQUE indexes"
msgstr ""
-#: commands/lockcmds.c:65
+#: commands/indexcmds.c:165
#, c-format
-msgid "LOCK TABLE: %s is not a table"
+msgid "access method \"%s\" does not support multi-column indexes"
msgstr ""
-#: commands/opclasscmds.c:88
-#, c-format
-msgid "DefineOpClass: access method \"%s\" not found"
+#: commands/indexcmds.c:179
+msgid "index expressions and predicates may refer only to the base relation"
msgstr ""
-#: commands/opclasscmds.c:107
-msgid "Must be superuser to create an operator class"
+#: commands/indexcmds.c:210
+msgid "primary keys cannot be expressions"
msgstr ""
-#: commands/opclasscmds.c:146
+#: commands/indexcmds.c:240
+#: parser/analyze.c:1442
#, c-format
-msgid "DefineOpClass: invalid operator number %d, must be between 1 and %d"
+msgid "column \"%s\" named in key does not exist"
msgstr ""
-#: commands/opclasscmds.c:150
-#, c-format
-msgid "DefineOpClass: operator number %d appears more than once"
+#: commands/indexcmds.c:299
+msgid "cannot use sub-select in index predicate"
msgstr ""
-#: commands/opclasscmds.c:167
-#, c-format
-msgid "DefineOpClass: Operator '%s' for types '%s' and '%s' does not exist"
+#: commands/indexcmds.c:303
+msgid "cannot use aggregate in index predicate"
msgstr ""
-#: commands/opclasscmds.c:183
-#, c-format
-msgid "DefineOpClass: invalid procedure number %d, must be between 1 and %d"
+#: commands/indexcmds.c:312
+msgid "functions in index predicate must be marked IMMUTABLE"
msgstr ""
-#: commands/opclasscmds.c:187
+#: commands/indexcmds.c:345
+#: commands/tablecmds.c:1205
#, c-format
-msgid "DefineOpClass: procedure number %d appears more than once"
-msgstr ""
+msgid "attribute \"%s\" does not exist"
+msgstr "атрибут \"%s\" не существует"
-#: commands/opclasscmds.c:200
-msgid "DefineOpClass: storage type specified more than once"
+#: commands/indexcmds.c:377
+msgid "cannot use sub-select in index expression"
msgstr ""
-#: commands/opclasscmds.c:204
-#, c-format
-msgid "DefineOpClass: bogus item type %d"
+#: commands/indexcmds.c:381
+msgid "cannot use aggregate in index expression"
msgstr ""
-#: commands/opclasscmds.c:226
-#, c-format
-msgid "Storage type may not be different from datatype for access method %s"
+#: commands/indexcmds.c:392
+msgid "functions in index expression must be marked IMMUTABLE"
msgstr ""
-#: commands/opclasscmds.c:242
+#: commands/indexcmds.c:447
#, c-format
-msgid "Operator class \"%s\" already exists for access method \"%s\""
+msgid "data type %s has no default operator class for access method \"%s\""
msgstr ""
-#: commands/opclasscmds.c:266
-#, c-format
-msgid ""
-"Can't add class \"%s\" as default for type %s\n"
-"\tclass \"%s\" already is the default"
+#: commands/indexcmds.c:449
+msgid "You must specify an operator class for the index or define a default operator class for the data type."
msgstr ""
-#: commands/opclasscmds.c:474
+#: commands/indexcmds.c:502
#, c-format
-msgid "RemoveOpClass: access method \"%s\" not found"
+msgid "operator class \"%s\" does not accept data type %s"
msgstr ""
-#: commands/opclasscmds.c:501 commands/opclasscmds.c:509
+#: commands/indexcmds.c:559
+#: utils/cache/typcache.c:286
#, c-format
-msgid ""
-"RemoveOpClass: operator class \"%s\" not supported by access method \"%s\""
+msgid "there are multiple default operator classes for data type %s"
msgstr ""
-#: commands/opclasscmds.c:553
+#: commands/indexcmds.c:626
+#: commands/indexcmds.c:632
#, c-format
-msgid "RemoveOpClassById: couldn't find pg_class entry %u"
-msgstr ""
-
-#: commands/operatorcmds.c:103
-msgid "setof type not implemented for leftarg"
-msgstr ""
+msgid "permission denied: \"%s\" is a system index"
+msgstr "доступ запрещён: \"%s\" является системным индексом"
-#: commands/operatorcmds.c:109
-msgid "setof type not implemented for rightarg"
-msgstr ""
-
-#: commands/operatorcmds.c:135
-#, c-format
-msgid "DefineOperator: attribute \"%s\" not recognized"
+#: commands/indexcmds.c:628
+msgid "Do REINDEX in standalone postgres with -O -P options."
msgstr ""
-#: commands/operatorcmds.c:144
-msgid "Define: \"procedure\" unspecified"
-msgstr ""
-
-#: commands/operatorcmds.c:215
-#, c-format
-msgid "RemoveOperator: failed to find tuple for operator '%s'"
+#: commands/indexcmds.c:634
+msgid "Do REINDEX in standalone postgres with -P -O options."
msgstr ""
-#: commands/operatorcmds.c:251
+#: commands/indexcmds.c:649
#, c-format
-msgid "RemoveOperatorById: failed to find tuple for operator %u"
+msgid "index \"%s\" wasn't reindexed"
msgstr ""
-#: commands/portalcmds.c:88
-msgid "PerformPortalFetch: missing portal name"
-msgstr "PerformPortalFetch: отсутствует имя портала"
-
-#: commands/portalcmds.c:98
+#: commands/indexcmds.c:685
#, c-format
-msgid "PerformPortalFetch: portal \"%s\" not found"
+msgid "table \"%s\" wasn't reindexed"
msgstr ""
-#: commands/portalcmds.c:243
-msgid "PerformPortalClose: missing portal name"
-msgstr "PerformPortalClose: отсутствует имя портала"
-
-#: commands/portalcmds.c:253
-#, c-format
-msgid "PerformPortalClose: portal \"%s\" not found"
+#: commands/indexcmds.c:712
+msgid "can only reindex the currently open database"
msgstr ""
-#: commands/prepare.c:65
-msgid "No statement name given"
-msgstr "Не указано имя команды"
-
-#: commands/prepare.c:68
-msgid "Utility statements cannot be prepared"
+#: commands/indexcmds.c:721
+msgid "REINDEX DATABASE must be done in standalone postgres with -O -P options"
msgstr ""
-#: commands/prepare.c:122
-msgid "ExecuteQuery: wrong number of arguments"
-msgstr "ExecuteQuery: неверное число аргументов"
-
-#: commands/prepare.c:172
-msgid "INTO clause specified for non-SELECT query"
+#: commands/indexcmds.c:725
+msgid "REINDEX DATABASE must be done in standalone postgres with -P -O options"
msgstr ""
-#: commands/prepare.c:223
-msgid "InitQueryHashTable: unable to create hash table"
+#: commands/indexcmds.c:793
+#, c-format
+msgid "relation %u was reindexed"
msgstr ""
-# [SM]: TO REVIEW
-#: commands/prepare.c:253
+#: commands/lockcmds.c:68
+#: commands/tablecmds.c:382
+#: commands/tablecmds.c:1679
+#: commands/tablecmds.c:1970
+#: commands/tablecmds.c:2114
+#: commands/tablecmds.c:2348
+#: commands/tablecmds.c:2514
+#: commands/tablecmds.c:2648
+#: commands/tablecmds.c:2829
+#: commands/tablecmds.c:3816
+#: commands/tablecmds.c:4085
+#: commands/trigger.c:144
+#: commands/trigger.c:546
+#: tcop/utility.c:76
#, c-format
-msgid "Prepared statement with name \"%s\" already exists"
-msgstr "Заготовленная команда с именем \"%s\" уже существует"
+msgid "\"%s\" is not a table"
+msgstr "\"%s\" не является таблицей"
-#: commands/prepare.c:283
-#, c-format
-msgid "Unable to store prepared statement \"%s\"!"
+#: commands/operatorcmds.c:106
+#: commands/operatorcmds.c:114
+msgid "setof type not allowed for operator argument"
msgstr ""
-# [SM]: TO REVIEW
-#: commands/prepare.c:309 commands/prepare.c:326 commands/prepare.c:364
-#: commands/prepare.c:388
+#: commands/operatorcmds.c:141
#, c-format
-msgid "Prepared statement with name \"%s\" does not exist"
-msgstr "Заготовленная команда с именем \"%s\" не существует"
+msgid "operator attribute \"%s\" not recognized"
+msgstr "атрибут оператора \"%s\" не распознан"
-#: commands/proclang.c:61
-msgid ""
-"Only users with superuser privilege are permitted to create procedural "
-"languages"
+#: commands/operatorcmds.c:151
+msgid "operator procedure must be specified"
msgstr ""
-#: commands/proclang.c:73
-#, c-format
-msgid "Language %s already exists"
+#: commands/portalcmds.c:54
+#: commands/portalcmds.c:165
+#: commands/portalcmds.c:213
+msgid "invalid cursor name: must not be empty"
msgstr ""
-#: commands/proclang.c:82
-#, c-format
-msgid "function %s() doesn't exist"
-msgstr "функция %s() не существует"
+#: commands/portalcmds.c:80
+msgid "DECLARE CURSOR may not specify INTO"
+msgstr "DECLARE CURSOR не может указывать INTO"
-#: commands/proclang.c:94
-#, c-format
-msgid ""
-"CreateProceduralLanguage: changing return type of function %s() from OPAQUE "
-"to LANGUAGE_HANDLER"
+#: commands/portalcmds.c:84
+msgid "DECLARE CURSOR ... FOR UPDATE is not supported"
msgstr ""
-#: commands/proclang.c:99
-#, c-format
-msgid "CreateProceduralLanguage: function %s() must return LANGUAGE_HANDLER"
+#: commands/portalcmds.c:85
+msgid "Cursors must be READ ONLY."
msgstr ""
-#: commands/proclang.c:109
+#: commands/portalcmds.c:174
+#: commands/portalcmds.c:223
+#: tcop/postgres.c:1506
+#: tcop/postgres.c:1704
#, c-format
-msgid "function %s(oid) doesn't exist"
-msgstr "функция %s(oid) не существует"
+msgid "portal \"%s\" does not exist"
+msgstr "портал \"%s\" не существует"
-#: commands/proclang.c:183
-msgid ""
-"Only users with superuser privilege are permitted to drop procedural "
-"languages"
-msgstr ""
-
-#: commands/proclang.c:196
+#: commands/portalcmds.c:313
+#: tcop/pquery.c:419
+#: tcop/pquery.c:931
#, c-format
-msgid "Language %s doesn't exist"
-msgstr "Язык %s не существует"
+msgid "portal \"%s\" already active"
+msgstr "портал \"%s\" уже активен"
-#: commands/proclang.c:225
-#, c-format
-msgid "DropProceduralLanguageById: language %u not found"
+#: commands/portalcmds.c:369
+msgid "could not reposition held cursor"
msgstr ""
-#: commands/schemacmds.c:79
-#, c-format
-msgid ""
-"CREATE SCHEMA: permission denied\n"
-"\t\"%s\" is not a superuser, so cannot create a schema for \"%s\""
+#: commands/prepare.c:61
+msgid "invalid statement name: must not be empty"
msgstr ""
-#: commands/schemacmds.c:92
-#, c-format
-msgid ""
-"CREATE SCHEMA: Illegal schema name: \"%s\" -- pg_ is reserved for system "
-"schemas"
+#: commands/prepare.c:80
+msgid "utility statements cannot be prepared"
msgstr ""
-#: commands/schemacmds.c:162
-msgid "Schema name may not be qualified"
-msgstr ""
+# [SM]: TO REVIEW
+#: commands/prepare.c:168
+#: commands/prepare.c:173
+#: commands/prepare.c:536
+msgid "prepared statement is not a SELECT"
+msgstr "заготовленная команда не является SELECTом"
-#: commands/schemacmds.c:169
+# [SM]: TO REVIEW
+#: commands/prepare.c:308
#, c-format
-msgid "Schema \"%s\" does not exist"
-msgstr "Схема \"%s\" не существует"
+msgid "prepared statement \"%s\" already exists"
+msgstr "заготовленная команда \"%s\" уже существует"
-#: commands/schemacmds.c:206
+# [SM]: TO REVIEW
+#: commands/prepare.c:388
#, c-format
-msgid "RemoveSchemaById: schema %u not found"
-msgstr ""
+msgid "prepared statement \"%s\" does not exist"
+msgstr "заготовленная команда \"%s\" не существует"
-#: commands/sequence.c:208
-msgid "DefineSequence: ReadBuffer failed"
-msgstr ""
-
-#: commands/sequence.c:335
+#: commands/sequence.c:421
+#: commands/sequence.c:613
+#: commands/sequence.c:656
#, c-format
-msgid "%s.nextval: you don't have permissions to set sequence %s"
-msgstr ""
+msgid "permission denied for sequence %s"
+msgstr "доступ запрещён для последовательности %s"
-#: commands/sequence.c:410
+#: commands/sequence.c:498
#, c-format
msgid "%s.nextval: reached MAXVALUE (%s)"
msgstr ""
-#: commands/sequence.c:431
-#, c-format
-msgid "%s.nextval: reached MINVALUE (%s)"
-msgstr ""
-
#: commands/sequence.c:521
#, c-format
-msgid "%s.currval: you don't have permissions to read sequence %s"
+msgid "%s.nextval: reached MINVALUE (%s)"
msgstr ""
-#: commands/sequence.c:525
+#: commands/sequence.c:619
#, c-format
msgid "%s.currval is not yet defined in this session"
msgstr ""
-#: commands/sequence.c:560
-#, c-format
-msgid "%s.setval: you don't have permissions to set sequence %s"
-msgstr ""
-
-#: commands/sequence.c:575
-#, c-format
-msgid "%s.setval: value %s is out of bounds (%s,%s)"
-msgstr ""
-
-#: commands/sequence.c:701
-#, c-format
-msgid "%s.%s: %s is not a sequence"
-msgstr ""
-
-#: commands/sequence.c:719
-msgid "Memory exhausted in init_sequence"
-msgstr ""
-
-#: commands/sequence.c:747
-#, c-format
-msgid "%s.%s: invalid number of blocks in sequence"
-msgstr ""
+#: commands/sequence.c:673
+#, c-format
+msgid "%s.setval: value %s is out of bounds (%s..%s)"
+msgstr ""
+
+#: commands/sequence.c:800
+#: tcop/utility.c:81
+#, c-format
+msgid "\"%s\" is not a sequence"
+msgstr "\"%s\" не является последовательностью"
+
+#: commands/sequence.c:820
+#: executor/execGrouping.c:328
+#: executor/execGrouping.c:388
+#: executor/nodeIndexscan.c:1041
+#: executor/spi.c:83
+#: executor/spi.c:165
+#: lib/dllist.c:43
+#: lib/dllist.c:88
+#: libpq/auth.c:634
+#: postmaster/pgstat.c:828
+#: postmaster/pgstat.c:845
+#: postmaster/pgstat.c:2255
+#: postmaster/pgstat.c:2318
+#: postmaster/pgstat.c:2363
+#: postmaster/pgstat.c:2414
+#: postmaster/postmaster.c:1556
+#: postmaster/postmaster.c:2153
+#: postmaster/postmaster.c:2916
+#: storage/buffer/localbuf.c:129
+#: storage/file/fd.c:523
+#: storage/file/fd.c:556
+#: storage/file/fd.c:701
+#: storage/ipc/shmem.c:163
+#: storage/ipc/shmem.c:222
+#: storage/ipc/shmem.c:342
+#: storage/ipc/sinval.c:342
+#: storage/lmgr/lock.c:479
+#: storage/lmgr/lock.c:527
+#: storage/lmgr/proc.c:154
+#: storage/lmgr/proc.c:170
+#: storage/smgr/mm.c:191
+#: utils/adt/cash.c:297
+#: utils/adt/cash.c:312
+#: utils/adt/regexp.c:189
+#: utils/adt/ri_triggers.c:3266
+#: utils/cache/relcache.c:172
+#: utils/cache/relcache.c:182
+#: utils/cache/relcache.c:196
+#: utils/cache/relcache.c:1219
+#: utils/cache/typcache.c:121
+#: utils/fmgr/dfmgr.c:118
+#: utils/init/miscinit.c:126
+#: utils/init/miscinit.c:147
+#: utils/init/miscinit.c:157
+#: utils/misc/guc.c:1664
+#: utils/misc/guc.c:1861
+#: utils/misc/guc.c:2834
+#: utils/misc/guc.c:2881
+#: utils/misc/guc.c:3767
+#: utils/misc/guc.c:3903
+#: utils/misc/guc.c:3969
+#: utils/misc/guc.c:3977
+#: utils/misc/guc.c:3986
+#: utils/mmgr/aset.c:335
+#: utils/mmgr/aset.c:501
+#: utils/mmgr/aset.c:701
+#: utils/mmgr/aset.c:894
+#: utils/mmgr/portalmem.c:75
+msgid "out of memory"
+msgstr "не хватает памяти"
-#: commands/sequence.c:752
-#, c-format
-msgid "%s.%s: ReadBuffer failed"
+#: commands/sequence.c:958
+msgid "cannot increment by zero"
msgstr ""
-#: commands/sequence.c:761
+#: commands/sequence.c:994
#, c-format
-msgid "%s.%s: bad magic (%08X)"
+msgid "MINVALUE (%s) must be less than MAXVALUE (%s)"
msgstr ""
-#: commands/sequence.c:804
+#: commands/sequence.c:1018
#, c-format
-msgid "DefineSequence: option \"%s\" not recognized"
+msgid "START value (%s) can't be less than MINVALUE (%s)"
msgstr ""
-#: commands/sequence.c:811
-msgid "DefineSequence: can't INCREMENT by 0"
-msgstr ""
-
-#: commands/sequence.c:840
+#: commands/sequence.c:1030
#, c-format
-msgid "DefineSequence: MINVALUE (%s) must be less than MAXVALUE (%s)"
+msgid "START value (%s) can't be greater than MAXVALUE (%s)"
msgstr ""
-#: commands/sequence.c:861
+#: commands/sequence.c:1044
#, c-format
-msgid "DefineSequence: START value (%s) can't be less than MINVALUE (%s)"
+msgid "CACHE (%s) must be greater than zero"
msgstr ""
-#: commands/sequence.c:871
-#, c-format
-msgid "DefineSequence: START value (%s) can't be greater than MAXVALUE (%s)"
+#: commands/proclang.c:63
+msgid "must be superuser to create procedural language"
msgstr ""
-#: commands/sequence.c:882
+#: commands/proclang.c:76
+#: commands/proclang.c:263
#, c-format
-msgid "DefineSequence: CACHE (%s) can't be <= 0"
-msgstr ""
+msgid "language \"%s\" already exists"
+msgstr "язык \"%s\" уже существует"
-#: commands/sequence.c:902
+#: commands/proclang.c:96
#, c-format
-msgid "seq_redo: unknown op code %u"
+msgid "changing return type of function %s() from OPAQUE to LANGUAGE_HANDLER"
msgstr ""
-#: commands/sequence.c:910
+#: commands/proclang.c:103
#, c-format
-msgid "seq_redo: can't read block of %u/%u"
-msgstr ""
-
-#: commands/sequence.c:926
-msgid "seq_redo: failed to add item to page"
-msgstr ""
+msgid "function %s() must return LANGUAGE_HANDLER"
+msgstr "функция %s() должна возвращать LANGUAGE_HANDLER"
-#: commands/tablecmds.c:149
-msgid "ON COMMIT can only be used on TEMP tables"
+#: commands/proclang.c:186
+msgid "must be superuser to drop procedural language"
msgstr ""
-#: commands/tablecmds.c:379
-#, c-format
-msgid "TRUNCATE cannot be used on sequences. '%s' is a sequence"
+#: commands/proclang.c:269
+msgid "must be superuser to rename procedural language"
msgstr ""
-#: commands/tablecmds.c:382
-#, c-format
-msgid "TRUNCATE cannot be used on views. '%s' is a view"
-msgstr ""
-
-#: commands/tablecmds.c:385
-#, c-format
-msgid "TRUNCATE can only be used on tables. '%s' is not a table"
-msgstr ""
+#: commands/schemacmds.c:84
+#: commands/user.c:832
+#: commands/user.c:967
+msgid "permission denied"
+msgstr "доступ запрещён"
-#: commands/tablecmds.c:391
+#: commands/schemacmds.c:85
#, c-format
-msgid "TRUNCATE cannot be used on system tables. '%s' is a system table"
+msgid "\"%s\" is not a superuser, so cannot create a schema for \"%s\""
msgstr ""
-#: commands/tablecmds.c:402
-msgid "TRUNCATE cannot be used on temp tables of other processes"
-msgstr ""
-
-#: commands/tablecmds.c:426
+#: commands/schemacmds.c:100
+#: commands/schemacmds.c:272
#, c-format
-msgid ""
-"TRUNCATE cannot be used as table %s references this one via foreign key "
-"constraint %s"
+msgid "unacceptable schema name \"%s\""
msgstr ""
-#: commands/tablecmds.c:537
-#, c-format
-msgid "CREATE TABLE: attribute \"%s\" duplicated"
+#: commands/schemacmds.c:101
+#: commands/schemacmds.c:273
+msgid "The prefix \"pg_\" is reserved for system schemas."
msgstr ""
-#: commands/tablecmds.c:560
-#, c-format
-msgid "CREATE TABLE: inherited relation \"%s\" is not a table"
+#: commands/tablecmds.c:150
+msgid "ON COMMIT can only be used on TEMP tables"
msgstr ""
-#: commands/tablecmds.c:564
+#: commands/tablecmds.c:210
#, c-format
-msgid "CREATE TABLE: cannot inherit from temp relation \"%s\""
+msgid "duplicate CHECK constraint name \"%s\""
msgstr ""
-#: commands/tablecmds.c:579
+#: commands/tablecmds.c:393
+#: commands/tablecmds.c:1150
+#: commands/tablecmds.c:1357
+#: commands/tablecmds.c:1695
+#: commands/tablecmds.c:1981
+#: commands/tablecmds.c:2125
+#: commands/tablecmds.c:2253
+#: commands/tablecmds.c:2362
+#: commands/tablecmds.c:2525
+#: commands/tablecmds.c:2659
+#: commands/tablecmds.c:2840
+#: commands/tablecmds.c:3139
+#: commands/tablecmds.c:3827
+#: commands/trigger.c:150
+#: commands/trigger.c:552
+#: tcop/utility.c:162
+#: tcop/utility.c:197
#, c-format
-msgid "CREATE TABLE: inherited relation \"%s\" duplicated"
-msgstr ""
+msgid "permission denied: \"%s\" is a system catalog"
+msgstr "доступ запрещён: \"%s\" является системным каталогом"
-#: commands/tablecmds.c:631
-#, c-format
-msgid ""
-"CREATE TABLE: merging multiple inherited definitions of attribute \"%s\""
+#: commands/tablecmds.c:403
+msgid "cannot truncate temp tables of other processes"
msgstr ""
-#: commands/tablecmds.c:636
-#, c-format
-msgid "CREATE TABLE: inherited attribute \"%s\" type conflict (%s and %s)"
+#: commands/tablecmds.c:429
+msgid "cannot truncate a table referenced in a foreign key constraint"
msgstr ""
-#: commands/tablecmds.c:782
+#: commands/tablecmds.c:430
#, c-format
-msgid "CREATE TABLE: merging attribute \"%s\" with inherited definition"
+msgid "Table \"%s\" references this one via foreign key constraint \"%s\"."
msgstr ""
-#: commands/tablecmds.c:787
+#: commands/tablecmds.c:543
#, c-format
-msgid "CREATE TABLE: attribute \"%s\" type conflict (%s and %s)"
-msgstr ""
+msgid "attribute \"%s\" duplicated"
+msgstr "повторное имя атрибута: \"%s\""
-#: commands/tablecmds.c:825
+#: commands/tablecmds.c:568
+#: parser/analyze.c:1188
#, c-format
-msgid ""
-"CREATE TABLE: attribute \"%s\" inherits conflicting default values\n"
-"\tTo resolve the conflict, specify a default explicitly"
+msgid "inherited relation \"%s\" is not a table"
msgstr ""
-#: commands/tablecmds.c:1069
+#: commands/tablecmds.c:574
#, c-format
-msgid "setRelhassubclassInRelation: cache lookup failed for relation %u"
+msgid "cannot inherit from temporary relation \"%s\""
msgstr ""
-#: commands/tablecmds.c:1124
+#: commands/tablecmds.c:591
#, c-format
-msgid "renameatt: class \"%s\" is a system catalog"
+msgid "inherited relation \"%s\" duplicated"
msgstr ""
-#: commands/tablecmds.c:1170
+#: commands/tablecmds.c:645
#, c-format
-msgid "Inherited attribute \"%s\" must be renamed in child tables too"
+msgid "merging multiple inherited definitions of attribute \"%s\""
msgstr ""
-#: commands/tablecmds.c:1178
+#: commands/tablecmds.c:652
#, c-format
-msgid "renameatt: attribute \"%s\" does not exist"
+msgid "inherited attribute \"%s\" has a type conflict"
msgstr ""
-#: commands/tablecmds.c:1183
+#: commands/tablecmds.c:654
+#: commands/tablecmds.c:809
+#: parser/parse_coerce.c:255
+#: parser/parse_coerce.c:901
+#: parser/parse_coerce.c:918
+#: parser/parse_coerce.c:956
#, c-format
-msgid "renameatt: system attribute \"%s\" may not be renamed"
-msgstr ""
+msgid "%s versus %s"
+msgstr "%s против %s"
-#: commands/tablecmds.c:1191
+#: commands/tablecmds.c:800
#, c-format
-msgid "renameatt: inherited attribute \"%s\" may not be renamed"
+msgid "merging attribute \"%s\" with inherited definition"
msgstr ""
-#: commands/tablecmds.c:1200
+#: commands/tablecmds.c:807
#, c-format
-msgid "renameatt: attribute \"%s\" exists"
+msgid "attribute \"%s\" has a type conflict"
msgstr ""
-#: commands/tablecmds.c:1230
+#: commands/tablecmds.c:848
#, c-format
-msgid "renameatt: can't find index id %u"
+msgid "attribute \"%s\" inherits conflicting default values"
msgstr ""
-#: commands/tablecmds.c:1315
-#, c-format
-msgid "renamerel: system relation \"%s\" may not be renamed"
+#: commands/tablecmds.c:850
+msgid "To resolve the conflict, specify a default explicitly."
msgstr ""
-#: commands/tablecmds.c:1331
+#: commands/tablecmds.c:1195
#, c-format
-msgid "renamerel: relation \"%s\" does not exist"
+msgid "inherited attribute \"%s\" must be renamed in child tables too"
msgstr ""
-#: commands/tablecmds.c:1335
+#: commands/tablecmds.c:1213
#, c-format
-msgid "renamerel: relation \"%s\" exists"
-msgstr ""
+msgid "cannot rename system attribute \"%s\""
+msgstr "нельзя переименовать системный атрибут \"%s\""
-#: commands/tablecmds.c:1633 commands/tablecmds.c:1908
-#: commands/tablecmds.c:2042 commands/tablecmds.c:2257
-#: commands/tablecmds.c:2406 commands/tablecmds.c:2576
-#: commands/tablecmds.c:3535 commands/tablecmds.c:3710
+#: commands/tablecmds.c:1223
#, c-format
-msgid "ALTER TABLE: relation \"%s\" is not a table"
-msgstr ""
+msgid "cannot rename inherited attribute \"%s\""
+msgstr "нельзя переименовать наследованный атрибут \"%s\""
-#: commands/tablecmds.c:1644 commands/tablecmds.c:1913
-#: commands/tablecmds.c:2047 commands/tablecmds.c:2165
-#: commands/tablecmds.c:2264 commands/tablecmds.c:2411
-#: commands/tablecmds.c:2581 commands/tablecmds.c:3540
+#: commands/tablecmds.c:1234
+#: commands/tablecmds.c:1835
#, c-format
-msgid "ALTER TABLE: relation \"%s\" is a system catalog"
-msgstr ""
+msgid "attribute \"%s\" of relation \"%s\" already exists"
+msgstr "атрибут \"%s\" для связи \"%s\" уже существует"
-#: commands/tablecmds.c:1697
+#: commands/tablecmds.c:1748
#, c-format
-msgid "ALTER TABLE: child table \"%s\" has different type for column \"%s\""
+msgid "child table \"%s\" has different type for column \"%s\""
msgstr ""
-#: commands/tablecmds.c:1705
+#: commands/tablecmds.c:1756
#, c-format
-msgid "ALTER TABLE: merging definition of column \"%s\" for child %s"
+msgid "merging definition of column \"%s\" for child \"%s\""
msgstr ""
-#: commands/tablecmds.c:1735
-msgid "Attribute must be added to child tables too"
+#: commands/tablecmds.c:1788
+msgid "attribute must be added to child tables too"
msgstr ""
-#: commands/tablecmds.c:1752
-msgid ""
-"Adding columns with defaults is not implemented.\n"
-"\tAdd the column, then use ALTER TABLE SET DEFAULT."
+#: commands/tablecmds.c:1807
+msgid "adding columns with defaults is not implemented"
msgstr ""
-#: commands/tablecmds.c:1756
-msgid ""
-"Adding NOT NULL columns is not implemented.\n"
-"\tAdd the column, then use ALTER TABLE ... SET NOT NULL."
+#: commands/tablecmds.c:1808
+msgid "Add the column, then use ALTER TABLE SET DEFAULT."
msgstr ""
-#: commands/tablecmds.c:1765 commands/tablecmds.c:3852
-#, c-format
-msgid "ALTER TABLE: relation \"%s\" not found"
+#: commands/tablecmds.c:1813
+msgid "adding NOT NULL columns is not implemented"
msgstr ""
-#: commands/tablecmds.c:1777
-#, c-format
-msgid "ALTER TABLE: column name \"%s\" already exists in table \"%s\""
+#: commands/tablecmds.c:1814
+msgid "Add the column, then use ALTER TABLE SET NOT NULL."
msgstr ""
-#: commands/tablecmds.c:1783
+#: commands/tablecmds.c:2027
+#: commands/tablecmds.c:2171
+#: commands/tablecmds.c:2299
+#: commands/tablecmds.c:2463
#, c-format
-msgid "ALTER TABLE: relations limited to %d columns"
-msgstr ""
+msgid "cannot alter system attribute \"%s\""
+msgstr "нельзя поменять системный атрибут \"%s\""
-#: commands/tablecmds.c:1958 commands/tablecmds.c:2092
-#: commands/tablecmds.c:2210
+#: commands/tablecmds.c:2063
#, c-format
-msgid "ALTER TABLE: Cannot alter system attribute \"%s\""
+msgid "attribute \"%s\" is in a primary key"
msgstr ""
-#: commands/tablecmds.c:1979
+#: commands/tablecmds.c:2192
#, c-format
-msgid "ALTER TABLE: Index %u not found"
-msgstr "ALTER TABLE: Индекс %u не найден"
-
-#: commands/tablecmds.c:1994
-#, c-format
-msgid "ALTER TABLE: Attribute \"%s\" is in a primary key"
+msgid "attribute \"%s\" contains NULL values"
msgstr ""
-#: commands/tablecmds.c:2010 commands/tablecmds.c:2124
-#: commands/tablecmds.c:2352
+#: commands/tablecmds.c:2242
#, c-format
-msgid "ALTER TABLE: relation \"%s\" has no column \"%s\""
-msgstr ""
+msgid "\"%s\" is not a table or view"
+msgstr "\"%s\" не является таблицей или видом"
-#: commands/tablecmds.c:2111
+#: commands/tablecmds.c:2381
#, c-format
-msgid "ALTER TABLE: Attribute \"%s\" contains NULL values"
+msgid "statistics target %d is too low"
msgstr ""
-#: commands/tablecmds.c:2160
+#: commands/tablecmds.c:2389
#, c-format
-msgid "ALTER TABLE: relation \"%s\" is not a table or view"
+msgid "lowering statistics target to %d"
msgstr ""
-#: commands/tablecmds.c:2284
+#: commands/tablecmds.c:2412
#, c-format
-msgid "ALTER TABLE: statistics target %d is too low"
+msgid "invalid storage type \"%s\""
msgstr ""
-#: commands/tablecmds.c:2289
-msgid "ALTER TABLE: lowering statistics target to 1000"
-msgstr ""
-
-# [SM]: TO REVIEW
-#: commands/tablecmds.c:2310
-#, c-format
-msgid "ALTER TABLE: \"%s\" storage not recognized"
-msgstr "ALTER TABLE: \"%s\" медия не распознана"
-
-#: commands/tablecmds.c:2315
+#: commands/tablecmds.c:2482
#, c-format
-msgid "ALTER TABLE: Invalid column flag: %c"
+msgid "column datatype %s can only have storage \"plain\""
msgstr ""
-#: commands/tablecmds.c:2357
-#, c-format
-msgid "ALTER TABLE: cannot change system attribute \"%s\""
-msgstr "ALTER TABLE: нельзя поменять системный атрибут \"%s\""
-
-#: commands/tablecmds.c:2374
+#: commands/tablecmds.c:2572
#, c-format
-msgid "ALTER TABLE: Column datatype %s can only have storage \"plain\""
+msgid "table \"%s\" is already WITH OIDS"
msgstr ""
-#: commands/tablecmds.c:2428
+#: commands/tablecmds.c:2576
#, c-format
-msgid "ALTER TABLE: Cannot drop system attribute \"%s\""
+msgid "table \"%s\" is already WITHOUT OIDS"
msgstr ""
-#: commands/tablecmds.c:2434
-#, c-format
-msgid "ALTER TABLE: Cannot drop inherited column \"%s\""
+#: commands/tablecmds.c:2596
+msgid "ALTER TABLE WITH OIDS is not yet implemented"
msgstr ""
-#: commands/tablecmds.c:2463 commands/tablecmds.c:2514
+#: commands/tablecmds.c:2677
#, c-format
-msgid "ALTER TABLE: relation %u has no column \"%s\""
-msgstr "ALTER TABLE: у связи %u нет колонки \"%s\""
+msgid "cannot drop system attribute \"%s\""
+msgstr "нельзя удалить системный атрибут \"%s\""
-#: commands/tablecmds.c:2468 commands/tablecmds.c:2519
+#: commands/tablecmds.c:2685
#, c-format
-msgid "ALTER TABLE: relation %u has non-inherited column \"%s\""
-msgstr "ALTER TABLE: у связи %u нет ненаследованной колонки \"%s\""
-
-#: commands/tablecmds.c:2655
-msgid ""
-"ALTER TABLE / ADD CONSTRAINT is not implemented for that constraint type."
-msgstr ""
+msgid "cannot drop inherited attribute \"%s\""
+msgstr "нельзя удалить наследованный атрибут \"%s\""
-#: commands/tablecmds.c:2687
-msgid ""
-"ALTER TABLE / ADD CONSTRAINT unable to determine type of constraint passed"
-msgstr ""
-
-#: commands/tablecmds.c:2747
+#: commands/tablecmds.c:3012
#, c-format
-msgid "Only relation '%s' can be referenced in CHECK"
+msgid "CHECK constraint may only reference relation \"%s\""
msgstr ""
-#: commands/tablecmds.c:2802
+#: commands/tablecmds.c:3076
#, c-format
-msgid "AlterTableAddConstraint: rejected due to CHECK constraint %s"
+msgid "CHECK constraint \"%s\" is violated at some row(s)"
msgstr ""
-#: commands/tablecmds.c:2858
+#: commands/tablecmds.c:3127
#, c-format
msgid "referenced relation \"%s\" is not a table"
msgstr ""
-#: commands/tablecmds.c:2863
-#, c-format
-msgid "%s: relation \"%s\" is a system catalog"
-msgstr "%s: объект \"%s\" является системным каталогом"
-
-#: commands/tablecmds.c:2878
-#, c-format
-msgid "%s: Unable to reference temporary table from permanent table constraint"
-msgstr ""
-
-#: commands/tablecmds.c:2920
-#, c-format
-msgid ""
-"%s: number of referencing and referenced attributes for foreign key disagree"
+#: commands/tablecmds.c:3152
+msgid "cannot reference temporary table from permanent table constraint"
msgstr ""
-#: commands/tablecmds.c:3001
-#, c-format
-msgid "%s: column \"%s\" referenced in foreign key constraint does not exist"
-msgstr ""
-
-#: commands/tablecmds.c:3004
-#, c-format
-msgid "Can only have %d keys in a foreign key"
+#: commands/tablecmds.c:3193
+#: commands/tablecmds.c:3622
+msgid "number of referencing and referenced attributes for foreign key disagree"
msgstr ""
-#: commands/tablecmds.c:3048
+#: commands/tablecmds.c:3275
#, c-format
-msgid "transformFkeyGetPrimaryKey: index %u not found"
+msgid "column \"%s\" referenced in foreign key constraint does not exist"
msgstr ""
-#: commands/tablecmds.c:3066
+#: commands/tablecmds.c:3280
#, c-format
-msgid "PRIMARY KEY for referenced table \"%s\" not found"
+msgid "cannot have more than %d keys in a foreign key"
msgstr ""
-#: commands/tablecmds.c:3122
+#: commands/tablecmds.c:3343
#, c-format
-msgid "transformFkeyCheckAttrs: index %u not found"
+msgid "there is no PRIMARY KEY for referenced table \"%s\""
msgstr ""
-#: commands/tablecmds.c:3180
+#: commands/tablecmds.c:3457
#, c-format
-msgid ""
-"UNIQUE constraint matching given keys for referenced table \"%s\" not found"
+msgid "there is no UNIQUE constraint matching given keys for referenced table \"%s\""
msgstr ""
-#: commands/tablecmds.c:3343
+#: commands/tablecmds.c:3872
+#: commands/trigger.c:2312
#, c-format
-msgid ""
-"number of key attributes in referenced table must be equal to foreign key\n"
-"\tIllegal FOREIGN KEY definition references \"%s\""
-msgstr ""
-
-#: commands/tablecmds.c:3399
-msgid "Unrecognized ON DELETE action for FOREIGN KEY constraint"
-msgstr ""
-
-#: commands/tablecmds.c:3465
-msgid "Unrecognized ON UPDATE action for FOREIGN KEY constraint"
+msgid "constraint \"%s\" does not exist"
msgstr ""
-#: commands/tablecmds.c:3510
+#: commands/tablecmds.c:3877
#, c-format
-msgid "fkMatchTypeToString: Unknown MATCH TYPE '%c'"
+msgid "multiple constraints named \"%s\" were dropped"
msgstr ""
-#: commands/tablecmds.c:3586
+#: commands/tablecmds.c:3919
#, c-format
-msgid "ALTER TABLE / DROP CONSTRAINT: %s does not exist"
-msgstr ""
-
-#: commands/tablecmds.c:3590
-msgid "Multiple constraints dropped"
+msgid "\"%s\" is not a table, TOAST table, index, view, or sequence"
msgstr ""
-#: commands/tablecmds.c:3615
+#: commands/tablecmds.c:4005
#, c-format
-msgid "ALTER TABLE: relation %u not found"
-msgstr "ALTER TABLE: связь %u не найдена"
-
-#: commands/tablecmds.c:3677
-#, c-format
-msgid ""
-"ALTER TABLE: relation \"%s\" is not a table, TOAST table, index, view, or "
-"sequence"
-msgstr ""
-
-#: commands/tablecmds.c:3727
-msgid "Shared relations cannot be toasted after initdb"
+msgid "table \"%s\" is already being clustered on index \"%s\""
msgstr ""
-#: commands/tablecmds.c:3740
-#, c-format
-msgid "ALTER TABLE: relation \"%s\" already has a toast table"
+#: commands/tablecmds.c:4106
+msgid "shared relations cannot be toasted after initdb"
msgstr ""
-#: commands/tablecmds.c:3755
+#: commands/tablecmds.c:4121
#, c-format
-msgid "ALTER TABLE: relation \"%s\" does not need a toast table"
+msgid "relation \"%s\" already has a toast table"
msgstr ""
-#: commands/trigger.c:132
+#: commands/tablecmds.c:4138
#, c-format
-msgid "Unable to find table for constraint \"%s\""
+msgid "relation \"%s\" does not need a toast table"
msgstr ""
#: commands/trigger.c:137
#, c-format
-msgid "CreateTrigger: relation \"%s\" is not a table"
-msgstr ""
-
-#: commands/trigger.c:141
-#, c-format
-msgid "CreateTrigger: can't create trigger for system relation %s"
-msgstr ""
-
-#: commands/trigger.c:208
-msgid "CreateTrigger: double INSERT event specified"
-msgstr ""
-
-#: commands/trigger.c:213
-msgid "CreateTrigger: double DELETE event specified"
-msgstr ""
-
-#: commands/trigger.c:218
-msgid "CreateTrigger: double UPDATE event specified"
+msgid "could not determine referenced table for constraint \"%s\""
msgstr ""
#: commands/trigger.c:222
-msgid "CreateTrigger: unknown event specified"
-msgstr ""
-
-#: commands/trigger.c:248
-#, c-format
-msgid "CreateTrigger: trigger %s already defined on relation %s"
+msgid "double INSERT event specified"
msgstr ""
-#: commands/trigger.c:260
-#, c-format
-msgid "CreateTrigger: function %s() does not exist"
+#: commands/trigger.c:229
+msgid "double DELETE event specified"
msgstr ""
-#: commands/trigger.c:271
-#, c-format
-msgid ""
-"CreateTrigger: changing return type of function %s() from OPAQUE to TRIGGER"
+#: commands/trigger.c:236
+msgid "double UPDATE event specified"
msgstr ""
-#: commands/trigger.c:276
+#: commands/trigger.c:269
+#: commands/trigger.c:654
#, c-format
-msgid "CreateTrigger: function %s() must return TRIGGER"
-msgstr ""
-
-#: commands/trigger.c:376
-#, c-format
-msgid "CreateTrigger: relation %s not found in pg_class"
-msgstr ""
+msgid "trigger \"%s\" for relation \"%s\" already exists"
+msgstr "триггер \"%s\" для связи \"%s\" уже существует"
-#: commands/trigger.c:461
+#: commands/trigger.c:290
#, c-format
-msgid "DropTrigger: there is no trigger %s on relation %s"
+msgid "changing return type of function %s() from OPAQUE to TRIGGER"
msgstr ""
-#: commands/trigger.c:510
+#: commands/trigger.c:297
#, c-format
-msgid "RemoveTriggerById: Trigger %u does not exist"
-msgstr "RemoveTriggerById: Триггер %u не существует"
+msgid "function %s() must return TRIGGER"
+msgstr "функция %s() должна возвращать TRIGGER"
-#: commands/trigger.c:521
+#: commands/trigger.c:1161
#, c-format
-msgid "DropTrigger: relation \"%s\" is not a table"
+msgid "trigger function %u returned NULL"
msgstr ""
-#: commands/trigger.c:525
-#, c-format
-msgid "DropTrigger: can't drop trigger for system relation %s"
+#: commands/trigger.c:1213
+#: commands/trigger.c:1326
+#: commands/trigger.c:1455
+msgid "BEFORE STATEMENT trigger cannot return a value"
msgstr ""
-#: commands/trigger.c:550
-#, c-format
-msgid "DropTrigger: relation %s not found in pg_class"
+#: commands/trigger.c:1582
+#: executor/execMain.c:1124
+#: executor/execMain.c:1423
+#: executor/execMain.c:1557
+msgid "could not serialize access due to concurrent update"
msgstr ""
-#: commands/trigger.c:555
-#, c-format
-msgid "DropTrigger: relation %s has reltriggers = 0"
-msgstr ""
-
-#: commands/trigger.c:626
-#, c-format
-msgid "renametrig: trigger %s already defined on relation %s"
+#: commands/trigger.c:2263
+msgid "unnamed constraints cannot be set explicitly"
msgstr ""
-#: commands/trigger.c:667
+#: commands/trigger.c:2296
#, c-format
-msgid "renametrig: trigger %s not defined on relation %s"
+msgid "constraint \"%s\" is not deferrable"
msgstr ""
-#: commands/trigger.c:730
+#: commands/typecmds.c:135
#, c-format
-msgid "RelationBuildTriggers: unexpected record found for rel %s"
+msgid "type names must be %d characters or less"
msgstr ""
-#: commands/trigger.c:758
+#: commands/typecmds.c:167
#, c-format
-msgid "RelationBuildTriggers: tgargs IS NULL for rel %s"
+msgid "array element type cannot be %s"
msgstr ""
-#: commands/trigger.c:778
+#: commands/typecmds.c:200
#, c-format
-msgid "RelationBuildTriggers: %d record(s) not found for rel %s"
+msgid "alignment \"%s\" not recognized"
msgstr ""
-#: commands/trigger.c:1129
+#: commands/typecmds.c:217
#, c-format
-msgid "ExecCallTriggerFunc: function %u returned NULL"
+msgid "storage \"%s\" not recognized"
msgstr ""
-#: commands/trigger.c:1179 commands/trigger.c:1290 commands/trigger.c:1414
-msgid "BEFORE STATEMENT trigger cannot return a value."
-msgstr ""
-
-#: commands/trigger.c:1534 executor/execMain.c:1015 executor/execMain.c:1308
-#: executor/execMain.c:1442
-msgid "Can't serialize access due to concurrent update"
-msgstr ""
-
-#: commands/trigger.c:1557 executor/execMain.c:1036
+#: commands/typecmds.c:222
#, c-format
-msgid "Unknown status %u from heap_mark4update"
-msgstr ""
-
-#: commands/trigger.c:1569
-msgid "GetTupleForTrigger: failed ReadBuffer"
-msgstr ""
+msgid "type attribute \"%s\" not recognized"
+msgstr "Атрибут типа \"%s\" не распознан"
-#: commands/trigger.c:1757
-msgid "DeferredTriggerExecute: failed to fetch old tuple"
+#: commands/typecmds.c:232
+msgid "type input function must be specified"
msgstr ""
-#: commands/trigger.c:1764
-msgid "DeferredTriggerExecute: failed to fetch new tuple"
+#: commands/typecmds.c:236
+msgid "type output function must be specified"
msgstr ""
-#: commands/trigger.c:1785
+#: commands/typecmds.c:275
#, c-format
-msgid "DeferredTriggerExecute: can't find trigger %u"
+msgid "changing return type of function %s from OPAQUE to %s"
msgstr ""
-#: commands/trigger.c:1931
+#: commands/typecmds.c:282
#, c-format
-msgid "deferredTriggerInvokeEvents: relation %u has no triggers"
+msgid "type input function %s must return %s"
msgstr ""
-#: commands/trigger.c:2036
-msgid "DeferredTriggerBeginXact() called while inside transaction"
-msgstr ""
-
-#: commands/trigger.c:2211
-msgid "unnamed constraints cannot be set explicitly"
-msgstr ""
-
-#: commands/trigger.c:2242
-#, c-format
-msgid "Constraint '%s' is not deferrable"
-msgstr ""
-
-#: commands/trigger.c:2256
+#: commands/typecmds.c:292
#, c-format
-msgid "Constraint '%s' does not exist"
-msgstr ""
-
-#: commands/trigger.c:2332
-msgid "DeferredTriggerSaveEvent() called outside of transaction"
+msgid "changing return type of function %s from OPAQUE to CSTRING"
msgstr ""
-#: commands/typecmds.c:117
+#: commands/typecmds.c:299
#, c-format
-msgid "DefineType: type names must be %d characters or less"
+msgid "type output function %s must return cstring"
msgstr ""
-#: commands/typecmds.c:147
+#: commands/typecmds.c:308
#, c-format
-msgid "Array element type cannot be %s"
+msgid "type receive function %s must return %s"
msgstr ""
-#: commands/typecmds.c:178
+#: commands/typecmds.c:317
#, c-format
-msgid "DefineType: \"%s\" alignment not recognized"
+msgid "type send function %s must return bytea"
msgstr ""
-#: commands/typecmds.c:194
+#: commands/typecmds.c:520
#, c-format
-msgid "DefineType: \"%s\" storage not recognized"
+msgid "domain names must be %d characters or less"
msgstr ""
-#: commands/typecmds.c:199
+#: commands/typecmds.c:541
#, c-format
-msgid "DefineType: attribute \"%s\" not recognized"
-msgstr ""
+msgid "\"%s\" is not a valid base type for a domain"
+msgstr "\"%s\" не является верным базовым типом для домена"
-#: commands/typecmds.c:208
-msgid "Define: \"input\" unspecified"
-msgstr ""
+#: commands/typecmds.c:598
+#: commands/typecmds.c:1457
+msgid "FOREIGN KEY constraints not supported for domains"
+msgstr "FOREIGN KEY констрейнты не поддерживаются для доменов"
-#: commands/typecmds.c:210
-msgid "Define: \"output\" unspecified"
+#: commands/typecmds.c:618
+msgid "multiple DEFAULT expressions"
msgstr ""
-#: commands/typecmds.c:243
-#, c-format
-msgid "TypeCreate: changing return type of function %s from OPAQUE to %s"
+#: commands/typecmds.c:648
+#: commands/typecmds.c:657
+msgid "conflicting NULL/NOT NULL constraints"
msgstr ""
-#: commands/typecmds.c:248
-#, c-format
-msgid "Type input function %s must return %s"
-msgstr ""
+#: commands/typecmds.c:676
+#: commands/typecmds.c:1488
+msgid "UNIQUE constraints not supported for domains"
+msgstr "UNIQUE констрейнты не поддерживаются для доменов"
-#: commands/typecmds.c:256
-#, c-format
-msgid "TypeCreate: changing return type of function %s from OPAQUE to CSTRING"
-msgstr ""
+#: commands/typecmds.c:682
+#: commands/typecmds.c:1494
+msgid "PRIMARY KEY constraints not supported for domains"
+msgstr "PRIMARY KEY констрэйнты не поддерживаются для доменов"
-#: commands/typecmds.c:261
-#, c-format
-msgid "Type output function %s must return cstring"
+#: commands/typecmds.c:691
+#: commands/typecmds.c:1503
+msgid "deferrability constraints not supported for domains"
msgstr ""
-#: commands/typecmds.c:389
+#: commands/typecmds.c:808
+#: commands/typecmds.c:1737
+#: commands/typecmds.c:2048
#, c-format
-msgid "RemoveTypeById: type %u not found"
-msgstr "RemoveTypeById: тип %u не найден"
+msgid "\"%s\" is not a domain"
+msgstr "\"%s\" не является доменом"
-#: commands/typecmds.c:450
+#: commands/typecmds.c:878
#, c-format
-msgid "CREATE DOMAIN: domain names must be %d characters or less"
+msgid "changing argument type of function %s from OPAQUE to CSTRING"
msgstr ""
-#: commands/typecmds.c:469
+#: commands/typecmds.c:948
#, c-format
-msgid "DefineDomain: %s is not a basetype"
-msgstr ""
-
-#: commands/typecmds.c:522
-msgid "CREATE DOMAIN / FOREIGN KEY constraints not supported"
-msgstr "CREATE DOMAIN / FOREIGN KEY: коистрэйты не поддерживаются"
-
-#: commands/typecmds.c:526
-msgid "DefineDomain: unexpected constraint node type"
-msgstr ""
-
-#: commands/typecmds.c:538
-msgid "CREATE DOMAIN has multiple DEFAULT expressions"
-msgstr ""
-
-#: commands/typecmds.c:565 commands/typecmds.c:572
-msgid "CREATE DOMAIN has conflicting NULL / NOT NULL constraint"
-msgstr ""
-
-#: commands/typecmds.c:588
-msgid "CREATE DOMAIN / UNIQUE not supported"
-msgstr "CREATE DOMAIN / UNIQUE не поддерживаются"
-
-#: commands/typecmds.c:592
-msgid "CREATE DOMAIN / PRIMARY KEY not supported"
-msgstr "CREATE DOMAIN / PRIMARY KEY не поддерживаются"
-
-#: commands/typecmds.c:599
-msgid ""
-"CREATE DOMAIN: DEFERRABLE, NON DEFERRABLE, DEFERRED and IMMEDIATE not "
-"supported"
+msgid "changing argument type of function %s from OPAQUE to %s"
msgstr ""
-#: commands/typecmds.c:604
-msgid "DefineDomain: unrecognized constraint subtype"
+#: commands/typecmds.c:1059
+msgid "composite type must have at least one attribute"
msgstr ""
-#: commands/typecmds.c:696
-#, c-format
-msgid "RemoveDomain: type \"%s\" does not exist"
-msgstr "RemoveDomain: тип \"%s\" не существует"
-
-#: commands/typecmds.c:709 commands/typecmds.c:1507
+#: commands/typecmds.c:1250
#, c-format
-msgid "%s is not a domain"
-msgstr "%s не является доменом"
-
-#: commands/typecmds.c:778
-#, c-format
-msgid "TypeCreate: changing argument type of function %s from OPAQUE to %s"
+msgid "\"%s\" is already set to %s"
msgstr ""
-#: commands/typecmds.c:837
+#: commands/typecmds.c:1294
#, c-format
-msgid ""
-"TypeCreate: changing argument type of function %s from OPAQUE to CSTRING"
+msgid "relation \"%s\" attribute \"%s\" contains NULL values"
msgstr ""
-#: commands/typecmds.c:880
-msgid "attempted to define composite type relation with no attrs"
+#: commands/typecmds.c:1471
+msgid "use ALTER DOMAIN .. SET DEFAULT instead"
msgstr ""
-#: commands/typecmds.c:941 commands/typecmds.c:1060 commands/typecmds.c:1185
-#: commands/typecmds.c:1272
-#, c-format
-msgid "AlterDomain: type \"%s\" does not exist"
-msgstr "AlterDomain: тип \"%s\" не существует"
-
-#: commands/typecmds.c:1070
-#, c-format
-msgid "AlterDomain: %s is already set to %s"
+#: commands/typecmds.c:1478
+msgid "use ALTER DOMAIN .. [ SET | DROP ] NOT NULL instead"
msgstr ""
-#: commands/typecmds.c:1111
+#: commands/typecmds.c:1574
#, c-format
-msgid "ALTER DOMAIN: Relation \"%s\" Attribute \"%s\" contains NULL values"
+msgid "relation \"%s\" attribute \"%s\" contains values that violate the new constraint"
msgstr ""
-#: commands/typecmds.c:1282
-msgid "ALTER DOMAIN / FOREIGN KEY constraints not supported"
-msgstr "ALTER DOMAIN / FOREIGN KEY: констрэйнты не поддерживаются"
-
-#: commands/typecmds.c:1286
-msgid "AlterDomainAddConstraint: unexpected constraint node type"
-msgstr ""
-
-#: commands/typecmds.c:1293
-msgid "Use ALTER DOMAIN .. SET DEFAULT instead"
-msgstr ""
-
-#: commands/typecmds.c:1298
-msgid "Use ALTER DOMAIN .. [ SET | DROP ] NOT NULL instead"
-msgstr ""
-
-#: commands/typecmds.c:1306
-msgid "ALTER DOMAIN / UNIQUE indexes not supported"
-msgstr "ALTER DOMAIN / UNIQUE: индексы не поддерживаются"
-
-#: commands/typecmds.c:1310
-msgid "ALTER DOMAIN / PRIMARY KEY indexes not supported"
-msgstr "ALTER DOMAIN / PRIMARY KEY: индексы не поддерживаются"
-
-#: commands/typecmds.c:1317
-msgid ""
-"ALTER DOMAIN: DEFERRABLE, NON DEFERRABLE, DEFERRED and IMMEDIATE not "
-"supported"
-msgstr ""
-
-#: commands/typecmds.c:1322
-msgid "AlterDomainAddConstraint: unrecognized constraint node type"
-msgstr ""
-
-#: commands/typecmds.c:1387
+#: commands/typecmds.c:1771
#, c-format
-msgid "AlterDomainAddConstraint: Domain %s constraint %s failed"
-msgstr ""
-
-#: commands/typecmds.c:1535
-#, c-format
-msgid "constraint \"%s\" already exists for domain \"%s\""
-msgstr "констрэйт \"%s\" уже существует для домена \"%s\""
-
-#: commands/typecmds.c:1575
-msgid "Relations cannot be referenced in domain CHECK constraint"
+msgid "constraint \"%s\" for domain \"%s\" already exists"
msgstr ""
-#: commands/typecmds.c:1582
-msgid "cannot use column references in domain CHECK clause"
+#: commands/typecmds.c:1811
+#: commands/typecmds.c:1820
+msgid "cannot use table references in domain CHECK constraint"
msgstr ""
-#: commands/user.c:147
+#: commands/user.c:149
+#: commands/user.c:248
+#: commands/user.c:297
+#: commands/user.c:379
#, c-format
-msgid "write_group_file: unable to write %s: %m"
+msgid "could not write temp file \"%s\": %m"
msgstr ""
-#: commands/user.c:181
+#: commands/user.c:184
#, c-format
-msgid "Invalid group name '%s'"
-msgstr "Неверное имя группы '%s'"
+msgid "invalid group name \"%s\""
+msgstr "неверное имя группы \"%s\""
-#: commands/user.c:211 commands/user.c:335
+#: commands/user.c:215
+#: commands/user.c:347
#, c-format
-msgid "Invalid user name '%s'"
-msgstr "Неверное имя пользователя '%s'"
+msgid "invalid user name \"%s\""
+msgstr "неверное имя пользователя \"%s\""
-#: commands/user.c:242 commands/user.c:364
+#: commands/user.c:258
+#: commands/user.c:389
#, c-format
-msgid "%s: %m"
-msgstr "%s: %m"
+msgid "could not rename \"%s\" to \"%s\": %m"
+msgstr "не получилось переименовать \"%s\" в \"%s\": %m"
-#: commands/user.c:250 commands/user.c:372
+#: commands/user.c:354
#, c-format
-msgid "rename %s to %s: %m"
-msgstr "RENAME %s TO %s: %m"
+msgid "invalid user password \"%s\""
+msgstr "неверный пароль \"%s\""
-#: commands/user.c:286
-#, c-format
-msgid "write_user_file: unable to write %s: %m"
-msgstr "write_user_file: не удалось записать %s: %m"
-
-#: commands/user.c:341
-#, c-format
-msgid "Invalid user password '%s'"
-msgstr "Неверный пароль '%s'"
-
-#: commands/user.c:505 commands/user.c:515 commands/user.c:521
-#: commands/user.c:527 commands/user.c:533 commands/user.c:539
-msgid "CREATE USER: conflicting options"
-msgstr ""
-
-#: commands/user.c:543
-#, c-format
-msgid "CREATE USER: option \"%s\" not recognized"
-msgstr ""
-
-#: commands/user.c:555
+#: commands/user.c:587
msgid "user id must be positive"
msgstr ""
-#: commands/user.c:570
-msgid "CREATE USER: permission denied"
+#: commands/user.c:604
+msgid "must be superuser to create users"
msgstr ""
-#: commands/user.c:573
+#: commands/user.c:609
#, c-format
-msgid "CREATE USER: user name \"%s\" is reserved"
+msgid "user name \"%s\" is reserved"
msgstr ""
-#: commands/user.c:608
+#: commands/user.c:646
+#: commands/user.c:1191
#, c-format
-msgid "CREATE USER: user name \"%s\" already exists"
-msgstr ""
-
-#: commands/user.c:611
-#, c-format
-msgid "CREATE USER: sysid %d is already assigned"
-msgstr ""
-
-#: commands/user.c:642 commands/user.c:843
-msgid "CREATE USER: password encryption failed"
-msgstr ""
-
-#: commands/user.c:733 commands/user.c:743 commands/user.c:749
-#: commands/user.c:755
-msgid "ALTER USER: conflicting options"
-msgstr ""
+msgid "user \"%s\" already exists"
+msgstr "пользователь \"%s\" уже существует"
-#: commands/user.c:759
+#: commands/user.c:651
+#: commands/user.c:1357
#, c-format
-msgid "ALTER USER: option \"%s\" not recognized"
+msgid "sysid %d is already assigned"
msgstr ""
-#: commands/user.c:782
-msgid "ALTER USER: permission denied"
-msgstr "ALTER USER: нет доступа"
-
-#: commands/user.c:796
-#, c-format
-msgid "ALTER USER: user \"%s\" does not exist"
-msgstr "ALTER USER: пользователь \"%s\" не существует"
-
-#: commands/user.c:907 commands/variable.c:549 utils/cache/lsyscache.c:1543
-#: utils/init/miscinit.c:555
+#: commands/user.c:848
+#: commands/user.c:961
+#: commands/user.c:1053
+#: commands/user.c:1172
+#: commands/variable.c:778
+#: utils/cache/lsyscache.c:1989
+#: utils/init/miscinit.c:259
#, c-format
msgid "user \"%s\" does not exist"
msgstr "пользователь \"%s\" не существует"
-#: commands/user.c:968
-msgid "DROP USER: permission denied"
-msgstr "DROP USER: нед доступа"
-
-#: commands/user.c:995
-#, c-format
-msgid "DROP USER: user \"%s\" does not exist (no users removed)"
+#: commands/user.c:1026
+msgid "must be superuser to drop users"
msgstr ""
-"DROP USER: пользователь \"%s\" не существует (никто из поользователей не "
-"удалён)"
-
-#: commands/user.c:997
-#, c-format
-msgid "DROP USER: user \"%s\" does not exist"
-msgstr "DROP USER: пользователь \"%s\" не существует"
-#: commands/user.c:1003
+#: commands/user.c:1060
msgid "current user cannot be dropped"
msgstr ""
-#: commands/user.c:1005
+#: commands/user.c:1064
msgid "session user cannot be dropped"
msgstr ""
-#: commands/user.c:1029
-#, c-format
-msgid "DROP USER: user \"%s\" owns database \"%s\", cannot be removed%s"
-msgstr ""
-
-#: commands/user.c:1109
-#, c-format
-msgid "CheckPgUserAclNotNull: \"%s\" not found"
-msgstr ""
-
-#: commands/user.c:1114
-#, c-format
-msgid ""
-"To use passwords, you have to revoke permissions on %s so normal users "
-"cannot read the passwords. Try 'REVOKE ALL ON \"%s\" FROM PUBLIC'."
-msgstr ""
-"Для использования паролей требуется отнять права на %s так чтобы обычные "
-"пользователи не смогли их читать. Попробуйте 'REVOKE ALL ON \"%s\" FROM "
-"PUBLIC'."
-
-#: commands/user.c:1156 commands/user.c:1162
-msgid "CREATE GROUP: conflicting options"
-msgstr "CREATE GROUP: конфликт опций"
-
-#: commands/user.c:1166
-#, c-format
-msgid "CREATE GROUP: option \"%s\" not recognized"
-msgstr "CREATE GROUP: опция \"%s\" не распознана"
-
-#: commands/user.c:1174
-msgid "group id must be positive"
-msgstr ""
-
-#: commands/user.c:1185
-msgid "CREATE GROUP: permission denied"
-msgstr "CREATE GROUP: нет доступа"
-
-#: commands/user.c:1188
-#, c-format
-msgid "CREATE GROUP: group name \"%s\" is reserved"
-msgstr ""
-
-#: commands/user.c:1223
-#, c-format
-msgid "CREATE GROUP: group name \"%s\" already exists"
-msgstr ""
-
-#: commands/user.c:1226
-#, c-format
-msgid "CREATE GROUP: group sysid %d is already assigned"
-msgstr ""
-
-#: commands/user.c:1319
-#, c-format
-msgid "%s: group \"%s\" does not exist"
-msgstr ""
-
-#: commands/user.c:1360
-#, c-format
-msgid "AlterGroup: unknown tag %s"
-msgstr ""
-
-#: commands/user.c:1372
+#: commands/user.c:1090
#, c-format
-msgid "%s: user \"%s\" is already in group \"%s\""
-msgstr ""
-
-#: commands/user.c:1387
-#, c-format
-msgid "ALTER GROUP: group \"%s\" does not have any members"
-msgstr ""
-
-#: commands/user.c:1412
-#, c-format
-msgid "ALTER GROUP: user \"%s\" is not in group \"%s\""
-msgstr ""
-
-#: commands/user.c:1541
-msgid "DROP GROUP: permission denied"
-msgstr ""
-
-#: commands/user.c:1554
-#, c-format
-msgid "DROP GROUP: group \"%s\" does not exist"
-msgstr ""
-
-#: commands/vacuum.c:459
-msgid ""
-"oldest Xmin is far in the past --- close open transactions soon to avoid "
-"wraparound problems"
+msgid "user \"%s\" cannot be dropped"
msgstr ""
-#: commands/vacuum.c:505 commands/vacuum.c:512
+#: commands/user.c:1091
#, c-format
-msgid "pg_class entry for relid %u vanished during vacuuming"
+msgid "The user owns database \"%s\"."
msgstr ""
-#: commands/vacuum.c:665
-msgid ""
-"Some databases have not been vacuumed in over 2 billion transactions.\n"
-"\tYou may have already suffered transaction-wraparound data loss."
+#: commands/user.c:1183
+msgid "session user may not be renamed"
msgstr ""
-#: commands/vacuum.c:676
-msgid ""
-"Some databases have not been vacuumed in over 1 billion transactions.\n"
-"\tBetter vacuum them soon, or you may have a wraparound failure."
+#: commands/user.c:1197
+msgid "must be superuser to rename users"
msgstr ""
-#: commands/vacuum.c:683
+#: commands/user.c:1230
#, c-format
-msgid ""
-"Some databases have not been vacuumed in %d transactions.\n"
-"\tBetter vacuum them within %d transactions,\n"
-"\tor you may have a wraparound failure."
+msgid "before using passwords you must revoke permissions on %s"
msgstr ""
-#: commands/vacuum.c:771
-#, c-format
-msgid "Skipping \"%s\" --- only table or database owner can VACUUM it"
+#: commands/user.c:1232
+msgid "This restriction is to prevent unprivileged users from reading the passwords."
msgstr ""
-#: commands/vacuum.c:977
+#: commands/user.c:1233
#, c-format
-msgid "VACUUM (full_vacuum_rel): FlushRelationBuffers returned %d"
+msgid "Try 'REVOKE ALL ON \"%s\" FROM PUBLIC'."
msgstr ""
-#: commands/vacuum.c:1044 commands/vacuumlazy.c:210
-#, c-format
-msgid "--Relation %s.%s--"
+#: commands/user.c:1297
+msgid "group id must be positive"
msgstr ""
-#: commands/vacuum.c:1078 commands/vacuumlazy.c:268
-#, c-format
-msgid "Rel %s: Uninitialized page %u - fixing"
+#: commands/user.c:1310
+msgid "must be superuser to create groups"
msgstr ""
-#: commands/vacuum.c:1192
+#: commands/user.c:1315
#, c-format
-msgid ""
-"Rel %s: TID %u/%u: InsertTransactionInProgress %u - can't shrink relation"
+msgid "group name \"%s\" is reserved"
msgstr ""
-#: commands/vacuum.c:1202
+#: commands/user.c:1352
+#: commands/user.c:1739
#, c-format
-msgid ""
-"Rel %s: TID %u/%u: DeleteTransactionInProgress %u - can't shrink relation"
-msgstr ""
+msgid "group \"%s\" already exists"
+msgstr "группа \"%s\" уже существует"
-#: commands/vacuum.c:1220 commands/vacuumlazy.c:372
-#, c-format
-msgid "Rel %s: TID %u/%u: OID IS INVALID. TUPGONE %d."
+#: commands/user.c:1437
+msgid "must be superuser to alter groups"
msgstr ""
-#: commands/vacuum.c:1358
+#: commands/user.c:1504
#, c-format
-msgid ""
-"Pages %u: Changed %u, reaped %u, Empty %u, New %u; Tup %.0f: Vac %.0f, Keep/"
-"VTL %.0f/%u, UnUsed %.0f, MinLen %lu, MaxLen %lu; Re-using: Free/Avail. "
-"Space %.0f/%.0f; EndEmpty/Avail. Pages %u/%u.\n"
-"\t%s"
-msgstr ""
-
-#: commands/vacuum.c:1582
-msgid "HEAP_MOVED_IN was not expected"
+msgid "user \"%s\" is already in group \"%s\""
msgstr ""
-#: commands/vacuum.c:1592
-msgid "Invalid XVAC in tuple header"
-msgstr ""
-
-#: commands/vacuum.c:1617
-msgid "HEAP_MOVED_OFF was expected"
-msgstr ""
-
-#: commands/vacuum.c:1671 commands/vacuum.c:1793
-msgid "Parent item in update-chain not found - can't continue repair_frag"
-msgstr ""
-
-#: commands/vacuum.c:1708
-msgid ""
-"Child itemid in update-chain marked as unused - can't continue repair_frag"
-msgstr ""
-
-#: commands/vacuum.c:1805
-msgid "Parent itemid marked as unused"
-msgstr ""
-
-#: commands/vacuum.c:1829
-msgid "Too old parent tuple found - can't continue repair_frag"
-msgstr ""
-
-#: commands/vacuum.c:1958
+#: commands/user.c:1521
#, c-format
-msgid "moving chain: failed to add item with len = %lu to page %u"
+msgid "group \"%s\" does not have any members"
msgstr ""
-#: commands/vacuum.c:2102
+#: commands/user.c:1549
#, c-format
-msgid ""
-"failed to add item with len = %lu to page %u (free space %lu, nusd %u, noff %"
-"u)"
-msgstr ""
+msgid "user \"%s\" is not in group \"%s\""
+msgstr "пользователь \"%s\" не принадлежит группе \"%s\""
-#: commands/vacuum.c:2191
-msgid "HEAP_MOVED_IN was not expected (2)"
+#: commands/user.c:1681
+msgid "must be superuser to drop groups"
msgstr ""
-#: commands/vacuum.c:2195
-msgid "Invalid XVAC in tuple header (4)"
+#: commands/user.c:1745
+msgid "must be superuser to rename groups"
msgstr ""
-#: commands/vacuum.c:2220
-msgid "HEAP_MOVED_OFF was expected (2)"
+#: commands/vacuum.c:466
+msgid "oldest Xmin is far in the past"
msgstr ""
-#: commands/vacuum.c:2331
-msgid "HEAP_MOVED_OFF/HEAP_MOVED_IN was expected"
+#: commands/vacuum.c:467
+msgid "Close open transactions soon to avoid wraparound problems."
msgstr ""
-#: commands/vacuum.c:2333
-msgid "Invalid XVAC in tuple header (2)"
+#: commands/vacuum.c:674
+msgid "some databases have not been vacuumed in over 2 billion transactions"
msgstr ""
-#: commands/vacuum.c:2351
-#, c-format
-msgid ""
-"Rel %s: Pages: %u --> %u; Tuple(s) moved: %u.\n"
-"\t%s"
+#: commands/vacuum.c:675
+msgid "You may have already suffered transaction-wraparound data loss."
msgstr ""
-#: commands/vacuum.c:2413
-msgid "Invalid XVAC in tuple header (3)"
+#: commands/vacuum.c:686
+msgid "some databases have not been vacuumed in over 1 billion transactions"
msgstr ""
-#: commands/vacuum.c:2418
-msgid "HEAP_MOVED_OFF was expected (3)"
+#: commands/vacuum.c:687
+msgid "Better vacuum them soon, or you may have a wraparound failure."
msgstr ""
-#: commands/vacuum.c:2468
+#: commands/vacuum.c:694
#, c-format
-msgid "VACUUM (repair_frag): FlushRelationBuffers returned %d"
+msgid "some databases have not been vacuumed in %d transactions"
msgstr ""
-#: commands/vacuum.c:2534
+#: commands/vacuum.c:696
#, c-format
-msgid "VACUUM (vacuum_heap): FlushRelationBuffers returned %d"
+msgid "Better vacuum them within %d transactions, or you may have a wraparound failure."
msgstr ""
-#: commands/vacuum.c:2540
+#: commands/vacuum.c:785
#, c-format
-msgid "Rel %s: Pages: %u --> %u."
+msgid "skipping \"%s\" --- only table or database owner can VACUUM it"
msgstr ""
-#: commands/vacuum.c:2625 commands/vacuumlazy.c:599
+#: commands/vacuum.c:799
#, c-format
-msgid ""
-"Index %s: Pages %u; Tuples %.0f.\n"
-"\t%s"
+msgid "skipping \"%s\" --- cannot VACUUM indexes, views or special system tables"
msgstr ""
-#: commands/vacuum.c:2638 commands/vacuum.c:2692
+#: commands/vacuum.c:1058
+#: commands/vacuumlazy.c:205
#, c-format
-msgid ""
-"Index %s: NUMBER OF INDEX' TUPLES (%.0f) IS NOT THE SAME AS HEAP' (%.0f).\n"
-"\tRecreate the index."
+msgid "vacuuming \"%s.%s\""
msgstr ""
-#: commands/vacuum.c:2679 commands/vacuumlazy.c:646
+#: commands/vacuum.c:1093
+#: commands/vacuumlazy.c:263
#, c-format
-msgid ""
-"Index %s: Pages %u; Tuples %.0f: Deleted %.0f.\n"
-"\t%s"
+msgid "relation \"%s\" page %u is uninitialized --- fixing"
msgstr ""
-#: commands/vacuumlazy.c:434
+#: commands/vacuum.c:1210
#, c-format
-msgid ""
-"Pages %u: Changed %u, Empty %u; Tup %.0f: Vac %.0f, Keep %.0f, UnUsed %.0f.\n"
-"\tTotal %s"
+msgid "relation \"%s\" TID %u/%u: InsertTransactionInProgress %u --- can't shrink relation"
msgstr ""
-#: commands/vacuumlazy.c:484
+#: commands/vacuum.c:1223
#, c-format
-msgid ""
-"Removed %d tuples in %d pages.\n"
-"\t%s"
+msgid "relation \"%s\" TID %u/%u: DeleteTransactionInProgress %u --- can't shrink relation"
msgstr ""
-#: commands/vacuumlazy.c:720
+#: commands/vacuum.c:1385
+#: commands/vacuumlazy.c:428
#, c-format
-msgid "VACUUM (lazy_truncate_heap): FlushRelationBuffers returned %d"
+msgid "\"%s\": found %.0f removable, %.0f nonremovable tuples in %u pages"
msgstr ""
-#: commands/vacuumlazy.c:755
+#: commands/vacuum.c:1388
#, c-format
msgid ""
-"Truncated %u --> %u pages.\n"
-"\t%s"
-msgstr ""
-
-#: commands/variable.c:62
-msgid "SET DATESTYLE: invalid list syntax"
+"%.0f dead tuples cannot be removed yet.\n"
+"Nonremovable tuples range from %lu to %lu bytes long.\n"
+"There were %.0f unused item pointers.\n"
+"Total free space (including removable tuples) is %.0f bytes.\n"
+"%u pages are or will become empty, including %u at the end of the table.\n"
+"%u pages containing %.0f free bytes are potential move destinations.\n"
+"%s"
msgstr ""
-#: commands/variable.c:141
+#: commands/vacuum.c:2391
#, c-format
-msgid "SET DATESTYLE: unrecognized keyword %s"
-msgstr ""
-
-#: commands/variable.c:156
-msgid "SET DATESTYLE: conflicting specifications"
-msgstr ""
-
-#: commands/variable.c:288
-msgid "SET TIME ZONE: illegal INTERVAL; month not allowed"
-msgstr ""
-
-#: commands/variable.c:331
-msgid "Unable to clear TZ environment variable"
-msgstr ""
-
-#: commands/variable.c:351
-msgid "assign_timezone: putenv failed"
-msgstr ""
-
-#: commands/variable.c:420
-msgid "SET TRANSACTION ISOLATION LEVEL must be called before any query"
+msgid "\"%s\": moved %u tuples, truncated %u to %u pages"
msgstr ""
-#: commands/variable.c:495
+#: commands/vacuum.c:2394
+#: commands/vacuumlazy.c:489
+#: commands/vacuumlazy.c:774
+#: nodes/print.c:87
+#: storage/lmgr/deadlock.c:888
+#: tcop/postgres.c:3191
#, c-format
-msgid "Conversion between %s and %s is not supported"
-msgstr ""
-
-#: commands/variable.c:507
-msgid "SET SERVER_ENCODING is not supported"
-msgstr "SET SERVER_ENCODING не поддерживается"
-
-#: commands/view.c:87
-msgid "attempted to define virtual relation with no attrs"
-msgstr ""
+msgid "%s"
+msgstr "%s"
-#: commands/view.c:109
+#: commands/vacuum.c:2578
+#: commands/vacuumlazy.c:771
#, c-format
-msgid "%s is not a view"
-msgstr "%s не является видом"
-
-#: commands/view.c:162 commands/view.c:172
-msgid "Cannot change number of columns in view"
+msgid "\"%s\": truncated %u to %u pages"
msgstr ""
-#: commands/view.c:175
+#: commands/vacuum.c:2670
+#: commands/vacuum.c:2737
+#: commands/vacuumlazy.c:597
+#: commands/vacuumlazy.c:657
#, c-format
-msgid "Cannot change name of view column \"%s\""
+msgid "index \"%s\" now contains %.0f tuples in %u pages"
msgstr ""
-#: commands/view.c:180
+#: commands/vacuum.c:2674
+#: commands/vacuumlazy.c:601
#, c-format
-msgid "Cannot change datatype of view column \"%s\""
+msgid ""
+"%u index pages have been deleted, %u are currently reusable.\n"
+"%s"
msgstr ""
-#: executor/execAmi.c:163
+#: commands/vacuum.c:2688
+#: commands/vacuum.c:2757
#, c-format
-msgid "ExecReScan: node type %d not supported"
+msgid "index \"%s\" contains %.0f tuples, but table contains %.0f tuples"
msgstr ""
-#: executor/execAmi.c:211
-#, c-format
-msgid "ExecMarkPos: node type %d not supported"
+#: commands/vacuum.c:2691
+#: commands/vacuum.c:2760
+msgid "Rebuild the index with REINDEX."
msgstr ""
-#: executor/execAmi.c:252
+#: commands/vacuum.c:2741
+#: commands/vacuumlazy.c:661
#, c-format
-msgid "ExecRestrPos: node type %d not supported"
+msgid ""
+"%.0f index tuples were removed.\n"
+"%u index pages have been deleted, %u are currently reusable.\n"
+"%s"
msgstr ""
-#: executor/execMain.c:369
+#: commands/vacuumlazy.c:431
#, c-format
-msgid "ExecCheckRTEPerms: bogus operation %d"
+msgid ""
+"%.0f dead tuples cannot be removed yet.\n"
+"There were %.0f unused item pointers.\n"
+"%u pages are entirely empty.\n"
+"%s"
msgstr ""
-#: executor/execMain.c:741
+#: commands/vacuumlazy.c:486
#, c-format
-msgid "You can't change sequence relation %s"
+msgid "\"%s\": removed %d tuples in %d pages"
msgstr ""
-#: executor/execMain.c:745
-#, c-format
-msgid "You can't change toast relation %s"
+#: commands/variable.c:75
+msgid "invalid list syntax for datestyle"
msgstr ""
-#: executor/execMain.c:749
+#: commands/variable.c:161
#, c-format
-msgid "You can't change view relation %s"
+msgid "unrecognized datestyle keyword: \"%s\""
msgstr ""
-#: executor/execMain.c:963
-msgid "ExecutePlan: NO (junk) `ctid' was found!"
+#: commands/variable.c:179
+msgid "conflicting datestyle specifications"
msgstr ""
-#: executor/execMain.c:967
-msgid "ExecutePlan: (junk) `ctid' is NULL!"
+#: commands/variable.c:450
+msgid "invalid INTERVAL for time zone: month not allowed"
msgstr ""
-#: executor/execMain.c:992
+#: commands/variable.c:557
#, c-format
-msgid "ExecutePlan: NO (junk) `%s' was found!"
+msgid "unrecognized timezone name: \"%s\""
msgstr ""
-#: executor/execMain.c:997
+#: commands/variable.c:565
#, c-format
-msgid "ExecutePlan: (junk) `%s' is NULL!"
+msgid "timezone \"%s\" appears to use leap seconds"
msgstr ""
-#: executor/execMain.c:1086
-msgid "ExecutePlan: unknown operation in queryDesc"
+#: commands/variable.c:567
+msgid "PostgreSQL does not support leap seconds"
msgstr ""
-#: executor/execMain.c:1372
-msgid "ExecUpdate: UPDATE can't run without transactions"
+#: commands/variable.c:636
+msgid "SET TRANSACTION ISOLATION LEVEL must be called before any query"
msgstr ""
-#: executor/execMain.c:1572
+#: commands/variable.c:713
+#: utils/mb/mbutils.c:188
#, c-format
-msgid "%s: Fail to add null value in not null attribute %s"
+msgid "conversion between %s and %s is not supported"
msgstr ""
-#: executor/execMain.c:1582
-#, c-format
-msgid "%s: rejected due to CHECK constraint \"%s\" on \"%s\""
+#: commands/view.c:89
+msgid "view must have at least one attribute"
msgstr ""
-#: executor/execMain.c:1625
+#: commands/view.c:113
+#: tcop/utility.c:86
#, c-format
-msgid "EvalPlanQual: can't find RTE %d"
-msgstr ""
+msgid "\"%s\" is not a view"
+msgstr "\"%s\" не является видом"
-#: executor/execMain.c:1643
-msgid "EvalPlanQual: t_xmin is uncommitted ?!"
+#: commands/view.c:169
+#: commands/view.c:181
+msgid "cannot change number of columns in view"
msgstr ""
-#: executor/execProcnode.c:218
+#: commands/view.c:186
#, c-format
-msgid "ExecInitNode: node type %d unsupported"
+msgid "cannot change name of view column \"%s\""
msgstr ""
-#: executor/execProcnode.c:378
+#: commands/view.c:193
#, c-format
-msgid "ExecProcNode: node type %d unsupported"
+msgid "cannot change datatype of view column \"%s\""
msgstr ""
-#: executor/execProcnode.c:471
+#: executor/execMain.c:844
#, c-format
-msgid "ExecCountSlotsNode: node type %d unsupported"
+msgid "cannot change sequence relation \"%s\""
msgstr ""
-#: executor/execProcnode.c:600
+#: executor/execMain.c:850
#, c-format
-msgid "ExecEndNode: node type %d unsupported"
+msgid "cannot change toast relation \"%s\""
msgstr ""
-#: executor/execProcnode.c:776
+#: executor/execMain.c:856
#, c-format
-msgid "ExecGetTupType: node type %d unsupported"
+msgid "cannot change view relation \"%s\""
msgstr ""
-#: executor/execQual.c:167 executor/execQual.c:189
+#: executor/execMain.c:1689
#, c-format
-msgid "ExecEvalArrayRef: can only handle %d dimensions"
-msgstr ""
-
-#: executor/execQual.c:211
-msgid "ExecEvalArrayRef: upper and lower indices mismatch"
-msgstr ""
-
-#: executor/execQual.c:292
-msgid "ExecEvalAggref: no aggregates in this expression context"
+msgid "null value for attribute \"%s\" violates NOT NULL constraint"
msgstr ""
-#: executor/execQual.c:470
+#: executor/execMain.c:1701
#, c-format
-msgid "ExecEvalParam: invalid paramkind %d"
+msgid "new row for relation \"%s\" violates CHECK constraint \"%s\""
msgstr ""
-#: executor/execQual.c:482
+#: executor/execQual.c:180
+#: executor/execQual.c:204
+#: executor/execQual.c:1719
+#: utils/adt/array_userfuncs.c:362
+#: utils/adt/arrayfuncs.c:212
+#: utils/adt/arrayfuncs.c:378
+#: utils/adt/arrayfuncs.c:897
+#: utils/adt/arrayfuncs.c:2237
#, c-format
-msgid "ExecEvalParam: Unknown value for parameter %s"
+msgid "number of array dimensions exceeds the maximum allowed, %d"
msgstr ""
-#: executor/execQual.c:485
+#: executor/execQual.c:500
#, c-format
-msgid "ExecEvalParam: Unknown value for parameter %d"
-msgstr ""
-
-#: executor/execQual.c:517
-msgid "GetAttributeByNum: Invalid attribute number"
-msgstr ""
-
-#: executor/execQual.c:520
-msgid "GetAttributeByNum: cannot access system attributes here"
+msgid "no value found for parameter \"%s\""
msgstr ""
-#: executor/execQual.c:523
-msgid "GetAttributeByNum: a NULL isNull flag was passed"
-msgstr ""
-
-#: executor/execQual.c:551
-msgid "GetAttributeByName: Invalid attribute name"
-msgstr ""
-
-#: executor/execQual.c:554
-msgid "GetAttributeByName: a NULL isNull flag was passed"
-msgstr ""
-
-#: executor/execQual.c:576
+#: executor/execQual.c:505
#, c-format
-msgid "GetAttributeByName: attribute %s not found"
+msgid "no value found for parameter %d"
msgstr ""
-#: executor/execQual.c:603
-msgid "init_fcache: too many arguments"
-msgstr ""
+#: executor/execQual.c:665
+msgid "functions and operators can take at most one set argument"
+msgstr "функции и операторы принимают только один аргумент-множество (set)"
-#: executor/execQual.c:645
-msgid "Functions and operators can take only one set argument"
+#: executor/execQual.c:717
+#: executor/execQual.c:761
+#: executor/execQual.c:948
+#: executor/execQual.c:2959
+#: executor/functions.c:578
+#: executor/functions.c:617
+#: utils/adt/pgstatfuncs.c:191
+#: utils/adt/sets.c:207
+#: utils/fmgr/funcapi.c:38
+msgid "set-valued function called in context that cannot accept a set"
msgstr ""
-#: executor/execQual.c:695 executor/execQual.c:737 executor/execQual.c:922
-#: executor/execQual.c:2427 executor/functions.c:524 executor/functions.c:559
-#: utils/adt/sets.c:204
-msgid "Set-valued function called in context that cannot accept a set"
+#: executor/execQual.c:1059
+#: executor/execQual.c:1100
+msgid "function returning tuple cannot return NULL"
msgstr ""
-#: executor/execQual.c:1033 executor/execQual.c:1068
-msgid ""
-"ExecMakeTableFunctionResult: Invalid result from function returning tuple"
+#: executor/execQual.c:1064
+msgid "function returning tuple did not return a valid tuple slot"
msgstr ""
-#: executor/execQual.c:1093
-msgid "ExecMakeTableFunctionResult: Materialize-mode protocol not followed"
+#: executor/execQual.c:1127
+msgid "table-function protocol for materialize mode was not followed"
msgstr ""
-#: executor/execQual.c:1098
+#: executor/execQual.c:1134
#, c-format
-msgid "ExecMakeTableFunctionResult: unknown returnMode %d"
+msgid "unrecognized table-function returnMode: %d"
msgstr ""
-#: executor/execQual.c:1218
+#: executor/execQual.c:1247
msgid "IS DISTINCT FROM does not support set arguments"
msgstr ""
-#: executor/execQual.c:1470
-#, c-format
-msgid "ExecEvalNullTest: unexpected nulltesttype %d"
+#: executor/execQual.c:1315
+msgid "op ANY/ALL (array) does not support set arguments"
msgstr ""
-#: executor/execQual.c:1555
-#, c-format
-msgid "ExecEvalBooleanTest: unexpected booltesttype %d"
+#: executor/execQual.c:1705
+msgid "cannot merge incompatible arrays"
msgstr ""
-#: executor/execQual.c:1584
+#: executor/execQual.c:1706
#, c-format
-msgid "Domain %s does not allow NULL values"
+msgid "Array with element type %s cannot be included in ARRAY construct with element type %s."
msgstr ""
-#: executor/execQual.c:1611
-#, c-format
-msgid "ExecEvalConstraintTest: Domain %s constraint %s failed"
+#: executor/execQual.c:1739
+msgid "multidimensional arrays must have array expressions with matching dimensions"
msgstr ""
-#: executor/execQual.c:1619
-msgid "ExecEvalConstraintTest: Constraint type unknown"
-msgstr ""
-
-#: executor/execQual.c:1791
-#, c-format
-msgid "ExecEvalExpr: unknown boolop %d"
+#: executor/execQual.c:1849
+msgid "NULLIF does not support set arguments"
msgstr ""
-#: executor/execQual.c:1845
+#: executor/execQual.c:2030
#, c-format
-msgid "ExecEvalExpr: unknown expression type %d"
+msgid "domain %s does not allow NULL values"
msgstr ""
-#: executor/execQual.c:1944 optimizer/util/clauses.c:422
-msgid "Aggregate function calls may not be nested"
-msgstr ""
-
-#: executor/execQual.c:1947
-msgid "ExecInitExpr: Aggref not expected here"
-msgstr ""
-
-#: executor/execQual.c:2016 executor/execQual.c:2153
-msgid "ExecInitExpr: SubPlan not expected here"
-msgstr ""
-
-#: executor/execQual.c:2129
+#: executor/execQual.c:2060
#, c-format
-msgid "ExecInitExpr: unknown expression type %d"
+msgid "value for domain %s violates CHECK constraint \"%s\""
msgstr ""
-#: executor/execTuples.c:259
-msgid ""
-"Plan requires more slots than are available\n"
-"\tsend mail to your local executor guru to fix this"
+#: executor/execQual.c:2417
+#: optimizer/util/clauses.c:411
+#: parser/parse_agg.c:74
+msgid "aggregate function calls may not be nested"
msgstr ""
-#: executor/functions.c:154
+#: executor/functions.c:183
#, c-format
-msgid "init_sql_fcache: Cache lookup failed for procedure %u"
+msgid "could not determine actual result type for function declared %s"
msgstr ""
-#: executor/functions.c:166
+#: executor/functions.c:254
#, c-format
-msgid "init_sql_fcache: Cache lookup failed for type %u"
+msgid "could not determine actual type of argument declared %s"
msgstr ""
-#: executor/functions.c:228
+#: executor/functions.c:673
#, c-format
-msgid "init_sql_fcache: null prosrc for procedure %u"
-msgstr ""
-
-#: executor/instrument.c:40
-msgid "InstrStartTimer called twice in a row"
-msgstr ""
+msgid "SQL function \"%s\" query %d"
+msgstr "SQL-функция \"%s\" запрос %d"
-#: executor/instrument.c:56
-msgid "InstrStopNode without start"
-msgstr ""
-
-#: executor/nodeAgg.c:1253
+#: executor/functions.c:686
#, c-format
-msgid "ExecAgg: cache lookup failed for aggregate %u"
-msgstr "ExecAgg: поиск в кэше агрегата %u не удался"
+msgid "SQL function \"%s\""
+msgstr "SQL-функция \"%s\""
-#: executor/nodeAgg.c:1308
+#: executor/functions.c:692
#, c-format
-msgid "Aggregate %u needs to have compatible input type and transition type"
-msgstr ""
+msgid "SQL function \"%s\" during startup"
+msgstr "SQL-функция \"%s\" при старте"
-#: executor/nodeAgg.c:1357
+#: executor/nodeAgg.c:1314
#, c-format
-msgid ""
-"GetAggInitVal: cache lookup failed on aggregate transition function return "
-"type %u"
+msgid "aggregate %u needs to have compatible input type and transition type"
msgstr ""
-#: executor/nodeAgg.c:1465
+#: executor/nodeIndexscan.c:970
#, c-format
-msgid "Aggregate function %u called as normal function"
+msgid "indexes of relation %u were deactivated"
msgstr ""
-#: executor/nodeFunctionscan.c:91
-msgid ""
-"Query-specified return tuple and actual function return tuple do not match"
+#: executor/nodeFunctionscan.c:93
+msgid "query-specified return tuple and actual function return tuple do not match"
msgstr ""
-#: executor/nodeHash.c:705
-#, c-format
-msgid "ComputeHashFunc: Invalid typLen %d"
-msgstr "ComputeHashFunc: Не верный typLen %d"
-
-#: executor/nodeHashjoin.c:363
+#: executor/nodeHashjoin.c:561
+#: executor/nodeHashjoin.c:571
#, c-format
-msgid "ExecInitHashJoin: unsupported join type %d"
-msgstr ""
-
-#: executor/nodeHashjoin.c:541 executor/nodeHashjoin.c:549
-msgid "Read from hashjoin temp file failed"
-msgstr ""
-
-#: executor/nodeHashjoin.c:605 executor/nodeHashjoin.c:610
-msgid "Failed to rewind hash temp file"
+msgid "read from hashjoin temp file failed: %m"
msgstr ""
-#: executor/nodeHashjoin.c:659 executor/nodeHashjoin.c:662
-msgid "Write to hashjoin temp file failed"
-msgstr ""
-
-#: executor/nodeIndexscan.c:675
-msgid "ExecInitIndexScan: indxqual not an opclause!"
-msgstr ""
-
-#: executor/nodeIndexscan.c:777 executor/nodeIndexscan.c:814
+#: executor/nodeHashjoin.c:629
+#: executor/nodeHashjoin.c:636
#, c-format
-msgid "ExecInitIndexScan: %s"
-msgstr "ExecInitIndexScan: %s"
-
-#: executor/nodeIndexscan.c:887
-#, c-format
-msgid "indexes of the relation %u was inactivated"
-msgstr ""
-
-#: executor/nodeLimit.c:152 executor/nodeLimit.c:167
-msgid "ExecLimit: subplan failed to run backwards"
+msgid "failed to rewind hashjoin temp file: %m"
msgstr ""
-#: executor/nodeLimit.c:198
+#: executor/nodeHashjoin.c:687
+#: executor/nodeHashjoin.c:692
#, c-format
-msgid "ExecLimit: impossible state %d"
+msgid "write to hashjoin temp file failed: %m"
msgstr ""
-#: executor/nodeMergejoin.c:132
-msgid "MJFormSkipQuals: op not an OpExpr!"
+#: executor/spi.c:725
+msgid "cannot open multi-query plan as cursor"
msgstr ""
-#: executor/nodeMergejoin.c:400
-#, c-format
-msgid "ExecMergeJoin: unsupported join type %d"
+#: executor/spi.c:732
+msgid "cannot open non-SELECT query as cursor"
msgstr ""
-#: executor/nodeMergejoin.c:1384
-#, c-format
-msgid "ExecMergeJoin: invalid join state %d, aborting"
+#: executor/spi.c:736
+msgid "cannot open SELECT INTO query as cursor"
msgstr ""
-#: executor/nodeMergejoin.c:1471
+#: executor/nodeMergejoin.c:1479
msgid "RIGHT JOIN is only supported with mergejoinable join conditions"
msgstr ""
-#: executor/nodeMergejoin.c:1486 optimizer/path/joinpath.c:904
+#: executor/nodeMergejoin.c:1496
+#: optimizer/path/joinpath.c:821
msgid "FULL JOIN is only supported with mergejoinable join conditions"
msgstr ""
-#: executor/nodeMergejoin.c:1489
-#, c-format
-msgid "ExecInitMergeJoin: unsupported join type %d"
-msgstr ""
-
-#: executor/nodeNestloop.c:322
-#, c-format
-msgid "ExecInitNestLoop: unsupported join type %d"
-msgstr ""
-
-#: executor/nodeSetOp.c:173
-#, c-format
-msgid "ExecSetOp: bogus command code %d"
-msgstr ""
-
-#: executor/nodeSort.c:52
-msgid "ExtractSortKeys: keycount <= 0"
-msgstr ""
-
-#: executor/nodeSubplan.c:56
-msgid "ExecSubPlan: can't set parent params from subquery"
-msgstr ""
-
-#: executor/nodeSubplan.c:125 executor/nodeSubplan.c:150
-#: executor/nodeSubplan.c:427
-msgid "More than one tuple returned by a subselect used as an expression."
-msgstr ""
-
-#: executor/nodeSubplan.c:193
-msgid "ExecSubPlan: failed to find placeholder for subplan result"
-msgstr ""
-
-#: executor/nodeSubplan.c:400
-msgid "ExecSetParamPlan: ANY/ALL subselect unsupported"
+#: executor/nodeSubplan.c:290
+#: executor/nodeSubplan.c:332
+#: executor/nodeSubplan.c:966
+msgid "more than one tuple returned by a subselect used as an expression"
msgstr ""
-#: executor/nodeSubplan.c:516
-msgid "ExecReScanSetParamPlan: direct correlated subquery unsupported, yet"
-msgstr ""
-
-#: executor/nodeSubplan.c:518
-msgid "ExecReScanSetParamPlan: setParam list is NULL"
-msgstr ""
-
-#: executor/nodeSubplan.c:520
-msgid "ExecReScanSetParamPlan: extParam list of plan is NULL"
-msgstr ""
-
-#: executor/spi.c:70
-msgid "SPI_connect: no connection(s) expected"
-msgstr ""
-
-#: executor/spi.c:76
-msgid "SPI_connect: some connection(s) expected"
-msgstr ""
-
-#: executor/spi.c:82
-msgid "Memory exhausted in SPI_connect"
-msgstr ""
-
-#: executor/spi.c:148
-msgid "Memory exhausted in SPI_finish"
-msgstr ""
-
-#: executor/spi.c:310 executor/spi.c:337 executor/spi.c:366 executor/spi.c:404
-#: executor/spi.c:648 executor/spi.c:1418
-msgid "SPI: stack corrupted"
-msgstr ""
-
-#: executor/spi.c:714
-msgid "cannot open multi-query plan as cursor"
-msgstr ""
-
-#: executor/spi.c:719
-msgid "plan in SPI_cursor_open() is not a SELECT"
-msgstr ""
-
-#: executor/spi.c:721
-msgid "plan in SPI_cursor_open() must NOT be a DECLARE already"
-msgstr ""
-
-#: executor/spi.c:723
-msgid "plan in SPI_cursor_open() must NOT be a SELECT INTO"
-msgstr ""
-
-#: executor/spi.c:754
-#, c-format
-msgid "cursor \"%s\" already in use"
-msgstr ""
-
-#: executor/spi.c:760
+#: libpq/be-fsstubs.c:124
+#: libpq/be-fsstubs.c:162
+#: libpq/be-fsstubs.c:186
+#: libpq/be-fsstubs.c:214
+#: libpq/be-fsstubs.c:271
#, c-format
-msgid "failed to create portal \"%s\""
+msgid "invalid large-object descriptor: %d"
msgstr ""
-#: executor/spi.c:869 executor/spi.c:1324
-msgid "invalid portal in SPI cursor operation"
+#: libpq/be-fsstubs.c:375
+msgid "must be superuser to use server-side lo_import()"
msgstr ""
-#: executor/spi.c:894
-msgid "SPI: improper call to spi_printtup"
+#: libpq/be-fsstubs.c:376
+msgid "Anyone can use the client-side lo_import() provided by libpq."
msgstr ""
-#: executor/spi.c:896
-msgid "SPI: stack corrupted in spi_printtup"
-msgstr ""
-
-#: executor/spi.c:1275
-msgid "SPI_select: retrieve into portal not implemented"
-msgstr ""
-
-#: executor/spi.c:1285
-msgid "SPI_select: # of processed tuples check failed"
-msgstr ""
-
-#: executor/spi.c:1384
-msgid "SPI_fetch: # of processed tuples check failed"
-msgstr ""
-
-#: lib/dllist.c:41
-msgid "Memory exhausted in DLNewList"
-msgstr ""
-
-#: lib/dllist.c:84
-msgid "Memory exhausted in DLNewElem"
-msgstr ""
-
-#: libpq/auth.c:106
-#, c-format
-msgid "pg_krb4_recvauth: kerberos error: %s"
-msgstr ""
-
-#: libpq/auth.c:112
+#: libpq/be-fsstubs.c:391
#, c-format
-msgid "pg_krb4_recvauth: protocol version \"%s\" != \"%s\""
-msgstr ""
+msgid "could not open server file \"%s\": %m"
+msgstr "не получилось отктрыть файл сервера \"%s\": %m"
-#: libpq/auth.c:118
+#: libpq/be-fsstubs.c:412
#, c-format
-msgid "pg_krb4_recvauth: name \"%s\" != \"%s\""
-msgstr ""
+msgid "could not read server file \"%s\": %m"
+msgstr "не получилось считать файл сервера \"%s\": %m"
-#: libpq/auth.c:130
-msgid "pg_krb4_recvauth: Kerberos not implemented on this server"
+#: libpq/be-fsstubs.c:442
+msgid "must be superuser to use server-side lo_export()"
msgstr ""
-#: libpq/auth.c:190
-#, c-format
-msgid "pg_krb5_init: krb5_init_context returned Kerberos error %d"
+#: libpq/be-fsstubs.c:443
+msgid "Anyone can use the client-side lo_export() provided by libpq."
msgstr ""
-#: libpq/auth.c:199
+#: libpq/be-fsstubs.c:469
#, c-format
-msgid "pg_krb5_init: krb5_kt_resolve returned Kerberos error %d"
-msgstr ""
+msgid "could not create server file \"%s\": %m"
+msgstr "не получилось создать файл сервера \"%s\": %m"
-#: libpq/auth.c:211
+#: libpq/be-fsstubs.c:481
#, c-format
-msgid "pg_krb5_init: krb5_sname_to_principal returned Kerberos error %d"
-msgstr ""
+msgid "could not write server file \"%s\": %m"
+msgstr "не получилось записать файл сервера \"%s\": %m"
-#: libpq/auth.c:255
+#: libpq/auth.c:113
#, c-format
-msgid "pg_krb5_recvauth: krb5_recvauth returned Kerberos error %d"
-msgstr ""
+msgid "kerberos error: %s"
+msgstr "ошибка kerberos: %s"
-#: libpq/auth.c:279
+#: libpq/auth.c:119
#, c-format
-msgid "pg_krb5_recvauth: krb5_unparse_name returned Kerberos error %d"
+msgid "kerberos protocol version \"%s\" != \"%s\""
msgstr ""
-#: libpq/auth.c:290
+#: libpq/auth.c:126
+#: libpq/auth.c:306
#, c-format
-msgid "pg_krb5_recvauth: user name \"%s\" != krb5 name \"%s\""
+msgid "kerberos user name \"%s\" != \"%s\""
msgstr ""
-#: libpq/auth.c:309
-msgid "pg_krb5_recvauth: Kerberos not implemented on this server"
+#: libpq/auth.c:140
+msgid "kerberos v4 not implemented on this server"
msgstr ""
-#: libpq/auth.c:374
+#: libpq/auth.c:201
#, c-format
-msgid "%s authentication failed for user \"%s\""
-msgstr ""
-
-#: libpq/auth.c:396
-msgid "Missing or erroneous pg_hba.conf file, see postmaster log for details"
+msgid "kerberos init returned error %d"
msgstr ""
-#: libpq/auth.c:417
+#: libpq/auth.c:211
#, c-format
-msgid "No pg_hba.conf entry for host %s, user %s, database %s"
+msgid "kerberos keytab resolve returned error %d"
msgstr ""
-#: libpq/auth.c:452
+#: libpq/auth.c:224
#, c-format
-msgid "pg_local_sendauth: can't do setsockopt: %m"
+msgid "kerberos sname_to_principal(\"%s\") returned error %d"
msgstr ""
-#: libpq/auth.c:541
+#: libpq/auth.c:269
#, c-format
-msgid "pam_passwd_conv_proc: Error from underlying PAM layer: '%s'"
+msgid "kerberos recvauth returned error %d"
msgstr ""
-#: libpq/auth.c:545
+#: libpq/auth.c:294
#, c-format
-msgid "pam_passwd_conv_proc: Unexpected PAM conversation %d/'%s'"
-msgstr ""
-
-#: libpq/auth.c:575
-msgid "received PAM packet"
+msgid "kerberos unparse_name returned error %d"
msgstr ""
-#: libpq/auth.c:579
-msgid "pam_passwd_conv_proc: no password"
+#: libpq/auth.c:327
+msgid "kerberos v5 not implemented on this server"
msgstr ""
-#: libpq/auth.c:592
-msgid "pam_passwd_conv_proc: Out of memory!"
-msgstr ""
-
-#: libpq/auth.c:636
+#: libpq/auth.c:394
#, c-format
-msgid "CheckPAMAuth: Failed to create PAM authenticator: '%s'"
+msgid "%s authentication failed for user \"%s\""
msgstr ""
-#: libpq/auth.c:646
-#, c-format
-msgid "CheckPAMAuth: pam_set_item(PAM_USER) failed: '%s'"
+#: libpq/auth.c:418
+msgid "missing or erroneous pg_hba.conf file"
msgstr ""
-#: libpq/auth.c:656
-#, c-format
-msgid "CheckPAMAuth: pam_set_item(PAM_CONV) failed: '%s'"
+#: libpq/auth.c:419
+msgid "See postmaster log for details."
msgstr ""
-#: libpq/auth.c:666
+#: libpq/auth.c:445
#, c-format
-msgid "CheckPAMAuth: pam_authenticate failed: '%s'"
+msgid "no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s"
msgstr ""
-#: libpq/auth.c:676
-#, c-format
-msgid "CheckPAMAuth: pam_acct_mgmt failed: '%s'"
-msgstr ""
+#: libpq/auth.c:447
+msgid "SSL on"
+msgstr "SSL вкл."
-#: libpq/auth.c:686
-#, c-format
-msgid "CheckPAMAuth: Failed to release PAM authenticator: '%s'"
-msgstr ""
+#: libpq/auth.c:447
+msgid "SSL off"
+msgstr "SSL выкл."
-#: libpq/auth.c:726
+#: libpq/auth.c:451
#, c-format
-msgid "unexpected password packet size: read %d, expected %d"
+msgid "no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\""
msgstr ""
-#: libpq/auth.c:730
-msgid "received password packet"
+#: libpq/auth.c:463
+msgid "kerberos 4 only supports IPv4 connections"
msgstr ""
-#: libpq/be-fsstubs.c:84
+#: libpq/auth.c:495
#, c-format
-msgid "lo_open(%u,%d)"
+msgid "failed to enable credential receipt: %m"
msgstr ""
-#: libpq/be-fsstubs.c:102
+#: libpq/auth.c:582
#, c-format
-msgid "cannot open large object %u"
+msgid "error from underlying PAM layer: %s"
msgstr ""
-#: libpq/be-fsstubs.c:122
+#: libpq/auth.c:587
#, c-format
-msgid "lo_close: invalid large obj descriptor (%d)"
+msgid "unsupported PAM conversation %d/%s"
msgstr ""
-#: libpq/be-fsstubs.c:126
-#, c-format
-msgid "lo_close(%d)"
+#: libpq/auth.c:619
+msgid "empty password returned by client"
msgstr ""
-#: libpq/be-fsstubs.c:158
+#: libpq/auth.c:679
#, c-format
-msgid "lo_read: invalid large obj descriptor (%d)"
+msgid "Failed to create PAM authenticator: %s"
msgstr ""
-#: libpq/be-fsstubs.c:180
+#: libpq/auth.c:690
#, c-format
-msgid "lo_write: invalid large obj descriptor (%d)"
+msgid "pam_set_item(PAM_USER) failed: %s"
msgstr ""
-#: libpq/be-fsstubs.c:206
+#: libpq/auth.c:701
#, c-format
-msgid "lo_lseek: invalid large obj descriptor (%d)"
+msgid "pam_set_item(PAM_CONV) failed: %s"
msgstr ""
-#: libpq/be-fsstubs.c:261
+#: libpq/auth.c:712
#, c-format
-msgid "lo_tell: invalid large object descriptor (%d)"
-msgstr ""
-
-#: libpq/be-fsstubs.c:363
-msgid ""
-"You must have Postgres superuser privilege to use server-side lo_import().\n"
-"\tAnyone can use the client-side lo_import() provided by libpq."
+msgid "pam_authenticate failed: %s"
msgstr ""
-#: libpq/be-fsstubs.c:378
+#: libpq/auth.c:723
#, c-format
-msgid "lo_import: can't open unix file \"%s\": %m"
+msgid "pam_acct_mgmt failed: %s"
msgstr ""
-#: libpq/be-fsstubs.c:386
+#: libpq/auth.c:734
#, c-format
-msgid "lo_import: can't create inv object for \"%s\""
+msgid "failed to release PAM authenticator: %s"
msgstr ""
-#: libpq/be-fsstubs.c:397
+#: libpq/auth.c:772
#, c-format
-msgid "lo_import: error while reading \"%s\""
+msgid "expected password response, got msg type %d"
msgstr ""
-#: libpq/be-fsstubs.c:426
-msgid ""
-"You must have Postgres superuser privilege to use server-side lo_export().\n"
-"\tAnyone can use the client-side lo_export() provided by libpq."
-msgstr ""
-
-#: libpq/be-fsstubs.c:436
-#, c-format
-msgid "lo_export: can't open inv object %u"
+#: libpq/auth.c:800
+msgid "invalid password packet size"
msgstr ""
-#: libpq/be-fsstubs.c:454
-#, c-format
-msgid "lo_export: can't open unix file \"%s\": %m"
+#: libpq/auth.c:804
+msgid "received password packet"
msgstr ""
-#: libpq/be-fsstubs.c:464
+#: libpq/be-secure.c:274
+#: libpq/be-secure.c:358
#, c-format
-msgid "lo_export: error while writing \"%s\""
+msgid "SSL SYSCALL error: %m"
msgstr ""
-#: libpq/be-secure.c:292 libpq/be-secure.c:342
-#, c-format
-msgid "SSL SYSCALL error: %s"
+#: libpq/be-secure.c:279
+#: libpq/be-secure.c:363
+msgid "SSL SYSCALL error: EOF detected"
msgstr ""
-#: libpq/be-secure.c:295 libpq/be-secure.c:345
+#: libpq/be-secure.c:287
+#: libpq/be-secure.c:371
#, c-format
msgid "SSL error: %s"
-msgstr ""
-
-#: libpq/be-secure.c:397
-#, c-format
-msgid "DH errors (%s): %d bits expected, %d bits found"
-msgstr ""
-
-#: libpq/be-secure.c:407
-#, c-format
-msgid "DH_check error (%s): %s"
-msgstr ""
+msgstr "Ошибка SSL: %s"
-#: libpq/be-secure.c:412
-#, c-format
-msgid "DH error (%s): p is not prime"
-msgstr ""
-
-#: libpq/be-secure.c:419
-#, c-format
-msgid "DH error (%s): neither suitable generator or safe prime"
-msgstr ""
-
-#: libpq/be-secure.c:445
-#, c-format
-msgid "DH load buffer: %s"
-msgstr ""
-
-#: libpq/be-secure.c:517
-#, c-format
-msgid "DH: generating parameters (%d bits)...."
-msgstr ""
-
-#: libpq/be-secure.c:551
-msgid "SSL: handshake start"
-msgstr ""
-
-#: libpq/be-secure.c:554
-msgid "SSL: handshake done"
+#: libpq/be-secure.c:296
+#: libpq/be-secure.c:380
+msgid "unrecognized SSL error code"
msgstr ""
-#: libpq/be-secure.c:557
-msgid "SSL: accept loop"
+#: libpq/be-secure.c:326
+#: libpq/be-secure.c:330
+#: libpq/be-secure.c:340
+msgid "SSL renegotiation failure"
msgstr ""
-#: libpq/be-secure.c:560
-#, c-format
-msgid "SSL: accept exit (%d)"
-msgstr ""
-
-#: libpq/be-secure.c:563
-msgid "SSL: connect loop"
-msgstr ""
-
-#: libpq/be-secure.c:566
-#, c-format
-msgid "SSL: connect exit (%d)"
-msgstr ""
-
-#: libpq/be-secure.c:569
-#, c-format
-msgid "SSL: read alert (0x%04x)"
+#: libpq/be-secure.c:334
+msgid "SSL failed to send renegotiation request"
msgstr ""
-#: libpq/be-secure.c:572
-#, c-format
-msgid "SSL: write alert (0x%04x)"
-msgstr ""
-
-#: libpq/be-secure.c:593
+#: libpq/be-secure.c:632
#, c-format
-msgid "failed to create SSL context: %s"
+msgid "could not create SSL context: %s"
msgstr "не удалось создать контекст SSL: %s"
-#: libpq/be-secure.c:604
-#, c-format
-msgid "failed to load server certificate (%s): %s"
-msgstr "не удалось загрузить сертификат сервера (%s): %s"
-
-#: libpq/be-secure.c:612
-#, c-format
-msgid "failed to stat private key file (%s): %s"
-msgstr ""
-
-#: libpq/be-secure.c:619
-#, c-format
-msgid ""
-"bad permissions on private key file (%s)\n"
-"File must be owned by the proper user and must have no permissions for\n"
-"\"group\" or \"other\"."
-msgstr ""
-
-#: libpq/be-secure.c:626
+#: libpq/be-secure.c:642
#, c-format
-msgid "failed to load private key file (%s): %s"
-msgstr ""
-
-#: libpq/be-secure.c:632
-#, c-format
-msgid "check of private key failed: %s"
-msgstr ""
+msgid "could not load server certificate file \"%s\": %s"
+msgstr "не удалось загрузить сертификат сервера \"%s\": %s"
#: libpq/be-secure.c:649
#, c-format
-msgid "could not read root cert file (%s): %s"
-msgstr "не получилось файл корневого сертификата (%s): %s"
-
-#: libpq/be-secure.c:683
-#, c-format
-msgid "failed to initialize SSL connection: %s"
-msgstr "не удалось инициализировать SSL-подсоединение: %s"
-
-#: libpq/be-secure.c:705
-#, c-format
-msgid "secure connection from '%s'"
-msgstr ""
-
-#: libpq/crypt.c:61
-msgid "Password is stored MD5 encrypted. 'crypt' auth method cannot be used."
-msgstr ""
-"Пароль зашифрован и сохранён как MD5. Методы аутентификации "
-"'crypt' не может использоваться."
-
-#: libpq/hba.c:127
-#, c-format
-msgid "Token too long in authentication file, skipping, %s"
-msgstr ""
-
-#: libpq/hba.c:260
-#, c-format
-msgid ""
-"tokenize_inc_file: Unable to open secondary authentication file \"@%s\" as "
-"\"%s\": %m"
-msgstr ""
-
-#: libpq/hba.c:663
-#, c-format
-msgid "parse_hba: invalid syntax in pg_hba.conf file at line %d, token \"%s\""
-msgstr ""
-
-#: libpq/hba.c:716 libpq/hba.c:738
-#, c-format
-msgid "could not open %s: %m"
-msgstr "не получилось отктрыть %s: %m"
-
-#: libpq/hba.c:849
-#, c-format
-msgid "load_hba: Unable to open authentication config file \"%s\": %m"
+msgid "could not access private key file \"%s\": %m"
msgstr ""
-#: libpq/hba.c:909
+#: libpq/be-secure.c:655
#, c-format
-msgid ""
-"parse_ident_usermap: invalid syntax in pg_ident.conf file at line %d, token "
-"\"%s\""
+msgid "unsafe permissions on private key file \"%s\""
msgstr ""
-#: libpq/hba.c:941
-msgid ""
-"check_ident_usermap: hba configuration file does not have the usermap field "
-"filled in in the entry that pertains to this connection. That field is "
-"essential for Ident-based authentication."
+#: libpq/be-secure.c:657
+msgid "File must be owned by the database user and must have no permissions for \"group\" or \"other\"."
msgstr ""
-#: libpq/hba.c:991
+#: libpq/be-secure.c:661
#, c-format
-msgid "load_ident: Unable to open usermap file \"%s\": %m"
+msgid "could not load private key file \"%s\": %s"
msgstr ""
-#: libpq/hba.c:1113
+#: libpq/be-secure.c:666
#, c-format
-msgid "Failed to create socket on which to talk to Ident server: %m"
-msgstr ""
-
-#: libpq/hba.c:1149
-#, c-format
-msgid ""
-"Unable to connect to Ident server on the host which is trying to connect to "
-"Postgres (IP address %s, Port %d): %s"
+msgid "check of private key failed: %s"
msgstr ""
-#: libpq/hba.c:1172
+#: libpq/be-secure.c:684
#, c-format
-msgid ""
-"Unable to send query to Ident server on the host which is trying to connect "
-"to Postgres (Host %s, Port %d), even though we successfully connected to it: "
-"%s"
-msgstr ""
+msgid "could not load root cert file \"%s\": %s"
+msgstr "не получилось загрузить файл корневого сертификата \"%s\": %s"
-#: libpq/hba.c:1189
-#, c-format
-msgid ""
-"Unable to receive response from Ident server on the host which is trying to "
-"connect to Postgres (Host %s, Port %d), even though we successfully sent our "
-"query to it: %s"
+#: libpq/be-secure.c:686
+msgid "Will not verify client certificates."
msgstr ""
-#: libpq/hba.c:1230 libpq/hba.c:1258 libpq/hba.c:1323
+#: libpq/be-secure.c:721
#, c-format
-msgid "ident_unix: error receiving credentials: %m"
-msgstr ""
+msgid "could not initialize SSL connection: %s"
+msgstr "не удалось инициализировать SSL-подсоединение: %s"
-#: libpq/hba.c:1238 libpq/hba.c:1266 libpq/hba.c:1332
+#: libpq/be-secure.c:745
#, c-format
-msgid "ident_unix: unknown local user with uid %d"
+msgid "secure connection from \"%s\""
msgstr ""
-#: libpq/hba.c:1342
-msgid "'ident' auth is not supported on local connections on this platform"
+#: libpq/crypt.c:62
+msgid "cannot use CRYPT auth method because password is MD5-encrypted"
msgstr ""
-#: libpq/pqcomm.c:196
+#: libpq/hba.c:129
#, c-format
-msgid "StreamServerPort: socket() failed: %m"
+msgid "authentication file token too long, skipping: \"%s\""
msgstr ""
-#: libpq/pqcomm.c:205
+#: libpq/hba.c:265
#, c-format
-msgid "StreamServerPort: setsockopt(SO_REUSEADDR) failed: %m"
+msgid "could not open secondary authentication file \"@%s\" as \"%s\": %m"
msgstr ""
-#: libpq/pqcomm.c:246
+#: libpq/hba.c:666
#, c-format
-msgid "StreamServerPort: gethostbyname(%s) failed"
+msgid "could not interpret IP address \"%s\" in config file: %s"
msgstr ""
-#: libpq/pqcomm.c:262
+#: libpq/hba.c:742
#, c-format
-msgid ""
-"StreamServerPort: bind() failed: %m\n"
-"\tIs another postmaster already running on port %d?\n"
-"\tIf not, remove socket node (%s) and retry."
+msgid "invalid entry in pg_hba.conf file at line %d, token \"%s\""
msgstr ""
-#: libpq/pqcomm.c:267
-#, c-format
-msgid ""
-"StreamServerPort: bind() failed: %m\n"
-"\tIs another postmaster already running on port %d?\n"
-"\tIf not, wait a few seconds and retry."
-msgstr ""
-
-#: libpq/pqcomm.c:306
-#, c-format
-msgid "No such group as '%s'"
-msgstr "Группы '%s' нету"
-
-#: libpq/pqcomm.c:314
-#, c-format
-msgid "Could not set group of %s: %m"
-msgstr "Не получилось установить группу %s: %m"
-
-#: libpq/pqcomm.c:322
+#: libpq/hba.c:747
#, c-format
-msgid "Could not set permissions on %s: %m"
+msgid "missing field in pg_hba.conf file at end of line %d"
msgstr ""
-#: libpq/pqcomm.c:341
-#, c-format
-msgid "StreamServerPort: listen() failed: %m"
-msgstr "StreamServerPort: listen() не удался: %m"
-
-#: libpq/pqcomm.c:371
-#, c-format
-msgid "StreamConnection: accept() failed: %m"
-msgstr "StreamConnection: accept() не удался: %m"
-
-#: libpq/pqcomm.c:390
-#, c-format
-msgid "StreamConnection: getsockname() failed: %m"
-msgstr "StreamConnection: getsockname() не удался: %m"
-
-#: libpq/pqcomm.c:402
+#: libpq/hba.c:806
+#: libpq/hba.c:830
+#: storage/smgr/smgr.c:278
+#: utils/init/miscinit.c:775
#, c-format
-msgid "StreamConnection: setsockopt(TCP_NODELAY) failed: %m"
-msgstr "StreamConnection: setsockopt(TCP_NODELAY) не удался: %m"
+msgid "could not open \"%s\": %m"
+msgstr "не получилось отктрыть \"%s\": %m"
-#: libpq/pqcomm.c:408
+#: libpq/hba.c:949
#, c-format
-msgid "StreamConnection: setsockopt(SO_KEEPALIVE) failed: %m"
-msgstr "StreamConnection: setsockopt(SO_KEEPALIVE) не удался: %m"
-
-#: libpq/pqcomm.c:476
-#, c-format
-msgid "pq_recvbuf: recv() failed: %m"
-msgstr ""
-
-#: libpq/pqcomm.c:482
-msgid "pq_recvbuf: unexpected EOF on client connection"
-msgstr ""
+msgid "could not open config file \"%s\": %m"
+msgstr "не получилось отктрыть файл конфигурации \"%s\": %m"
-#: libpq/pqcomm.c:680
+#: libpq/hba.c:1011
#, c-format
-msgid "pq_flush: send() failed: %m"
+msgid "invalid entry in pg_ident.conf file at line %d, token \"%s\""
msgstr ""
-#: libpq/pqcomm.c:714
+#: libpq/hba.c:1016
#, c-format
-msgid "pq_eof: recv() failed: %m"
+msgid "missing entry in pg_ident.conf file at end of line %d"
msgstr ""
-#: libpq/pqformat.c:159
-#, c-format
-msgid "pq_sendint: unsupported size %d"
+#: libpq/hba.c:1048
+msgid "cannot use IDENT authentication without usermap field"
msgstr ""
-#: libpq/pqformat.c:241
+#: libpq/hba.c:1096
#, c-format
-msgid "pq_getint: unsupported size %d"
+msgid "could not open usermap file \"%s\": %m"
msgstr ""
-#: main/main.c:83
+#: libpq/hba.c:1267
#, c-format
-msgid "%s: setsysinfo failed: %s\n"
-msgstr ""
-
-#: main/main.c:172
-msgid ""
-"\"root\" execution of the PostgreSQL server is not permitted.\n"
-"\n"
-"The server must be started under an unprivileged user id to prevent\n"
-"a possible system security compromise. See the documentation for\n"
-"more information on how to properly start the server.\n"
-"\n"
+msgid "could not create socket for IDENT connection: %m"
msgstr ""
-#: main/main.c:192
+#: libpq/hba.c:1283
#, c-format
-msgid "%s: real and effective user ids must match\n"
+msgid "could not bind to local address \"%s\": %m"
msgstr ""
-#: main/main.c:227
+#: libpq/hba.c:1295
#, c-format
-msgid "%s: invalid current euid %d\n"
+msgid "could not connect to IDENT server at address \"%s\", port %s): %m"
msgstr ""
-#: nodes/copyfuncs.c:1218
+#: libpq/hba.c:1315
#, c-format
-msgid "_copyAConst: unknown node type %d"
+msgid "could not send query to IDENT server at address \"%s\", port %s): %m"
msgstr ""
-#: nodes/copyfuncs.c:2304
+#: libpq/hba.c:1330
#, c-format
-msgid "_copyValue: unknown node type %d"
+msgid "could not receive response from IDENT server at address \"%s\", port %s): %m"
msgstr ""
-#: nodes/copyfuncs.c:2796
+#: libpq/hba.c:1371
+#: libpq/hba.c:1402
+#: libpq/hba.c:1470
#, c-format
-msgid "copyObject: don't know how to copy node type %d"
+msgid "could not receive credentials: %m"
msgstr ""
-#: nodes/equalfuncs.c:178
+#: libpq/hba.c:1380
+#: libpq/hba.c:1411
+#: libpq/hba.c:1481
#, c-format
-msgid "_equalParam: Invalid paramkind value: %d"
+msgid "local user with uid %d is not known to getpwuid"
msgstr ""
-#: nodes/equalfuncs.c:1490
-#, c-format
-msgid "_equalValue: unknown node type %d"
+#: libpq/hba.c:1493
+msgid "IDENT auth is not supported on local connections on this platform"
msgstr ""
-#: nodes/equalfuncs.c:1931
+#: libpq/pqcomm.c:248
#, c-format
-msgid "equal: don't know whether nodes of type %d are equal"
-msgstr ""
-
-#: nodes/list.c:162
-msgid "tryout to nconc a list to itself"
+msgid "could not translate hostname \"%s\", service \"%s\" to address: %s"
msgstr ""
-#: nodes/list.c:245
-msgid "llast: empty list"
-msgstr "llast: пустой список"
-
-#: nodes/list.c:260
-msgid "llasti: empty list"
-msgstr "llasti: пустой список"
-
-#: nodes/outfuncs.c:1191 nodes/readfuncs.c:821
+#: libpq/pqcomm.c:252
#, c-format
-msgid "bogus rte kind %d"
+msgid "could not translate service \"%s\" to address: %s"
msgstr ""
-#: nodes/outfuncs.c:1257
-#, c-format
-msgid "_outValue: don't know how to print type %d"
-msgstr "_outValue: не известно как печатать тип %d"
-
-#: nodes/outfuncs.c:1644
-#, c-format
-msgid "_outNode: don't know how to print type %d"
-msgstr "_outNode: не известно как печатать тип %d"
-
-#: nodes/print.c:85
-#, c-format
-msgid ""
-"%s:\n"
-"%s"
-msgstr ""
-"%s:\n"
-"%s"
+#: libpq/pqcomm.c:285
+msgid "IPv4"
+msgstr "IPv4"
-#: nodes/print.c:353
-#, c-format
-msgid "Cache lookup for type %u failed"
-msgstr "Поиск в кзше типа %u не удался"
+#: libpq/pqcomm.c:289
+msgid "IPv6"
+msgstr "IPv6"
-#: nodes/read.c:296
-msgid "nodeRead: did not find '}' at end of node"
-msgstr "nodeRead: скобка '}' не была обнаружена в конце узла"
+#: libpq/pqcomm.c:294
+msgid "Unix"
+msgstr "Unix"
-#: nodes/read.c:376
+#: libpq/pqcomm.c:299
#, c-format
-msgid "nodeRead: Bad type %d"
-msgstr ""
-
-#: nodes/readfuncs.c:149
-msgid "toIntList: unexpected datatype"
-msgstr ""
-
-#: nodes/readfuncs.c:183
-msgid "toOidList: unexpected datatype"
+msgid "unrecognized address family %d"
msgstr ""
-#: nodes/readfuncs.c:518
+#. translator: %s is IPv4, IPv6, or Unix
+#: libpq/pqcomm.c:310
#, c-format
-msgid "_readBoolExpr: unknown boolop \"%.*s\""
-msgstr ""
+msgid "could not create %s socket: %m"
+msgstr "не получилось создать сокет %s: %m"
-#: nodes/readfuncs.c:926
+#: libpq/pqcomm.c:322
#, c-format
-msgid "badly formatted node string \"%.32s\"..."
-msgstr ""
+msgid "setsockopt(SO_REUSEADDR) failed: %m"
+msgstr "setsockopt(SO_REUSEADDR) не удался: %m"
-#: nodes/readfuncs.c:959 nodes/readfuncs.c:991
+#: libpq/pqcomm.c:336
#, c-format
-msgid "readDatum: expected '%s', got '%s'; length = %lu"
-msgstr ""
+msgid "setsockopt(IPV6_V6ONLY) failed: %m"
+msgstr "setsockopt(IPV6_V6ONLY) не удался: %m"
-#: nodes/readfuncs.c:966
+#. translator: %s is IPv4, IPv6, or Unix
+#: libpq/pqcomm.c:355
#, c-format
-msgid "readDatum: byval & length = %lu"
-msgstr ""
-
-#: optimizer/geqo/geqo_erx.c:336
-msgid "gimme_gene: Internal error - minimum_count not set"
-msgstr ""
-
-#: optimizer/geqo/geqo_erx.c:362
-msgid "gimme_gene: neither shared nor minimum number nor random edge found"
-msgstr ""
-
-#: optimizer/geqo/geqo_erx.c:422
-msgid "edge_failure(1): no edge found via random decision and total_edges == 4"
-msgstr ""
-
-#: optimizer/geqo/geqo_erx.c:447
-msgid "edge_failure(2): no edge found via random decision and remainig edges"
-msgstr ""
-
-#: optimizer/geqo/geqo_erx.c:465
-msgid "edge_failure(3): no edge found via looking for the last ununsed point"
-msgstr ""
-
-#: optimizer/geqo/geqo_erx.c:470
-msgid "edge_failure: no edge detected"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:123
-msgid "geqo_main: using edge recombination crossover [ERX]"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:127
-msgid "geqo_main: using partially matched crossover [PMX]"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:131
-msgid "geqo_main: using cycle crossover [CX]"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:136
-msgid "geqo_main: using position crossover [PX]"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:141
-msgid "geqo_main: using order crossover [OX1]"
+msgid "could not bind %s socket: %m"
msgstr ""
-#: optimizer/geqo/geqo_main.c:146
-msgid "geqo_main: using order crossover [OX2]"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:211
+#: libpq/pqcomm.c:358
#, c-format
-msgid "[GEQO] failures: %d, average: %d"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:214
-msgid "[GEQO] No edge failures detected."
+msgid "Is another postmaster already running on port %d? If not, remove socket node \"%s\" and retry."
msgstr ""
-#: optimizer/geqo/geqo_main.c:220
+#: libpq/pqcomm.c:361
#, c-format
-msgid "[GEQO] mutations: %d, generations: %d"
-msgstr ""
-
-#: optimizer/geqo/geqo_main.c:222
-msgid "[GEQO] No mutations processed."
-msgstr ""
-
-#: optimizer/geqo/geqo_misc.c:41
-msgid "avg_pool: pool_size of zero"
-msgstr ""
-
-#: optimizer/path/allpaths.c:204
-msgid "SELECT FOR UPDATE is not supported for inherit queries"
+msgid "Is another postmaster already running on port %d? If not, wait a few seconds and retry."
msgstr ""
-#: optimizer/path/allpaths.c:616
+#. translator: %s is IPv4, IPv6, or Unix
+#: libpq/pqcomm.c:395
#, c-format
-msgid "recurse_pushdown_safe: unexpected node %d"
-msgstr "recurse_pushdown_safe: неожиданный узел %d"
-
-#: optimizer/path/allpaths.c:684
-#, c-format
-msgid "recurse_push_qual: unexpected node %d"
-msgstr "recurse_push_qual: неожиданный узел %d"
-
-#: optimizer/path/clausesel.c:533
-#, c-format
-msgid "clause_selectivity: s1 %f"
-msgstr "clause_selectivity: s1 %f"
-
-#: optimizer/path/costsize.c:1461
-#, c-format
-msgid "set_joinrel_size_estimates: unsupported join type %d"
-msgstr ""
-
-#: optimizer/path/indxpath.c:495
-msgid "extract_or_indexqual_conditions: no matching clause"
-msgstr ""
-
-#: optimizer/path/indxpath.c:1260
-msgid "pred_test_simple_clause: unknown test_op"
+msgid "could not listen on %s socket: %m"
msgstr ""
-#: optimizer/path/indxpath.c:1301
-msgid "pred_test_simple_clause: null test result"
-msgstr ""
-
-#: optimizer/path/indxpath.c:2084
+#: libpq/pqcomm.c:485
#, c-format
-msgid "prefix_quals: unexpected operator %u"
-msgstr ""
+msgid "could not set group of \"%s\": %m"
+msgstr "не получилось установить группу \"%s\": %m"
-#: optimizer/path/indxpath.c:2100
+#: libpq/pqcomm.c:496
#, c-format
-msgid "prefix_quals: no = operator for type %u"
-msgstr ""
+msgid "could not set permissions of \"%s\": %m"
+msgstr "не получилось установить права доступа для \"%s\": %m"
-#: optimizer/path/indxpath.c:2115
+#: libpq/pqcomm.c:526
#, c-format
-msgid "prefix_quals: no >= operator for type %u"
+msgid "could not accept new connection: %m"
msgstr ""
-#: optimizer/path/indxpath.c:2131
+#: libpq/pqcomm.c:678
#, c-format
-msgid "prefix_quals: no < operator for type %u"
+msgid "could not receive data from client: %m"
msgstr ""
-#: optimizer/path/indxpath.c:2177
-#, c-format
-msgid "network_prefix_quals: unexpected operator %u"
+#: libpq/pqcomm.c:841
+msgid "unexpected EOF within message length word"
msgstr ""
-#: optimizer/path/indxpath.c:2190
-#, c-format
-msgid "network_prefix_quals: no %s operator for type %u"
+#: libpq/pqcomm.c:853
+msgid "invalid message length"
msgstr ""
-#: optimizer/path/indxpath.c:2205
-#, c-format
-msgid "network_prefix_quals: no <= operator for type %u"
+#: libpq/pqcomm.c:867
+msgid "incomplete message from client"
msgstr ""
-#: optimizer/path/joinpath.c:170
+#: libpq/pqcomm.c:946
#, c-format
-msgid "sort_inner_and_outer: unexpected join type %d"
+msgid "could not send data to client: %m"
msgstr ""
-#: optimizer/path/joinpath.c:343
-#, c-format
-msgid "match_unsorted_outer: unexpected join type %d"
+#: libpq/pqformat.c:443
+msgid "no data left in message"
msgstr ""
-#: optimizer/path/joinpath.c:626
-#, c-format
-msgid "match_unsorted_inner: unexpected join type %d"
+#: libpq/pqformat.c:591
+#: libpq/pqformat.c:609
+#: libpq/pqformat.c:630
+#: utils/adt/arrayfuncs.c:1023
+msgid "insufficient data left in message"
msgstr ""
-#: optimizer/path/joinrels.c:230
-#, c-format
-msgid "make_rels_by_joins: failed to build any %d-way joins"
+#: libpq/pqformat.c:671
+msgid "invalid string in message"
msgstr ""
-#: optimizer/path/joinrels.c:385
-#, c-format
-msgid "make_jointree_rel: unexpected node type %d"
+#: libpq/pqformat.c:687
+msgid "invalid message format"
msgstr ""
-#: optimizer/path/joinrels.c:442
+#: main/main.c:84
#, c-format
-msgid "make_join_rel: unsupported join type %d"
+msgid "%s: setsysinfo failed: %s\n"
msgstr ""
-#: optimizer/path/pathkeys.c:878
+#: main/main.c:176
msgid ""
-"make_pathkeys_for_mergeclauses: can't identify which side of mergeclause to "
-"use"
+"\"root\" execution of the PostgreSQL server is not permitted.\n"
+"The server must be started under an unprivileged user id to prevent\n"
+"possible system security compromise. See the documentation for\n"
+"more information on how to properly start the server.\n"
msgstr ""
-#: optimizer/plan/createplan.c:150
+#: main/main.c:197
#, c-format
-msgid "create_plan: unknown pathtype %d"
+msgid "%s: real and effective user ids must match\n"
msgstr ""
-#: optimizer/plan/createplan.c:228
+#: main/main.c:242
#, c-format
-msgid "create_scan_plan: unknown node type: %d"
+msgid "%s: invalid effective uid: %d\n"
msgstr ""
-#: optimizer/plan/createplan.c:310
+#: main/main.c:255
#, c-format
-msgid "create_join_plan: unknown node type: %d"
-msgstr ""
-
-#: optimizer/plan/createplan.c:1050
-msgid "fix_indxqual_sublist: indexqual clause is not binary opclause"
+msgid "%s: GetUserName failed\n"
msgstr ""
-#: optimizer/plan/createplan.c:1139
-msgid "fix_indxqual_operand: var is not index attribute"
-msgstr ""
-
-#: optimizer/plan/createplan.c:1601
-msgid "make_sort_from_pathkeys: cannot find tlist item to sort"
+#: optimizer/path/allpaths.c:214
+msgid "SELECT FOR UPDATE is not supported for inherit queries"
msgstr ""
-#: optimizer/plan/initsplan.c:124
+#: optimizer/plan/initsplan.c:101
msgid "SELECT FOR UPDATE cannot be applied to a join"
msgstr ""
-#: optimizer/plan/initsplan.c:127
-#, c-format
-msgid "add_base_rels_to_query: unexpected node type %d"
-msgstr "add_base_rels_to_query: неожиданный тип узла %d"
-
-#: optimizer/plan/initsplan.c:307 optimizer/plan/planner.c:501
+#: optimizer/plan/initsplan.c:290
+#: optimizer/prep/prepjointree.c:340
msgid "UNION JOIN is not implemented yet"
msgstr ""
-#: optimizer/plan/initsplan.c:311
-#, c-format
-msgid "distribute_quals_to_rels: unsupported join type %d"
-msgstr ""
-
-#: optimizer/plan/initsplan.c:321
-#, c-format
-msgid "distribute_quals_to_rels: unexpected node type %d"
-msgstr ""
-
-#: optimizer/plan/initsplan.c:358
-msgid ""
-"SELECT FOR UPDATE cannot be applied to the nullable side of an OUTER JOIN"
-msgstr ""
-
-#: optimizer/plan/initsplan.c:452
-msgid "JOIN qualification may not refer to other relations"
-msgstr ""
-
-#: optimizer/plan/initsplan.c:608
-msgid "distribute_qual_to_rels: can't cope with variable-free clause"
-msgstr ""
-
-#: optimizer/plan/initsplan.c:750
-#, c-format
-msgid "Unable to identify an equality operator for types '%s' and '%s'"
-msgstr ""
-
-#: optimizer/plan/initsplan.c:761
-#, c-format
-msgid ""
-"Equality operator for types '%s' and '%s' should be mergejoinable, but isn't"
-msgstr ""
-
-#: optimizer/plan/planmain.c:158
-msgid "query_planner: failed to construct a relation"
-msgstr ""
-
-#: optimizer/plan/planner.c:504
-#, c-format
-msgid "pull_up_subqueries: unexpected join type %d"
-msgstr ""
-
-#: optimizer/plan/planner.c:510
-#, c-format
-msgid "pull_up_subqueries: unexpected node type %d"
-msgstr ""
-
-#: optimizer/plan/planner.c:531
-msgid "is_simple_subquery: subquery is bogus"
+#: optimizer/plan/initsplan.c:347
+msgid "SELECT FOR UPDATE cannot be applied to the nullable side of an OUTER JOIN"
msgstr ""
-#: optimizer/plan/planner.c:660
+#: optimizer/plan/initsplan.c:763
#, c-format
-msgid "resolvenew_in_jointree: unexpected node type %d"
+msgid "could not identify an equality operator for types %s and %s"
msgstr ""
-#: optimizer/plan/planner.c:739
+#: optimizer/plan/initsplan.c:776
#, c-format
-msgid "preprocess_jointree: unexpected node type %d"
+msgid "equality operator for types %s and %s should be mergejoinable, but isn't"
msgstr ""
-#: optimizer/plan/planner.c:832
-#, c-format
-msgid "preprocess_qual_conditions: unexpected node type %d"
-msgstr ""
-
-#: optimizer/plan/planner.c:945 parser/analyze.c:1780 parser/analyze.c:1953
-#: parser/analyze.c:2448
+#: optimizer/plan/planner.c:591
+#: parser/analyze.c:2088
+#: parser/analyze.c:2252
+#: parser/analyze.c:2807
msgid "SELECT FOR UPDATE is not allowed with UNION/INTERSECT/EXCEPT"
msgstr ""
-#: optimizer/plan/planner.c:1007
+#: optimizer/plan/planner.c:657
msgid "SELECT FOR UPDATE is not allowed in subselects"
msgstr ""
-#: optimizer/plan/planner.c:1849 optimizer/plan/planner.c:1855
-msgid "postprocess_setop_tlist: resjunk output columns not implemented"
-msgstr ""
-
-#: optimizer/plan/setrefs.c:210
+#: optimizer/util/clauses.c:2037
#, c-format
-msgid "set_plan_references: unknown plan type %d"
+msgid "SQL function \"%s\" during inlining"
msgstr ""
-#: optimizer/plan/setrefs.c:472
-msgid "join_references: variable not in subplan target lists"
-msgstr ""
-
-#: optimizer/plan/setrefs.c:532
-msgid "replace_vars_with_subplan_refs: variable not in subplan target list"
-msgstr ""
-
-#: optimizer/plan/subselect.c:445
+#: parser/parse_clause.c:336
#, c-format
-msgid "cache lookup failed for operator %u"
+msgid "JOIN/ON clause refers to \"%s\", which is not part of JOIN"
msgstr ""
-#: optimizer/plan/subselect.c:660
-#, c-format
-msgid "SS_finalize_plan: node %d unsupported"
+#: parser/parse_clause.c:396
+msgid "sub-select in FROM must have an alias"
msgstr ""
-#: optimizer/plan/subselect.c:683
-msgid "SS_finalize_plan: plan shouldn't reference subplan's variable"
+#: parser/parse_clause.c:419
+msgid "sub-select in FROM may not have SELECT INTO"
msgstr ""
-#: optimizer/prep/preptlist.c:58
-msgid "preprocess_targetlist: subquery cannot be result relation"
+#: parser/parse_clause.c:441
+msgid "sub-select in FROM may not refer to other relations of same query level"
msgstr ""
-#: optimizer/prep/preptlist.c:208
-msgid "expand_targetlist: unexpected command_type"
+#: parser/parse_clause.c:496
+msgid "function expression in FROM may not refer to other relations of same query level"
msgstr ""
-#: optimizer/prep/preptlist.c:238
-msgid "expand_targetlist: targetlist is not sorted correctly"
+#: parser/parse_clause.c:508
+msgid "cannot use aggregate function in function expression in FROM"
msgstr ""
-#: optimizer/prep/prepunion.c:193
+#: parser/parse_clause.c:728
#, c-format
-msgid "recurse_set_operations: unexpected node %d"
-msgstr ""
-
-#: optimizer/prep/prepunion.c:309
-msgid "generate_nonunion_plan: bogus operation code"
+msgid "USING column name \"%s\" appears more than once"
msgstr ""
-#: optimizer/util/clauses.c:700
+#: parser/parse_clause.c:743
#, c-format
-msgid "Sub-SELECT uses un-GROUPed attribute %s.%s from outer query"
+msgid "common column name \"%s\" appears more than once in left table"
msgstr ""
-#: optimizer/util/clauses.c:1123
-msgid "CommuteClause: applied to non-binary-operator clause"
-msgstr ""
-
-#: optimizer/util/clauses.c:1128
+#: parser/parse_clause.c:752
#, c-format
-msgid "CommuteClause: no commutator for operator %u"
+msgid "JOIN/USING column \"%s\" not found in left table"
msgstr ""
-#: optimizer/util/clauses.c:1481
+#: parser/parse_clause.c:766
#, c-format
-msgid "eval_const_expressions: unexpected boolop %d"
+msgid "common column name \"%s\" appears more than once in right table"
msgstr ""
-#: optimizer/util/clauses.c:1654 utils/cache/lsyscache.c:598
-#: utils/cache/lsyscache.c:619 utils/cache/lsyscache.c:640
-#: utils/cache/lsyscache.c:661
+#: parser/parse_clause.c:775
#, c-format
-msgid "Function OID %u does not exist"
+msgid "JOIN/USING column \"%s\" not found in right table"
msgstr ""
-#: optimizer/util/clauses.c:1871
+#: parser/parse_clause.c:827
#, c-format
-msgid "inline_function: null prosrc for procedure %u"
+msgid "column alias list for \"%s\" has too many entries"
msgstr ""
-#: optimizer/util/clauses.c:2031
-msgid "substitute_actual_parameters_mutator: unexpected paramkind"
-msgstr ""
-
-#: optimizer/util/clauses.c:2033
-msgid "substitute_actual_parameters_mutator: unexpected paramid"
-msgstr ""
-
-#: optimizer/util/clauses.c:2339
+#. translator: %s is name of a SQL construct, eg LIMIT
+#: parser/parse_clause.c:1020
#, c-format
-msgid "expression_tree_walker: Unexpected node type %d"
+msgid "argument of %s must not contain variables"
msgstr ""
-#: optimizer/util/clauses.c:2740
+#. translator: %s is name of a SQL construct, eg LIMIT
+#: parser/parse_clause.c:1028
#, c-format
-msgid "expression_tree_mutator: Unexpected node type %d"
+msgid "argument of %s must not contain aggregates"
msgstr ""
-#: optimizer/util/pathnode.c:126
-msgid "Unable to devise a query plan for the given query"
-msgstr ""
-
-#: optimizer/util/plancat.c:57
+#. translator: %s is name of a SQL construct, eg LIMIT
+#: parser/parse_clause.c:1036
#, c-format
-msgid "get_relation_info: Relation %u not found"
+msgid "argument of %s must not contain sub-selects"
msgstr ""
-#: optimizer/util/plancat.c:225
+#: parser/parse_clause.c:1142
#, c-format
-msgid "restriction_selectivity: bad value %f"
+msgid "%s \"%s\" is ambiguous"
msgstr ""
-#: optimizer/util/plancat.c:258
+#. translator: %s is name of a SQL construct, eg ORDER BY
+#: parser/parse_clause.c:1164
#, c-format
-msgid "join_selectivity: bad value %f"
+msgid "non-integer constant in %s"
msgstr ""
-#: optimizer/util/plancat.c:330
+#. translator: %s is name of a SQL construct, eg ORDER BY
+#: parser/parse_clause.c:1181
#, c-format
-msgid "has_subclass: Relation %u not found"
-msgstr ""
-
-#: optimizer/util/relnode.c:60
-msgid "build_base_rel: rel already exists"
-msgstr "build_base_rel: rel уже существует"
-
-#: optimizer/util/relnode.c:69
-msgid "build_base_rel: rel already exists as 'other' rel"
-msgstr ""
-
-#: optimizer/util/relnode.c:107
-msgid "build_other_rel: rel already exists as base rel"
-msgstr ""
-
-#: optimizer/util/relnode.c:181
-#, c-format
-msgid "make_base_rel: unsupported RTE kind %d"
+msgid "%s position %d is not in target list"
msgstr ""
-#: optimizer/util/relnode.c:217
-#, c-format
-msgid "find_base_rel: no relation entry for relid %d"
-msgstr ""
+#: parser/parse_clause.c:1366
+msgid "for SELECT DISTINCT, ORDER BY expressions must appear in target list"
+msgstr "для SELECT DISTINCT, выражения ORDER BY обязаны быть в списке назназчения"
-#: optimizer/util/tlist.c:239
-msgid ""
-"get_sortgroupclause_tle: ORDER/GROUP BY expression not found in targetlist"
-msgstr ""
+#: parser/parse_clause.c:1406
+msgid "SELECT DISTINCT ON expressions must match initial ORDER BY expressions"
+msgstr "Выражения SELECT DISTINCT ON должны совпадать с изначальными выпражениями ORDER BY"
-#: parser/analyze.c:256
+#: parser/analyze.c:364
msgid "CREATE VIEW specifies more column names than columns"
msgstr "CREATE VIEW указывает больше имён колонок чем имеется"
-#: parser/analyze.c:447
+#: parser/analyze.c:574
msgid "INSERT ... SELECT may not specify INTO"
msgstr "INSERT ... SELECT не могут указывать INTO"
-#: parser/analyze.c:535
+#: parser/analyze.c:666
msgid "INSERT has more expressions than target columns"
msgstr ""
-#: parser/analyze.c:569
+#: parser/analyze.c:687
msgid "INSERT has more target columns than expressions"
msgstr ""
-#: parser/analyze.c:765
-msgid "parser: unrecognized node (internal error)"
-msgstr ""
-
-#: parser/analyze.c:847
+#: parser/analyze.c:973
#, c-format
-msgid "%s will create implicit sequence '%s' for SERIAL column '%s.%s'"
+msgid "%s will create implicit sequence \"%s\" for SERIAL column \"%s.%s\""
msgstr ""
-#: parser/analyze.c:928 parser/analyze.c:936
+#: parser/analyze.c:1057
+#: parser/analyze.c:1067
#, c-format
-msgid "%s/(NOT) NULL conflicting declaration for '%s.%s'"
+msgid "conflicting NULL/NOT NULL declarations for \"%s.%s\""
msgstr ""
-#: parser/analyze.c:944
+#: parser/analyze.c:1077
#, c-format
-msgid "%s/DEFAULT multiple values specified for '%s.%s'"
-msgstr ""
-
-#: parser/analyze.c:986 parser/analyze.c:1025
-msgid "parser: unrecognized constraint (internal error)"
+msgid "multiple DEFAULT values specified for \"%s.%s\""
msgstr ""
-#: parser/analyze.c:1021
-msgid "parser: illegal context for constraint (internal error)"
-msgstr ""
-
-#: parser/analyze.c:1065
+#: parser/analyze.c:1322
#, c-format
-msgid "%s / PRIMARY KEY multiple primary keys for table '%s' are not allowed"
+msgid "multiple primary keys for table \"%s\" are not allowed"
msgstr ""
-#: parser/analyze.c:1133
+#: parser/analyze.c:1393
#, c-format
msgid "inherited table \"%s\" is not a relation"
msgstr ""
-#: parser/analyze.c:1162
-#, c-format
-msgid ""
-"inherited attribute \"%s\" cannot be a PRIMARY KEY because it is not marked "
-"NOT NULL"
-msgstr ""
-
-#: parser/analyze.c:1188
-#, c-format
-msgid ""
-"Existing attribute \"%s\" cannot be a PRIMARY KEY because it is not marked "
-"NOT NULL"
-msgstr ""
-
-#: parser/analyze.c:1195
+#. translator: second %s is PRIMARY KEY or UNIQUE
+#: parser/analyze.c:1453
#, c-format
-msgid "%s: column \"%s\" named in key does not exist"
+msgid "column \"%s\" appears twice in %s constraint"
msgstr ""
-#: parser/analyze.c:1203
+#: parser/analyze.c:1547
#, c-format
-msgid "%s: column \"%s\" appears twice in %s constraint"
-msgstr ""
-
-#: parser/analyze.c:1293
-#, c-format
-msgid "%s: failed to make implicit index name"
-msgstr "%s: не удалось создать имя дла неявного индекса"
+msgid "%s / %s%s will create implicit index \"%s\" for table \"%s\""
+msgstr "%s / %s%s создаст подразумеваемый индекс \"%s\" для таблицы \"%s\""
-#: parser/analyze.c:1296
-#, c-format
-msgid "%s / %s%s will create implicit index '%s' for table '%s'"
-msgstr "%s / %s%s создаст неявный индекс '%s' для таблицы '%s'"
-
-#: parser/analyze.c:1310
+#: parser/analyze.c:1563
#, c-format
msgid "%s will create implicit trigger(s) for FOREIGN KEY check(s)"
msgstr "%s создаст неявный(е) триггер(а) для проверки на FOREIGN KEY"
-#: parser/analyze.c:1452 parser/analyze.c:1574
-#, c-format
-msgid "transformRuleStmt: unexpected event type %d"
+#: parser/analyze.c:1656
+msgid "index expression may not return a set"
msgstr ""
-#: parser/analyze.c:1461
-msgid "Rule WHERE condition may not contain references to other relations"
+#: parser/analyze.c:1748
+msgid "rule WHERE condition may not contain references to other relations"
msgstr ""
-#: parser/analyze.c:1465
-msgid "Rule WHERE condition may not contain aggregate functions"
+#: parser/analyze.c:1754
+msgid "rule WHERE condition may not contain aggregate functions"
msgstr ""
-#: parser/analyze.c:1534
-msgid ""
-"Rules with WHERE conditions may only have SELECT, INSERT, UPDATE, or DELETE "
-"actions"
+#: parser/analyze.c:1825
+msgid "rules with WHERE conditions may only have SELECT, INSERT, UPDATE, or DELETE actions"
msgstr ""
-#: parser/analyze.c:1558
-msgid "ON SELECT rule may not use OLD"
+#: parser/analyze.c:1844
+#: parser/analyze.c:1916
+#: rewrite/rewriteHandler.c:176
+#: rewrite/rewriteManip.c:746
+#: rewrite/rewriteManip.c:800
+msgid "conditional UNION/INTERSECT/EXCEPT statements are not implemented"
msgstr ""
-#: parser/analyze.c:1560
+#: parser/analyze.c:1862
+msgid "ON SELECT rule may not use OLD"
+msgstr "нельзя использовать OLD в правиле ON SELECT"
+
+#: parser/analyze.c:1866
msgid "ON SELECT rule may not use NEW"
-msgstr ""
+msgstr "нельзя использовать NEW в правиле ON SELECT"
-#: parser/analyze.c:1567
+#: parser/analyze.c:1875
msgid "ON INSERT rule may not use OLD"
-msgstr ""
+msgstr "нельзя использовать OLD в правиле ON INSERT"
-#: parser/analyze.c:1571
+#: parser/analyze.c:1881
msgid "ON DELETE rule may not use NEW"
-msgstr ""
-
-#: parser/analyze.c:1636 parser/analyze.c:1844
-msgid "DECLARE CURSOR must not specify INTO"
-msgstr ""
+msgstr "нельзя использовать NEW в правиле ON DELETE"
-#: parser/analyze.c:1638 parser/analyze.c:1846
-msgid ""
-"DECLARE/UPDATE is not supported\n"
-"\tCursors must be READ ONLY"
+#: parser/analyze.c:2209
+msgid "ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of the result columns"
msgstr ""
-#: parser/analyze.c:1914
-msgid ""
-"ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of the result "
-"columns"
-msgstr ""
-
-#: parser/analyze.c:1948
+#: parser/analyze.c:2247
msgid "INTO is only allowed on first SELECT of UNION/INTERSECT/EXCEPT"
msgstr ""
-#: parser/analyze.c:1950
-msgid "Portal may not appear in UNION/INTERSECT/EXCEPT"
+#: parser/analyze.c:2308
+msgid "UNION/INTERSECT/EXCEPT member statement may not refer to other relations of same query level"
msgstr ""
-#: parser/analyze.c:2044
+#: parser/analyze.c:2361
#, c-format
-msgid "Each %s query must have the same number of columns"
+msgid "each %s query must have the same number of columns"
msgstr ""
-#: parser/analyze.c:2102
-#, c-format
-msgid "getSetColTypes: unexpected node %d"
-msgstr "getSetColTypes: не ожиданный узел %d"
-
-#: parser/analyze.c:2113
+#: parser/analyze.c:2431
msgid "CREATE TABLE AS specifies too many column names"
msgstr "CREATE TABLE AS указывает слишком много имён для колонки"
-#: parser/analyze.c:2196 parser/analyze.c:2205
-msgid "UPDATE target count mismatch --- internal error"
-msgstr "UPDATE target: не совпадение счёчика --- внутренняя ошибка"
-
-#: parser/analyze.c:2291
-msgid "Unexpected node type in ALTER TABLE ADD CONSTRAINT"
+#: parser/analyze.c:2664
+msgid "cannot specify both SCROLL and NO SCROLL"
msgstr ""
-#: parser/analyze.c:2374
-msgid "transformPrepareStmt: internal error"
+#: parser/analyze.c:2750
+#, c-format
+msgid "wrong number of parameters for prepared statement \"%s\""
msgstr ""
-#: parser/analyze.c:2401
+#: parser/analyze.c:2752
#, c-format
-msgid "Wrong number of parameters, expected %d but got %d"
+msgid "Expected %d parameters but got %d."
msgstr ""
-#: parser/analyze.c:2414
-msgid "Cannot use subselects in EXECUTE parameters"
+#: parser/analyze.c:2767
+msgid "cannot use sub-select in EXECUTE parameter"
msgstr ""
-#: parser/analyze.c:2416
-msgid "Cannot use aggregates in EXECUTE parameters"
+#: parser/analyze.c:2771
+msgid "cannot use aggregate in EXECUTE parameter"
msgstr ""
-#: parser/analyze.c:2427
+#: parser/analyze.c:2784
#, c-format
-msgid ""
-"Parameter $%d of type %s cannot be coerced into the expected type %s\n"
-"\tYou will need to rewrite or cast the expression"
+msgid "parameter $%d of type %s cannot be coerced to the expected type %s"
msgstr ""
-#: parser/analyze.c:2450
+#: parser/analyze.c:2811
msgid "SELECT FOR UPDATE is not allowed with DISTINCT clause"
msgstr ""
-#: parser/analyze.c:2452
+#: parser/analyze.c:2815
msgid "SELECT FOR UPDATE is not allowed with GROUP BY clause"
msgstr ""
-#: parser/analyze.c:2454
+#: parser/analyze.c:2819
msgid "SELECT FOR UPDATE is not allowed with AGGREGATE"
msgstr ""
-#: parser/analyze.c:2519
+#: parser/analyze.c:2886
#, c-format
-msgid "FOR UPDATE: relation \"%s\" not found in FROM clause"
+msgid "relation \"%s\" in FOR UPDATE clause not found in FROM clause"
msgstr ""
-#: parser/analyze.c:2559
-#, c-format
-msgid "relationHasPrimaryKey: index %u not found"
+#: parser/analyze.c:2978
+msgid "misplaced DEFERRABLE clause"
msgstr ""
-#: parser/analyze.c:2610
-msgid "Misplaced DEFERRABLE clause"
+#: parser/analyze.c:2982
+#: parser/analyze.c:2995
+msgid "multiple DEFERRABLE/NOT DEFERRABLE clauses not allowed"
msgstr ""
-#: parser/analyze.c:2612 parser/analyze.c:2621
-msgid "Multiple DEFERRABLE/NOT DEFERRABLE clauses not allowed"
+#: parser/analyze.c:2991
+msgid "misplaced NOT DEFERRABLE clause"
msgstr ""
-#: parser/analyze.c:2619
-msgid "Misplaced NOT DEFERRABLE clause"
-msgstr ""
-
-#: parser/analyze.c:2626 parser/analyze.c:2644 gram.y:2150 gram.y:2164
+#: parser/analyze.c:3002
+#: parser/analyze.c:3026
msgid "INITIALLY DEFERRED constraint must be DEFERRABLE"
msgstr ""
-#: parser/analyze.c:2631
-msgid "Misplaced INITIALLY DEFERRED clause"
-msgstr ""
-
-#: parser/analyze.c:2633 parser/analyze.c:2651
-msgid "Multiple INITIALLY IMMEDIATE/DEFERRED clauses not allowed"
-msgstr ""
-
-#: parser/analyze.c:2649
-msgid "Misplaced INITIALLY IMMEDIATE clause"
-msgstr ""
-
-#: parser/analyze.c:2758
-#, c-format
-msgid ""
-"New table specifies a schema (%s) different from the one being created (%s)"
-msgstr ""
-
-#: parser/analyze.c:2777
-#, c-format
-msgid ""
-"New view specifies a schema (%s) different from the one being created (%s)"
-msgstr ""
-
-#: parser/analyze.c:2794
-msgid "parser: unsupported schema node (internal error)"
-msgstr ""
-
-#: parser/parse_agg.c:112
-#, c-format
-msgid "Attribute %s.%s must be GROUPed or used in an aggregate function"
-msgstr ""
-
-#: parser/parse_agg.c:150
-msgid "Aggregates not allowed in WHERE clause"
-msgstr ""
-
-#: parser/parse_agg.c:152
-msgid "Aggregates not allowed in JOIN conditions"
-msgstr ""
-
-#: parser/parse_agg.c:168
-msgid "Aggregates not allowed in GROUP BY clause"
-msgstr ""
-
-#: parser/parse_clause.c:195
-msgid "Bogus InhOption value"
-msgstr ""
-
-#: parser/parse_clause.c:342
-#, c-format
-msgid "JOIN/ON clause refers to \"%s\", which is not part of JOIN"
-msgstr ""
-
-#: parser/parse_clause.c:401
-msgid "sub-select in FROM must have an alias"
-msgstr ""
-
-#: parser/parse_clause.c:425 parser/parse_clause.c:428
-msgid "Unexpected parse analysis result for subselect in FROM"
-msgstr ""
-
-#: parser/parse_clause.c:431
-msgid "Expected SELECT query from subselect in FROM"
-msgstr ""
-
-#: parser/parse_clause.c:433
-msgid "Subselect in FROM may not have SELECT INTO"
-msgstr ""
-
-#: parser/parse_clause.c:494
-msgid ""
-"FROM function expression may not refer to other relations of same query level"
-msgstr ""
-
-#: parser/parse_clause.c:503
-msgid "cannot use aggregate function in FROM function expression"
+#: parser/analyze.c:3009
+msgid "misplaced INITIALLY DEFERRED clause"
msgstr ""
-#: parser/parse_clause.c:626 parser/parse_clause.c:638
-msgid "transformFromClauseItem: unexpected subtree type"
+#: parser/analyze.c:3013
+#: parser/analyze.c:3037
+msgid "multiple INITIALLY IMMEDIATE/DEFERRED clauses not allowed"
msgstr ""
-#: parser/parse_clause.c:721
-#, c-format
-msgid "USING column name \"%s\" appears more than once"
+#: parser/analyze.c:3033
+msgid "misplaced INITIALLY IMMEDIATE clause"
msgstr ""
-#: parser/parse_clause.c:733
+#: parser/analyze.c:3146
+#: parser/analyze.c:3167
#, c-format
-msgid "Common column name \"%s\" appears more than once in left table"
+msgid "CREATE specifies a schema (%s) different from the one being created (%s)"
msgstr ""
-#: parser/parse_clause.c:739
+#: parser/analyze.c:3221
+#: parser/parse_coerce.c:237
+#: parser/parse_expr.c:136
+#: parser/parse_expr.c:142
#, c-format
-msgid "JOIN/USING column \"%s\" not found in left table"
+msgid "there is no parameter $%d"
msgstr ""
-#: parser/parse_clause.c:751
+#: parser/analyze.c:3226
+#: tcop/postgres.c:1144
#, c-format
-msgid "Common column name \"%s\" appears more than once in right table"
-msgstr ""
-
-#: parser/parse_clause.c:757
-#, c-format
-msgid "JOIN/USING column \"%s\" not found in right table"
+msgid "could not determine datatype of parameter $%d"
msgstr ""
-#: parser/parse_clause.c:806
-#, c-format
-msgid "Column alias list for \"%s\" has too many entries"
+#: parser/parse_agg.c:120
+msgid "aggregates not allowed in WHERE clause"
msgstr ""
-#: parser/parse_clause.c:833
-#, c-format
-msgid ""
-"transformFromClauseItem: unexpected node (internal error)\n"
-"\t%s"
+#: parser/parse_agg.c:124
+msgid "aggregates not allowed in JOIN conditions"
msgstr ""
-#: parser/parse_clause.c:944
-#, c-format
-msgid "buildMergedJoinVar: unexpected jointype %d"
+#: parser/parse_agg.c:145
+msgid "aggregates not allowed in GROUP BY clause"
msgstr ""
-#: parser/parse_clause.c:1065
+#: parser/parse_agg.c:305
#, c-format
-msgid "%s '%s' is ambiguous"
+msgid "attribute \"%s.%s\" must be GROUPed or used in an aggregate function"
msgstr ""
-#: parser/parse_clause.c:1084
+#: parser/parse_agg.c:310
#, c-format
-msgid "Non-integer constant in %s"
+msgid "sub-select uses un-GROUPed attribute \"%s.%s\" from outer query"
msgstr ""
-#: parser/parse_clause.c:1097
+#: parser/parse_coerce.c:253
#, c-format
-msgid "%s position %d is not in target list"
-msgstr ""
-
-#: parser/parse_clause.c:1238
-msgid "For SELECT DISTINCT, ORDER BY expressions must appear in target list"
-msgstr ""
-"Для SELECT DISTINCT, выражения ORDER BY обязаны быть в списке назназчения"
-
-#: parser/parse_clause.c:1276
-msgid "SELECT DISTINCT ON expressions must match initial ORDER BY expressions"
-msgstr ""
-"Выражения SELECT DISTINCT ON должны совпадать с изначальными выпражениями "
-"ORDER BY"
-
-#: parser/parse_clause.c:1300
-msgid ""
-"transformDistinctClause: failed to add DISTINCT ON clause to target list"
-msgstr ""
-
-#: parser/parse_coerce.c:291
-#, c-format
-msgid "coerce_type: no conversion function from %s to %s"
-msgstr "coerce_type: фунции конверсии из %s в %s не обнаружено"
-
-#: parser/parse_coerce.c:423
-#, c-format
-msgid "coerce_type_constraints: failed to lookup type %u"
-msgstr "coerce_type_constraints: тип %u не найден"
-
-#: parser/parse_coerce.c:454
-#, c-format
-msgid "coerce_type_constraints: domain %s constraint %s has NULL conbin"
+msgid "inconsistent types deduced for parameter $%d"
msgstr ""
#. translator: first %s is name of a SQL construct, eg WHERE
-#: parser/parse_coerce.c:607
+#: parser/parse_coerce.c:579
#, c-format
-msgid "Argument of %s must be type boolean, not type %s"
-msgstr "Тип аргумента конструкции %s должен быть boolean, а не %s"
+msgid "argument of %s must be type boolean, not type %s"
+msgstr "тип аргумента конструкции %s должен быть boolean, а не %s"
#. translator: %s is name of a SQL construct, eg WHERE
-#: parser/parse_coerce.c:615
-#, c-format
-msgid "Argument of %s must not be a set function"
-msgstr ""
-
-#: parser/parse_coerce.c:662
-#, c-format
-msgid "%s types '%s' and '%s' not matched"
-msgstr "%s типы '%s' и '%s' не совпадают"
-
-#: parser/parse_coerce.c:714
+#: parser/parse_coerce.c:587
+#: parser/parse_coerce.c:626
#, c-format
-msgid "%s unable to convert to type %s"
-msgstr "%s не в состоянии сконвертировать в тип %s"
-
-#: parser/parse_coerce.c:996
-#, c-format
-msgid "find_coercion_pathway: bogus castcontext %c"
+msgid "argument of %s must not return a set"
msgstr ""
-#: parser/parse_expr.c:101
+#. translator: first %s is name of a SQL construct, eg LIMIT
+#: parser/parse_coerce.c:618
#, c-format
-msgid "Expression too complex: nesting depth exceeds max_expr_depth = %d"
-msgstr ""
+msgid "argument of %s must be type integer, not type %s"
+msgstr "тип аргумента конструкции %s должен быть integer, а не %s"
-#: parser/parse_expr.c:120
+#: parser/parse_coerce.c:679
#, c-format
-msgid "Parameter '$%d' is out of range"
-msgstr ""
-
-#: parser/parse_expr.c:273
-msgid "IS DISTINCT FROM requires = operator to yield boolean"
-msgstr ""
-
-#: parser/parse_expr.c:355 parser/parse_expr.c:359
-msgid "Bad query in subselect"
-msgstr ""
-
-#: parser/parse_expr.c:381
-msgid "Subselect must have a field"
-msgstr ""
-
-#: parser/parse_expr.c:385
-msgid "Subselect must have only one field"
-msgstr ""
+msgid "%s types %s and %s cannot be matched"
+msgstr "%s типы %s и %s не совпадают"
-#: parser/parse_expr.c:415
+#. translator: first %s is name of a SQL construct, eg CASE
+#: parser/parse_coerce.c:741
#, c-format
-msgid "Row comparison cannot use operator %s"
-msgstr ""
+msgid "%s could not convert type %s to %s"
+msgstr "%s не в состоянии сконвертировать тип %s в %s"
-#: parser/parse_expr.c:438
-msgid "Subselect has too many fields"
+#: parser/parse_coerce.c:900
+msgid "arguments declared ANYELEMENT are not all alike"
msgstr ""
-#: parser/parse_expr.c:454
-#, c-format
-msgid ""
-"%s has result type of %s, but must return %s to be used with quantified "
-"predicate subquery"
+#: parser/parse_coerce.c:917
+msgid "arguments declared ANYARRAY are not all alike"
msgstr ""
-#: parser/parse_expr.c:460
+#: parser/parse_coerce.c:939
+#: parser/parse_coerce.c:1050
+#: parser/parse_coerce.c:1077
#, c-format
-msgid "%s must not return a set to be used with quantified predicate subquery"
-msgstr ""
-
-#: parser/parse_expr.c:476
-msgid "Subselect has too few fields"
+msgid "argument declared ANYARRAY is not an array but %s"
msgstr ""
-#: parser/parse_expr.c:620
-#, c-format
-msgid "transformExpr: unexpected booltesttype %d"
+#: parser/parse_coerce.c:955
+msgid "argument declared ANYARRAY is not consistent with argument declared ANYELEMENT"
msgstr ""
-#: parser/parse_expr.c:658
-#, c-format
-msgid "transformExpr: does not know how to transform node %d (internal error)"
+#: parser/parse_coerce.c:966
+msgid "could not determine ANYARRAY/ANYELEMENT type because input is UNKNOWN"
msgstr ""
-#: parser/parse_expr.c:763
+#: parser/parse_coerce.c:991
+#: parser/parse_coerce.c:1008
+#: parser/parse_coerce.c:1062
+#: parser/parse_expr.c:795
+#: parser/parse_expr.c:1227
+#: parser/parse_expr.c:1266
#, c-format
-msgid "Attribute \"%s\" not found"
-msgstr "Атрибут \"%s\" не найден"
-
-#: parser/parse_expr.c:875 parser/parse_target.c:153
-msgid "Invalid qualified name syntax (too many names)"
+msgid "could not find array type for datatype %s"
msgstr ""
-#: parser/parse_expr.c:935
-msgid "exprType: Cannot get type for untransformed sublink"
-msgstr ""
-
-#: parser/parse_expr.c:977
+#: parser/parse_relation.c:174
+#: parser/parse_relation.c:189
#, c-format
-msgid "Relation reference \"%s\" cannot be used in an expression"
+msgid "table reference \"%s\" is ambiguous"
msgstr ""
-#: parser/parse_expr.c:982
-#, c-format
-msgid "exprType: Do not know how to get type for %d node"
-msgstr "exprType: Не известно как извлечь тип для узла %d"
-
-#: parser/parse_expr.c:1151
-#, c-format
-msgid "Cannot cast type %s to %s"
-msgstr "Нельзя конвертировать тип %s в %s"
-
-#: parser/parse_func.c:97
+#: parser/parse_relation.c:249
+#: parser/parse_relation.c:264
#, c-format
-msgid "Cannot pass more than %d arguments to a function"
+msgid "table reference %u is ambiguous"
msgstr ""
-#: parser/parse_func.c:104
+#: parser/parse_relation.c:356
+#: parser/parse_relation.c:368
#, c-format
-msgid "Function '%s' does not allow NULL input"
-msgstr ""
+msgid "table name \"%s\" specified more than once"
+msgstr "имя таблицы \"%s\" указано больше одного раза"
-#: parser/parse_func.c:192
+#: parser/parse_relation.c:477
+#: parser/parse_relation.c:573
#, c-format
-msgid "Cannot find type OID for relation %u"
+msgid "column reference \"%s\" is ambiguous"
msgstr ""
-#: parser/parse_func.c:232
+#: parser/parse_relation.c:668
+#: parser/parse_relation.c:763
+#: parser/parse_relation.c:858
+#: parser/parse_relation.c:978
#, c-format
-msgid "Cannot pass result of sub-select or join %s to a function"
+msgid "table \"%s\" has %d columns available but %d columns specified"
msgstr ""
-#: parser/parse_func.c:270
-#, c-format
-msgid "%s(*) specified, but %s is not an aggregate function"
+#: parser/parse_relation.c:935
+msgid "a column definition list is only allowed for functions returning RECORD"
msgstr ""
-#: parser/parse_func.c:273
-#, c-format
-msgid "DISTINCT specified, but %s is not an aggregate function"
+#: parser/parse_relation.c:946
+msgid "a column definition list is required for functions returning RECORD"
msgstr ""
-#: parser/parse_func.c:296
+#: parser/parse_relation.c:1007
#, c-format
-msgid "Attribute notation .%s applied to type %s, which is not a complex type"
+msgid "too many column aliases specified for function %s"
msgstr ""
-#: parser/parse_func.c:299
+#: parser/parse_relation.c:1030
#, c-format
-msgid "Attribute \"%s\" not found in datatype %s"
+msgid "function \"%s\" in FROM has unsupported return type"
msgstr ""
-#: parser/parse_func.c:342
-msgid "Aggregates may not return sets"
+#: parser/parse_relation.c:1422
+#: parser/parse_relation.c:1666
+msgid "function in FROM has unsupported return type"
msgstr ""
-#: parser/parse_func.c:1257
-#, c-format
-msgid "No such attribute %s.%s.%s"
-msgstr "%s.%s.%s: нет такого атрибута"
-
-#: parser/parse_func.c:1260
-#, c-format
-msgid "No such attribute %s.%s"
-msgstr "%s.%s: нет такого атрибута"
-
-#: parser/parse_func.c:1287
-#, c-format
-msgid "Function %s(%s) does not exist%s%s"
-msgstr "Функция %s(%s) не существует %s%s"
-
-#: parser/parse_func.c:1293
-#, c-format
-msgid "%s: function %s(%s) does not exist%s%s"
-msgstr "%s: функция %s(%s) не существует %s%s"
-
-#: parser/parse_func.c:1319
-#, c-format
-msgid "%s: aggregate %s(*) does not exist"
-msgstr "%s: агрегат %s(*) не существует"
-
-#: parser/parse_func.c:1322
+#: parser/parse_relation.c:1910
#, c-format
-msgid "%s: aggregate %s(%s) does not exist"
-msgstr "%s: агрегат %s(%s) не существует"
+msgid "missing FROM-clause entry in subquery for table \"%s\""
+msgstr "отсутсвует запись о FROM-выражении в подзапросе для таблицы \"%s\""
-#: parser/parse_func.c:1338
+#: parser/parse_relation.c:1915
#, c-format
-msgid "%s: function %s(*) is not an aggregate"
-msgstr ""
+msgid "missing FROM-clause entry for table \"%s\""
+msgstr "отсутсвует запись о FROM-выражении для таблицы \"%s\""
-#: parser/parse_func.c:1341
+#: parser/parse_relation.c:1934
#, c-format
-msgid "%s: function %s(%s) is not an aggregate"
-msgstr ""
+msgid "adding missing FROM-clause entry in subquery for table \"%s\""
+msgstr "добавление отсутсвующей записи о FROM-выражении в подзапросе для таблицы \"%s\""
-#: parser/parse_node.c:211
+#: parser/parse_relation.c:1939
#, c-format
-msgid "transformArraySubscripts: Cache lookup failed for array type %u"
-msgstr ""
+msgid "adding missing FROM-clause entry for table \"%s\""
+msgstr "добавление отсутсвующей записи о FROM-выражении для таблицы \"%s\""
-#: parser/parse_node.c:217
-#, c-format
-msgid "transformArraySubscripts: type %s is not an array"
-msgstr ""
+#: parser/parse_expr.c:105
+msgid "expression too complex"
+msgstr "слишком сложное выражение"
-#: parser/parse_node.c:225
+#: parser/parse_expr.c:106
#, c-format
-msgid "transformArraySubscripts: Cache lookup failed for array element type %u"
+msgid "Nesting depth exceeds MAX_EXPR_DEPTH = %d."
msgstr ""
-#: parser/parse_node.c:282 parser/parse_node.c:302
-msgid "array index expressions must be integers"
+#: parser/parse_expr.c:351
+msgid "IS DISTINCT FROM requires = operator to yield boolean"
msgstr ""
-#: parser/parse_node.c:321
-#, c-format
-msgid ""
-"Array assignment requires type %s but expression is of type %s\n"
-"\tYou will need to rewrite or cast the expression"
+#: parser/parse_expr.c:374
+msgid "NULLIF requires = operator to yield boolean"
msgstr ""
-#: parser/parse_node.c:431
-#, c-format
-msgid "make_const: unknown type %d"
+#: parser/parse_expr.c:496
+msgid "sub-select must return a column"
msgstr ""
-#: parser/parse_oper.c:116
-#, c-format
-msgid "%s: Prefix operator '%s' for type '%s' does not exist"
-msgstr "%s: Prefix-оператор '%s' для типа '%s' не существует"
-
-#: parser/parse_oper.c:120
-#, c-format
-msgid "%s: Postfix operator '%s' for type '%s' does not exist"
-msgstr "%s: Postfix-оператор '%s' для типа '%s' не существует"
-
-#: parser/parse_oper.c:124
-#, c-format
-msgid "%s: Operator '%s' for types '%s' and '%s' does not exist"
-msgstr "%s: Оператор '%s' для типов '%s' и '%s' не существует"
-
-#: parser/parse_oper.c:166
-#, c-format
-msgid "Unable to identify an equality operator for type %s"
+#: parser/parse_expr.c:502
+msgid "sub-select must return only one column"
msgstr ""
-#: parser/parse_oper.c:204
+#: parser/parse_expr.c:558
#, c-format
-msgid ""
-"Unable to identify an ordering operator for type %s\n"
-"\tUse an explicit ordering operator or modify the query"
+msgid "row comparison cannot use operator %s"
msgstr ""
-#: parser/parse_oper.c:966
-#, c-format
-msgid ""
-"Left hand side of operator '%s' has an unknown type\n"
-"\tProbably a bad attribute name"
-msgstr ""
+#: parser/parse_expr.c:585
+msgid "sub-select has too many columns"
+msgstr "слишком много колонок а подзапросе"
-#: parser/parse_oper.c:971
+#: parser/parse_expr.c:603
#, c-format
-msgid ""
-"Right hand side of operator %s has an unknown type\n"
-"\tProbably a bad attribute name"
-msgstr ""
+msgid "operator %s must return boolean, not type %s"
+msgstr "оператор %s должен возвращать тип boolean, а не %s"
-#: parser/parse_oper.c:975
-#, c-format
-msgid ""
-"Unable to identify an operator '%s' for types '%s' and '%s'\n"
-"\tYou will have to retype this query using an explicit cast"
+#: parser/parse_expr.c:606
+#: parser/parse_expr.c:613
+msgid "The operator of a quantified predicate subquery must return boolean."
msgstr ""
-#: parser/parse_oper.c:991
+#: parser/parse_expr.c:611
#, c-format
-msgid ""
-"operand of prefix operator '%s' has an unknown type\n"
-"\t(probably an invalid column reference)"
+msgid "operator %s must not return a set"
msgstr ""
-#: parser/parse_oper.c:995
-#, c-format
-msgid ""
-"operand of postfix operator '%s' has an unknown type\n"
-"\t(probably an invalid column reference)"
+#: parser/parse_expr.c:623
+msgid "sub-select has too few columns"
msgstr ""
-#: parser/parse_oper.c:1002
+#: parser/parse_expr.c:1033
#, c-format
-msgid ""
-"Unable to identify a prefix operator '%s' for type '%s'\n"
-"\tYou may need to add parentheses or an explicit cast"
-msgstr ""
+msgid "attribute \"%s\" not found"
+msgstr "атрибут \"%s\" не найден"
-#: parser/parse_oper.c:1006
+#: parser/parse_expr.c:1322
#, c-format
-msgid ""
-"Unable to identify a postfix operator '%s' for type '%s'\n"
-"\tYou may need to add parentheses or an explicit cast"
+msgid "relation reference \"%s\" cannot be used in an expression"
msgstr ""
-#: parser/parse_relation.c:169 parser/parse_relation.c:181
+#: parser/parse_expr.c:1530
#, c-format
-msgid "Table reference \"%s\" is ambiguous"
-msgstr ""
+msgid "cannot cast type %s to %s"
+msgstr "нельзя конвертировать тип %s в %s"
-#: parser/parse_relation.c:185
+#: parser/parse_func.c:89
#, c-format
-msgid "scanNameSpaceForRefname: unexpected node type %d"
-msgstr ""
+msgid "cannot pass more than %d arguments to a function"
+msgstr "число аргументов функции не может быть более %d"
-#: parser/parse_relation.c:239 parser/parse_relation.c:251
+#: parser/parse_func.c:224
#, c-format
-msgid "Table reference %u is ambiguous"
+msgid "cannot pass result of sub-select or join %s to a function"
msgstr ""
-#: parser/parse_relation.c:255
-#, c-format
-msgid "scanNameSpaceForRelid: unexpected node type %d"
-msgstr "scanNameSpaceForRelid: неожиданный тип узла %d"
-
-#: parser/parse_relation.c:319
+#: parser/parse_func.c:265
#, c-format
-msgid "checkNameSpaceConflicts: unexpected node type %d"
+msgid "%s(*) specified, but %s is not an aggregate function"
msgstr ""
-#: parser/parse_relation.c:342 parser/parse_relation.c:352
-#, c-format
-msgid "Table name \"%s\" specified more than once"
-msgstr "Имя таблицы \"%s\" указано больше одного раза"
-
-#: parser/parse_relation.c:373
+#: parser/parse_func.c:271
#, c-format
-msgid "scanNameSpaceForConflict: unexpected node type %d"
-msgstr "scanNameSpaceForConflict: неожиданный узла %d"
-
-#: parser/parse_relation.c:408
-msgid "RTERangeTablePosn: RTE not found (internal error)"
+msgid "DISTINCT specified, but %s is not an aggregate function"
msgstr ""
-#: parser/parse_relation.c:460 parser/parse_relation.c:553
+#: parser/parse_func.c:296
#, c-format
-msgid "Column reference \"%s\" is ambiguous"
+msgid "attribute notation .%s applied to type %s, which is not a complex type"
msgstr ""
-#: parser/parse_relation.c:547
+#: parser/parse_func.c:301
#, c-format
-msgid "colnameToVar: unexpected node type %d"
-msgstr ""
+msgid "attribute \"%s\" not found in datatype %s"
+msgstr "атрибут \"%s\" не найден в типе %s"
-#: parser/parse_relation.c:646 parser/parse_relation.c:739
-#: parser/parse_relation.c:832 parser/parse_relation.c:946
+#: parser/parse_func.c:311
#, c-format
-msgid "Table \"%s\" has %d columns available but %d columns specified"
-msgstr ""
+msgid "function %s is not unique"
+msgstr "функция %s не уникальна"
-#: parser/parse_relation.c:907
-msgid "A column definition list is only allowed for functions returning RECORD"
+#: parser/parse_func.c:314
+msgid "Could not choose a best candidate function. You may need to add explicit typecasts."
msgstr ""
-#: parser/parse_relation.c:916
-msgid "A column definition list is required for functions returning RECORD"
+#: parser/parse_func.c:322
+msgid "No function matches the given name and argument types. You may need to add explicit typecasts."
msgstr ""
-#: parser/parse_relation.c:972
-#, c-format
-msgid "Too many column aliases specified for function %s"
+#: parser/parse_func.c:371
+msgid "aggregates may not return sets"
msgstr ""
-#: parser/parse_relation.c:993
+#: parser/parse_func.c:1353
#, c-format
-msgid "Unknown kind of return type specified for function %s"
-msgstr ""
+msgid "no such attribute %s.%s.%s"
+msgstr "%s.%s.%s: нет такого атрибута"
-#: parser/parse_relation.c:1425
+#: parser/parse_func.c:1358
#, c-format
-msgid "expandRTE: unsupported RTE kind %d"
-msgstr ""
+msgid "no such attribute %s.%s"
+msgstr "%s.%s: нет такого атрибута"
-#: parser/parse_relation.c:1515
+#: parser/parse_func.c:1428
#, c-format
-msgid "Invalid attnum %d for rangetable entry %s"
-msgstr ""
+msgid "aggregate %s(*) does not exist"
+msgstr "агрегат %s(*) не существует"
-#: parser/parse_relation.c:1542 parser/parse_relation.c:1605
-#: parser/parse_relation.c:1683
+#: parser/parse_func.c:1433
#, c-format
-msgid "Relation \"%s\" does not have attribute %d"
-msgstr "Связь \"%s\" не имеет атрибута %d"
+msgid "aggregate %s(%s) does not exist"
+msgstr "агрегат %s(%s) не существует"
-#: parser/parse_relation.c:1574
+#: parser/parse_func.c:1454
#, c-format
-msgid "Subquery %s does not have attribute %d"
-msgstr ""
+msgid "function %s(%s) is not an aggregate"
+msgstr "функция %s(%s) не является агрегатом"
-#: parser/parse_relation.c:1655
+#: parser/parse_node.c:124
#, c-format
-msgid "get_rte_attribute_type: unsupported RTE kind %d"
+msgid "cannot subscript type %s because it is not an array"
msgstr ""
-#: parser/parse_relation.c:1716
-#, c-format
-msgid "Relation %s does not have attribute %d"
+#: parser/parse_node.c:183
+#: parser/parse_node.c:206
+msgid "array subscript must have type integer"
msgstr ""
-#: parser/parse_relation.c:1732
+#: parser/parse_node.c:228
#, c-format
-msgid "get_rte_attribute_is_dropped: unsupported RTE kind %d"
+msgid "array assignment requires type %s but expression is of type %s"
msgstr ""
-#: parser/parse_relation.c:1815
-#, c-format
-msgid "attnumAttName: invalid attribute number %d"
-msgstr "attnumAttName: неверный номер атрибута: %d"
-
-#: parser/parse_relation.c:1837
+#: parser/parse_oper.c:84
+#: parser/parse_oper.c:761
#, c-format
-msgid "attnumTypeId: invalid attribute number %d"
-msgstr "attnumTypeId: неверный номер атрибута: %d"
-
-#: parser/parse_relation.c:1864
-#, c-format
-msgid "Adding missing FROM-clause entry%s for table \"%s\""
-msgstr "Добавление отсутсвующей записи%s FROM-выражения для таблицы \"%s\""
-
-#: parser/parse_target.c:62
-msgid "You can't use relation names alone in the target list, try relation.*."
-msgstr ""
+msgid "operator does not exist: %s"
+msgstr "оператор не существует: %s"
-#: parser/parse_target.c:236
+#: parser/parse_oper.c:185
+#: utils/adt/arrayfuncs.c:2397
+#: utils/adt/ri_triggers.c:3436
#, c-format
-msgid "Cannot assign to system attribute '%s'"
+msgid "could not identify an equality operator for type %s"
msgstr ""
-#: parser/parse_target.c:298
+#: parser/parse_oper.c:249
+#: parser/parse_oper.c:314
#, c-format
-msgid ""
-"column \"%s\" is of type %s but expression is of type %s\n"
-"\tYou will need to rewrite or cast the expression"
+msgid "could not identify an ordering operator for type %s"
msgstr ""
-#: parser/parse_target.c:371
-#, c-format
-msgid "Attribute '%s' specified more than once"
+#: parser/parse_oper.c:251
+#: parser/parse_oper.c:316
+msgid "Use an explicit ordering operator or modify the query."
msgstr ""
-#: parser/parse_target.c:406
+#: parser/parse_oper.c:560
#, c-format
-msgid ""
-"ExpandAllTables: unexpected node (internal error)\n"
-"\t%s"
+msgid "operator requires run-time type coercion: %s"
msgstr ""
-#: parser/parse_target.c:424
-msgid "Wildcard with no tables specified not allowed"
-msgstr ""
-
-#: parser/parse_type.c:60
+#: parser/parse_oper.c:754
#, c-format
-msgid "Improper %%TYPE reference (too few dotted names): %s"
+msgid "operator is not unique: %s"
msgstr ""
-#: parser/parse_type.c:79
-#, c-format
-msgid "Improper %%TYPE reference (too many dotted names): %s"
+#: parser/parse_oper.c:756
+msgid "Could not choose a best candidate operator. You may need to add explicit typecasts."
msgstr ""
-#: parser/parse_type.c:96
-#, c-format
-msgid "%s converted to %s"
+#: parser/parse_oper.c:763
+msgid "No operator matches the given name and argument type(s). You may need to add explicit typecasts."
msgstr ""
-#: parser/parse_type.c:194 parser/parse_type.c:222
-#: utils/cache/lsyscache.c:1265
-#, c-format
-msgid "Type \"%s\" is only a shell"
+#: parser/parse_oper.c:853
+msgid "op ANY/ALL (array) requires array on right side"
msgstr ""
-#: parser/parse_type.c:247
-#, c-format
-msgid "Unable to locate type oid %u in catalog"
+#: parser/parse_oper.c:882
+msgid "op ANY/ALL (array) requires operator to yield boolean"
msgstr ""
-#: parser/parse_type.c:256
-msgid "typeTypeId() called with NULL type struct"
+#: parser/parse_oper.c:886
+msgid "op ANY/ALL (array) requires operator not to return a set"
msgstr ""
-#: parser/parse_type.c:389
-#, c-format
-msgid "typeidOutfunc: Invalid type - oid = %u"
-msgstr "typeidOutfunc: Не верный тип - OID = %u"
-
-#: parser/parse_type.c:410
-#, c-format
-msgid "typeidTypeRelid: Invalid type - oid = %u"
-msgstr "typeidTypeRelid: Не верный тип - OID = %u"
-
-#: parser/parse_type.c:447 parser/parse_type.c:463 parser/parse_type.c:465
-#: parser/parse_type.c:471 parser/parse_type.c:477 parser/parse_type.c:481
+#: parser/parse_oper.c:896
#, c-format
-msgid "Invalid type name '%s'"
-msgstr "Неверное имя типа '%s'"
-
-#: y.tab.c:8678
-msgid "syntax error: cannot back up"
-msgstr ""
-
-#: gram.y:929
-msgid "SET TRANSACTION/READ ONLY not yet supported"
-msgstr "SET TRANSACTION/READ ONLY пока не поддерживается"
-
-#: gram.y:966 gram.y:983
-msgid "Time zone interval must be HOUR or HOUR TO MINUTE"
+msgid "could not find datatype for array of %s"
msgstr ""
-#: gram.y:977 gram.y:4960 gram.y:6945 utils/adt/timestamp.c:701
+#: parser/parse_target.c:66
#, c-format
-msgid "INTERVAL(%d) precision must be between %d and %d"
+msgid "relation reference \"%s\" cannot be used as a targetlist entry"
msgstr ""
-#: gram.y:1421 gram.y:1427 gram.y:4368 gram.y:4375
-msgid "GLOBAL TEMPORARY TABLE is not currently supported"
-msgstr "GLOBAL TEMPORARY TABLE пока не поддерживается"
-
-#: gram.y:1465
+#: parser/parse_target.c:68
#, c-format
-msgid "CREATE TABLE / COLLATE %s not yet implemented; clause ignored"
-msgstr ""
-
-#: gram.y:1649
-msgid "LIKE in table definitions not yet supported"
+msgid "Write \"%s\".* to denote all the columns of the relation."
msgstr ""
-#: gram.y:1753
-msgid "FOREIGN KEY/MATCH PARTIAL not yet implemented"
-msgstr ""
-
-#: gram.y:1833
-msgid "CREATE TABLE AS may not specify INTO"
-msgstr "CREATE TABLE AS не может указывать INTO"
-
-#: gram.y:2214
-msgid "CREATE ASSERTION is not yet supported"
-msgstr "CREATE ASSERTION пока не поддерживается"
-
-#: gram.y:2228
-msgid "DROP ASSERTION is not yet supported"
-msgstr "DROP ASSERTION пока не поддерживается"
-
-#: gram.y:2715
-msgid "FETCH / ABSOLUTE not supported, using RELATIVE"
-msgstr ""
-
-#: gram.y:2877 gram.y:2885
-msgid "grant options are not implemented"
-msgstr "grant-опции не поддерживаются"
-
-#: gram.y:3061
-msgid "CREATE FUNCTION / OUT parameters are not supported"
-msgstr "CREATE FUNCTION / OUT параметры не поддерживаются"
-
-#: gram.y:3067
-msgid "CREATE FUNCTION / INOUT parameters are not supported"
-msgstr "CREATE FUNCTION / INOUT параметры не поддерживаются"
-
-#: gram.y:3219
-msgid "parser: argument type missing (use NONE for unary operators)"
-msgstr ""
-
-#: gram.y:3716
+#: parser/parse_target.c:331
#, c-format
-msgid "CREATE DOMAIN / COLLATE %s not yet implemented; clause ignored"
-msgstr ""
-
-#: gram.y:4454
-msgid ""
-"LIMIT #,# syntax not supported.\n"
-"\tUse separate LIMIT and OFFSET clauses."
-msgstr ""
-"Синтаксис LIMIT #,# больше не поддерживается.\n"
-"\tИспользуете LIMIT и OFFSET для этих целей."
-
-#: gram.y:4470
-msgid "LIMIT must not be negative"
-msgstr "LIMIT не должен быть отрицательным"
-
-#: gram.y:4508
-msgid "OFFSET must not be negative"
-msgstr "OFFSET не должен быть отрицательным"
-
-#: gram.y:4650
-msgid ""
-"sub-SELECT in FROM must have an alias\n"
-"\tFor example, FROM (SELECT ...) [AS] foo"
-msgstr ""
+msgid "cannot assign to system attribute \"%s\""
+msgstr "нельзя присвоить значение системному атрибуту \"%s\""
-#: gram.y:5054
-msgid "precision for FLOAT must be at least 1"
+#: parser/parse_target.c:353
+msgid "cannot set an array element to DEFAULT"
msgstr ""
-#: gram.y:5061
-msgid "precision for FLOAT must be less than 16"
-msgstr ""
-
-#: gram.y:5074 gram.y:5087
+#: parser/parse_target.c:420
#, c-format
-msgid "NUMERIC precision %d must be between 1 and %d"
+msgid "column \"%s\" is of type %s but expression is of type %s"
msgstr ""
-#: gram.y:5078
-#, c-format
-msgid "NUMERIC scale %d must be between 0 and precision %d"
+#: parser/parse_target.c:555
+msgid "SELECT * with no tables specified is not valid"
msgstr ""
-#: gram.y:5104 gram.y:5117
+#: parser/parse_type.c:62
#, c-format
-msgid "DECIMAL precision %d must be between 1 and %d"
+msgid "improper %%TYPE reference (too few dotted names): %s"
msgstr ""
-#: gram.y:5108
+#: parser/parse_type.c:83
#, c-format
-msgid "DECIMAL scale %d must be between 0 and precision %d"
+msgid "improper %%TYPE reference (too many dotted names): %s"
msgstr ""
-#: gram.y:5163 gram.y:5237
+#: parser/parse_type.c:103
#, c-format
-msgid "length for type '%s' must be at least 1"
+msgid "type reference %s converted to %s"
msgstr ""
-#: gram.y:5166 gram.y:5240
+#: parser/parse_type.c:206
+#: parser/parse_type.c:237
#, c-format
-msgid "length for type '%s' cannot exceed %d"
-msgstr ""
-
-#: gram.y:5317
-#, c-format
-msgid "TIMESTAMP(%d)%s precision must be between %d and %d"
-msgstr ""
+msgid "type \"%s\" is only a shell"
+msgstr "тип \"%s\" является только оболочкой"
-#: gram.y:5349
+#: parser/parse_type.c:507
#, c-format
-msgid "TIME(%d)%s precision must be between %d and %d"
-msgstr ""
-
-#: gram.y:5499 gram.y:7503 gram.y:7555
-msgid "Unequal number of entries in row expression"
-msgstr ""
+msgid "invalid type name \"%s\""
+msgstr "неверное имя типа \"%s\""
-#: gram.y:5913
-msgid "UNIQUE predicate is not yet implemented"
-msgstr ""
-
-#: gram.y:6142
+#: port/pg_sema.c:117
+#: port/sysv_sema.c:117
#, c-format
-msgid "CURRENT_TIME(%d) precision must be between %d and %d"
-msgstr ""
+msgid "could not create semaphores: %m"
+msgstr "не получилось создать семафоры: %m"
-#: gram.y:6187
+#: port/pg_sema.c:118
+#: port/sysv_sema.c:118
#, c-format
-msgid "CURRENT_TIMESTAMP(%d) precision must be between %d and %d"
+msgid "Failed syscall was semget(%d, %d, 0%o)."
msgstr ""
-#: gram.y:6232
+#: port/pg_sema.c:122
+#: port/sysv_sema.c:122
#, c-format
-msgid "LOCALTIME(%d) precision must be between %d and %d"
+msgid ""
+"This error does *not* mean that you have run out of disk space.\n"
+"It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded. You need to raise the respective kernel parameter. Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its max_connections parameter (currently %d).\n"
+"The PostgreSQL documentation contains more information about configuring your system for PostgreSQL."
msgstr ""
-#: gram.y:6277
+#: port/pg_sema.c:151
+#: port/sysv_sema.c:151
#, c-format
-msgid "LOCALTIMESTAMP(%d) precision must be between %d and %d"
-msgstr ""
-
-#: gram.y:7376
-msgid "OLD used in non-rule query"
-msgstr ""
-
-#: gram.y:7383
-msgid "NEW used in non-rule query"
-msgstr ""
-
-#: y.tab.c:17467
-msgid "parse error; also virtual memory exhausted"
-msgstr ""
-
-#: y.tab.c:17471
-msgid "parse error"
-msgstr ""
-
-#: y.tab.c:17586
-msgid "parser stack overflow"
+msgid "You possibly need to raise your kernel's SEMVMX value to be at least %d. Look into the PostgreSQL documentation for details."
msgstr ""
-#: gram.y:7537
+#: port/pg_shmem.c:92
+#: port/sysv_shmem.c:92
#, c-format
-msgid "Operator '%s' not implemented for row expressions"
-msgstr ""
-
-#: gram.y:7610
-msgid "Wrong number of parameters on left side of OVERLAPS expression"
-msgstr ""
-
-#: gram.y:7615
-msgid "Wrong number of parameters on right side of OVERLAPS expression"
-msgstr ""
-
-#: gram.y:7652
-msgid "Multiple ORDER BY clauses not allowed"
-msgstr ""
-
-#: gram.y:7658
-msgid "Multiple FOR UPDATE clauses not allowed"
-msgstr ""
-
-#: gram.y:7664
-msgid "Multiple OFFSET clauses not allowed"
-msgstr ""
-
-#: gram.y:7670
-msgid "Multiple LIMIT clauses not allowed"
-msgstr ""
-
-#: scan.l:295
-msgid "unterminated /* comment"
-msgstr ""
-
-#: scan.l:323
-msgid "unterminated bit string literal"
-msgstr ""
-
-#: scan.l:342
-msgid "unterminated hexadecimal string literal"
+msgid "could not create shared memory segment: %m"
msgstr ""
-#: scan.l:388
-msgid "unterminated quoted string"
-msgstr ""
-
-#: scan.l:399
-msgid "zero-length delimited identifier"
-msgstr ""
-
-#: scan.l:406 scan.l:562
+#: port/pg_shmem.c:93
+#: port/sysv_shmem.c:93
#, c-format
-msgid "identifier \"%s\" will be truncated to \"%.*s\""
+msgid "Failed syscall was shmget(key=%d, size=%u, 0%o)."
msgstr ""
-#: scan.l:420
-msgid "unterminated quoted identifier"
-msgstr ""
-
-#: scan.l:580
+#: port/pg_shmem.c:97
+#: port/sysv_shmem.c:97
#, c-format
-msgid "parser: %s at end of input"
+msgid ""
+"This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently %u bytes), reduce PostgreSQL's shared_buffers parameter (currently %d) and/or its max_connections parameter (currently %d).\n"
+"If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.\n"
+"The PostgreSQL documentation contains more information about shared memory configuration."
msgstr ""
-#: scan.l:582
+#: port/pg_shmem.c:110
+#: port/sysv_shmem.c:110
#, c-format
-msgid "parser: %s at or near \"%s\" at character %d"
-msgstr ""
-
-#: port/ipc_test.c:93 storage/ipc/ipc.c:171
-msgid "Out of on_shmem_exit slots"
-msgstr ""
-
-#: port/posix_sema.c:168 port/sysv_sema.c:319 port/pg_sema.c:319
-msgid "Out of memory in PGReserveSemaphores"
-msgstr "Недостаточно памяти в PGReserveSemaphores"
-
-#: port/posix_sema.c:205 port/sysv_sema.c:358 port/pg_sema.c:358
-msgid "PGSemaphoreCreate: too many semaphores created"
-msgstr "PGSemaphoreCreate: создано слишком много семафоров"
-
-#: port/beos/support.c:45
-msgid "Error loading BeOS support server : can't create communication ports"
-msgstr ""
-
-#: port/beos/support.c:71
-msgid "Can't load this add-on "
-msgstr ""
-
-#: port/beos/support.c:95
-msgid "Can't load this add-on : map text error"
-msgstr ""
-
-#: port/beos/support.c:111
-msgid "Can't load this add-on : map data error"
+msgid ""
+"This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently %u bytes), reduce PostgreSQL's shared_buffers parameter (currently %d) and/or its max_connections parameter (currently %d).\n"
+"The PostgreSQL documentation contains more information about shared memory configuration."
msgstr ""
-#: port/beos/support.c:129
+#: port/pg_shmem.c:119
+#: port/sysv_shmem.c:119
#, c-format
-msgid "loading symbol '%s' failed "
-msgstr ""
-
-#: port/beos/sem.c:158
-msgid "beos : semctl error : GETNCNT not implemented"
-msgstr ""
-
-#: port/beos/sem.c:173
-msgid "beos : semctl error : unknown flag"
-msgstr ""
-
-#: port/dynloader/beos.c:55
-msgid "add-on not loaded correctly"
-msgstr ""
-
-#: port/dynloader/beos.c:66
-msgid "error while unloading add-on"
-msgstr ""
-
-#: port/dynloader/bsdi.c:59 port/dynloader/linux.c:71
-msgid "dld: Cannot link C library!"
-msgstr ""
-
-#: port/dynloader/bsdi.c:66 port/dynloader/linux.c:78
-msgid "dld: Cannot link math library!"
-msgstr ""
-
-#: port/dynloader/bsdi.c:75 port/dynloader/linux.c:87
-msgid "dld: Undefined:"
+msgid ""
+"This error does *not* mean that you have run out of disk space. It occurs either if all available shared memory IDs have been taken, in which case you need to raise the SHMMNI parameter in your kernel, or because the system's overall limit for shared memory has been reached. If you cannot increase the shared memory limit, reduce PostgreSQL's shared memory request (currently %u bytes), by reducing its shared_buffers parameter (currently %d) and/or its max_connections parameter (currently %d).\n"
+"The PostgreSQL documentation contains more information about shared memory configuration."
msgstr ""
-#: port/dynloader/bsdi.c:78 port/dynloader/linux.c:90
-#: port/dynloader/ultrix4.c:61
+#: postmaster/postmaster.c:327
#, c-format
-msgid " %s"
-msgstr " %s"
+msgid "data directory \"%s\" does not exist"
+msgstr "директория данных \"%s\" не существует"
-#: port/dynloader/linux.c:35
-msgid "dynamic load not supported"
-msgstr ""
-
-#: port/dynloader/ultrix4.c:58
-msgid "dl: Undefined:"
-msgstr ""
-
-#: postmaster/postmaster.c:329
+#: postmaster/postmaster.c:332
#, c-format
-msgid "data directory %s was not found"
+msgid "could not read permissions of directory \"%s\": %m"
msgstr ""
-#: postmaster/postmaster.c:331
+#: postmaster/postmaster.c:347
#, c-format
-msgid "could not read permissions of directory %s: %m"
+msgid "data directory \"%s\" has group or world access"
msgstr ""
-#: postmaster/postmaster.c:336
-#, c-format
-msgid ""
-"data directory %s has group or world access; permissions should be u=rwx "
-"(0700)"
+#: postmaster/postmaster.c:349
+msgid "Permissions should be u=rwx (0700)."
msgstr ""
-#: postmaster/postmaster.c:349
+#: postmaster/postmaster.c:361
#, c-format
msgid ""
-"%s does not find the database system.\n"
+"%s could not find the database system.\n"
"Expected to find it in the PGDATA directory \"%s\",\n"
-"but unable to open file \"%s\": %s\n"
-"\n"
+"but failed to open file \"%s\": %s\n"
msgstr ""
"Модуль %s не нашёл систему баз данных.\n"
"Система ожидалась в PGDATA дириктории - \"%s\",\n"
"но не получилось открыть файл \"%s\": %s\n"
-"\n"
-#: postmaster/postmaster.c:434
-msgid "Assert checking is not compiled in."
+#: postmaster/postmaster.c:459
+#: tcop/postgres.c:2114
+msgid "assert checking is not compiled in"
msgstr ""
-#: postmaster/postmaster.c:540 tcop/postgres.c:1574
-#, c-format
-msgid "--%s requires argument"
-msgstr "--%s требует параметр"
-
-#: postmaster/postmaster.c:542 tcop/postgres.c:1576
-#, c-format
-msgid "-c %s requires argument"
-msgstr "-c %s требует параметр"
-
-#: postmaster/postmaster.c:553 postmaster/postmaster.c:564
-#: postmaster/postmaster.c:632
+#: postmaster/postmaster.c:585
+#: postmaster/postmaster.c:598
#, c-format
msgid "Try '%s --help' for more information.\n"
msgstr "Наберите '%s --help' для более детальной информации.\n"
-#: postmaster/postmaster.c:563
+#: postmaster/postmaster.c:596
#, c-format
-msgid "invalid argument -- %s"
-msgstr "неверный аргумент -- %s"
+msgid "invalid argument: \"%s\""
+msgstr "неверный аргумент: \"%s\""
-#: postmaster/postmaster.c:587
-msgid ""
-"The number of buffers (-B) must be at least twice the number of allowed "
-"connections (-N) and at least 16."
+#: postmaster/postmaster.c:624
+msgid "the number of buffers (-B) must be at least twice the number of allowed connections (-N) and at least 16"
msgstr ""
-#: postmaster/postmaster.c:593
-msgid "superuser_reserved_connections must be less than max_connections."
+#: postmaster/postmaster.c:630
+msgid "superuser_reserved_connections must be less than max_connections"
msgstr ""
-#: postmaster/postmaster.c:611
-#, c-format
-msgid "%s: PostmasterMain: initial environ dump:"
+#: postmaster/postmaster.c:639
+msgid "invalid datetoken tables, please fix"
msgstr ""
-#: postmaster/postmaster.c:612 postmaster/postmaster.c:615
-msgid "-----------------------------------------"
-msgstr ""
-
-#: postmaster/postmaster.c:614 postmaster/postmaster.c:2287
+#: postmaster/postmaster.c:674
+#: tcop/postgres.c:2591
#, c-format
-msgid "\t%s"
-msgstr "\t%s"
+msgid "%s: could not locate postgres executable"
+msgstr ""
-#: postmaster/postmaster.c:622 tcop/postgres.c:1719
-#, c-format
-msgid "%s: could not locate executable, bailing out..."
+#: postmaster/postmaster.c:683
+msgid "for SSL, TCP/IP connections must be enabled"
msgstr ""
-#: postmaster/postmaster.c:631
-msgid "For SSL, TCP/IP connections must be enabled."
+#: postmaster/postmaster.c:757
+#, c-format
+msgid "could not create listen socket for \"%s\""
msgstr ""
-#: postmaster/postmaster.c:678
-msgid "cannot create INET stream port"
+#: postmaster/postmaster.c:776
+msgid "could not create TCP/IP listen socket"
msgstr ""
-#: postmaster/postmaster.c:690
-msgid "cannot create UNIX stream port"
+#: postmaster/postmaster.c:800
+msgid "could not create UNIX stream port"
msgstr ""
-#: postmaster/postmaster.c:810
+#: postmaster/postmaster.c:920
#, c-format
-msgid "fork failed: %s"
-msgstr "fork не удался: %s"
+msgid "could not fork background process: %s"
+msgstr ""
-#: postmaster/postmaster.c:832
+#: postmaster/postmaster.c:942
#, c-format
-msgid "cannot disassociate from controlling TTY: %s"
+msgid "could not disassociate from controlling TTY: %s"
msgstr ""
-#: postmaster/postmaster.c:852
+#: postmaster/postmaster.c:962
#, c-format
msgid ""
"%s is the PostgreSQL server.\n"
@@ -8311,7 +5255,7 @@ msgstr ""
"%s является PostgreSQL сервером.\n"
"\n"
-#: postmaster/postmaster.c:853
+#: postmaster/postmaster.c:963
#, c-format
msgid ""
"Usage:\n"
@@ -8322,84 +5266,75 @@ msgstr ""
" %s [ОПЦИЯ]...\n"
"\n"
-#: postmaster/postmaster.c:854
+#: postmaster/postmaster.c:964
msgid "Options:\n"
msgstr "Опции:\n"
-#: postmaster/postmaster.c:856
+#: postmaster/postmaster.c:966
msgid " -A 1|0 enable/disable run-time assert checking\n"
-msgstr ""
-" -A 1|0 включить/выключить проверку исключительных ситуаций\n"
+msgstr " -A 1|0 включить/выключить проверку исключительных ситуаций\n"
-#: postmaster/postmaster.c:858
-#, c-format
-msgid " -B NBUFFERS number of shared buffers (default %d)\n"
-msgstr " -B ЧБУФЕРОВ чмсло общих буферов (по умолчанию: %d)\n"
+#: postmaster/postmaster.c:968
+msgid " -B NBUFFERS number of shared buffers\n"
+msgstr " -B ЧБУФЕРОВ число общих буферов\n"
-#: postmaster/postmaster.c:859
+#: postmaster/postmaster.c:969
msgid " -c NAME=VALUE set run-time parameter\n"
msgstr " -c ИМЯ=ЗНАЧ. установить параметр выполнения (run-time)\n"
-#: postmaster/postmaster.c:860
+#: postmaster/postmaster.c:970
msgid " -d 1-5 debugging level\n"
msgstr " -d 1-5 уровень отладки\n"
-#: postmaster/postmaster.c:861
+#: postmaster/postmaster.c:971
msgid " -D DATADIR database directory\n"
msgstr " -D ДИРДАННЫХ директория с данными\n"
-#: postmaster/postmaster.c:862
+#: postmaster/postmaster.c:972
msgid " -F turn fsync off\n"
msgstr " -F выуключить fsync\n"
-#: postmaster/postmaster.c:863
+#: postmaster/postmaster.c:973
msgid " -h HOSTNAME host name or IP address to listen on\n"
msgstr " -h ХОСТ имя хоста или IP-адрес для прослушивания\n"
-#: postmaster/postmaster.c:864
+#: postmaster/postmaster.c:974
msgid " -i enable TCP/IP connections\n"
msgstr " -i подключить TCP/IP соединения\n"
-#: postmaster/postmaster.c:865
+#: postmaster/postmaster.c:975
msgid " -k DIRECTORY Unix-domain socket location\n"
msgstr " -k ДИРЕКТОРИЯ Местонахождния unix-domain сокетов\n"
-#: postmaster/postmaster.c:867
+#: postmaster/postmaster.c:977
msgid " -l enable SSL connections\n"
msgstr " -l включить SSL-подсоединения\n"
-#: postmaster/postmaster.c:869
-#, c-format
-msgid " -N MAX-CONNECT maximum number of allowed connections (default %d)\n"
-msgstr ""
-" -N MAX-CONNECT максимально доступное число подсоединений (по умолчанию: %"
-"d)\n"
+#: postmaster/postmaster.c:979
+msgid " -N MAX-CONNECT maximum number of allowed connections\n"
+msgstr " -N MAX-CONNECT максимально доступное число подсоединений\n"
-#: postmaster/postmaster.c:871
+#: postmaster/postmaster.c:980
msgid " -o OPTIONS pass 'OPTIONS' to each backend server\n"
msgstr " -o ОПЦИИ передать 'ОПЦИИ' каждому бэк-енду (серверу)\n"
-#: postmaster/postmaster.c:872
-#, c-format
-msgid " -p PORT port number to listen on (default %d)\n"
-msgstr " -p ПОРТ номер порта для прослушивания (по умолчанию: %d)\n"
+#: postmaster/postmaster.c:981
+msgid " -p PORT port number to listen on\n"
+msgstr " -p ПОРТ номер порта для прослушивания\n"
-#: postmaster/postmaster.c:873
-msgid ""
-" -S silent mode (start in background without logging output)\n"
-msgstr ""
-" -S тихий режим (запустить на заднем плане без логов "
-"результатов)\n"
+#: postmaster/postmaster.c:982
+msgid " -S silent mode (start in background without logging output)\n"
+msgstr " -S тихий режим (запустить на заднем плане без логов результатов)\n"
-#: postmaster/postmaster.c:874
+#: postmaster/postmaster.c:983
msgid " --help show this help, then exit\n"
-msgstr ""
+msgstr " --help показать эту подсказку и выйти\n"
-#: postmaster/postmaster.c:875
+#: postmaster/postmaster.c:984
msgid " --version output version information, then exit\n"
-msgstr ""
+msgstr " --version показать версию и выйти\n"
-#: postmaster/postmaster.c:877
+#: postmaster/postmaster.c:986
msgid ""
"\n"
"Developer options:\n"
@@ -8407,20 +5342,15 @@ msgstr ""
"\n"
"Опции разработчика:\n"
-#: postmaster/postmaster.c:878
-msgid ""
-" -n do not reinitialize shared memory after abnormal exit\n"
-msgstr ""
-" -n не переинициализировать общую память после ненормального "
-"завершения\n"
+#: postmaster/postmaster.c:987
+msgid " -n do not reinitialize shared memory after abnormal exit\n"
+msgstr " -n не переинициализировать общую память после ненормального завершения\n"
-#: postmaster/postmaster.c:879
+#: postmaster/postmaster.c:988
msgid " -s send SIGSTOP to all backend servers if one dies\n"
-msgstr ""
-" -s послать сигнал SIGSTOP всем бэк-ендам (серверам) езли один "
-"из них падает\n"
+msgstr " -s послать сигнал SIGSTOP всем бэк-ендам (серверам) езли один из них падает\n"
-#: postmaster/postmaster.c:881
+#: postmaster/postmaster.c:990
msgid ""
"\n"
"Please read the documentation for the complete list of run-time\n"
@@ -8430,5502 +5360,3724 @@ msgid ""
"Report bugs to <pgsql-bugs@postgresql.org>.\n"
msgstr ""
-#: postmaster/postmaster.c:963
+#: postmaster/postmaster.c:1073
#, c-format
-msgid "ServerLoop: select failed: %m"
+msgid "select failed in postmaster: %m"
msgstr ""
-#: postmaster/postmaster.c:1089 postmaster/postmaster.c:1104
+#: postmaster/postmaster.c:1190
+#: postmaster/postmaster.c:1221
msgid "incomplete startup packet"
msgstr ""
-#: postmaster/postmaster.c:1097
+#: postmaster/postmaster.c:1202
msgid "invalid length of startup packet"
msgstr ""
-#: postmaster/postmaster.c:1137
+#: postmaster/postmaster.c:1254
#, c-format
msgid "failed to send SSL negotiation response: %m"
msgstr ""
-#: postmaster/postmaster.c:1159
-msgid "unsupported frontend protocol"
-msgstr ""
-
-#: postmaster/postmaster.c:1186
-msgid "no PostgreSQL user name specified in startup packet"
-msgstr ""
-
-#: postmaster/postmaster.c:1219
-msgid "The database system is starting up"
-msgstr ""
-
-#: postmaster/postmaster.c:1222
-msgid "The database system is shutting down"
-msgstr ""
-
-#: postmaster/postmaster.c:1225
-msgid "The database system is in recovery mode"
-msgstr ""
-
-#: postmaster/postmaster.c:1228 storage/ipc/sinval.c:52
-#: storage/lmgr/proc.c:219
-msgid "Sorry, too many clients already"
-msgstr ""
-
-#: postmaster/postmaster.c:1258
+#: postmaster/postmaster.c:1283
#, c-format
-msgid "processCancelRequest: CheckPointPID in cancel request for process %d"
+msgid "unsupported frontend protocol %u.%u: server supports %u.0 to %u.%u"
msgstr ""
-#: postmaster/postmaster.c:1272
-#, c-format
-msgid "processing cancel request: sending SIGINT to process %d"
+#: postmaster/postmaster.c:1347
+msgid "invalid startup packet layout: expected terminator as last byte"
msgstr ""
-#: postmaster/postmaster.c:1278
-#, c-format
-msgid "bad key in cancel request for process %d"
-msgstr ""
-
-#: postmaster/postmaster.c:1285
-#, c-format
-msgid "bad pid in cancel request for process %d"
+#: postmaster/postmaster.c:1376
+msgid "no PostgreSQL user name specified in startup packet"
msgstr ""
-#: postmaster/postmaster.c:1328
-msgid "ConnCreate: malloc failed"
-msgstr "ConnCreate: malloc не удался"
+#: postmaster/postmaster.c:1431
+msgid "the database system is starting up"
+msgstr "система баз данных стартует"
-#: postmaster/postmaster.c:1423
-msgid "Received SIGHUP, reloading configuration files"
-msgstr ""
+#: postmaster/postmaster.c:1436
+msgid "the database system is shutting down"
+msgstr "система баз данныз отключается"
-#: postmaster/postmaster.c:1447
-#, c-format
-msgid "pmdie %d"
-msgstr "pmdie %d"
+#: postmaster/postmaster.c:1441
+msgid "the database system is in recovery mode"
+msgstr "система баз данных в режиме восстановления"
-#: postmaster/postmaster.c:1461
-msgid "smart shutdown request"
+#: postmaster/postmaster.c:1446
+#: storage/ipc/sinval.c:54
+#: storage/lmgr/proc.c:226
+msgid "sorry, too many clients already"
msgstr ""
-#: postmaster/postmaster.c:1473 postmaster/postmaster.c:1517
-#, c-format
-msgid "shutdown process %d already running"
+#: postmaster/postmaster.c:1655
+msgid "received SIGHUP, reloading configuration files"
msgstr ""
-#: postmaster/postmaster.c:1491
-msgid "fast shutdown request"
+#: postmaster/postmaster.c:1699
+msgid "received smart shutdown request"
msgstr ""
-#: postmaster/postmaster.c:1497
-msgid "aborting any active transactions"
+#: postmaster/postmaster.c:1730
+msgid "received fast shutdown request"
msgstr ""
-#: postmaster/postmaster.c:1533
-msgid "immediate shutdown request"
+#: postmaster/postmaster.c:1737
+msgid "aborting any active transactions"
msgstr ""
-#: postmaster/postmaster.c:1568
-msgid "reaping dead processes"
+#: postmaster/postmaster.c:1774
+msgid "received immediate shutdown request"
msgstr ""
-#: postmaster/postmaster.c:1585
+#: postmaster/postmaster.c:1831
msgid "statistics collector process"
-msgstr ""
+msgstr "процесс сбора статистики"
-#: postmaster/postmaster.c:1598
+#: postmaster/postmaster.c:1844
msgid "shutdown process"
-msgstr ""
+msgstr "процесс закрытия"
-#: postmaster/postmaster.c:1609
+#: postmaster/postmaster.c:1856
msgid "startup process"
-msgstr ""
+msgstr "процесс запуска"
-#: postmaster/postmaster.c:1611
+#: postmaster/postmaster.c:1859
msgid "aborting startup due to startup process failure"
msgstr ""
-#: postmaster/postmaster.c:1620
-#, c-format
-msgid "startup process %d died while shutdown process %d already running"
+#: postmaster/postmaster.c:1914
+msgid "all server processes terminated; reinitializing"
msgstr ""
-#: postmaster/postmaster.c:1652
-msgid ""
-"all server processes terminated; reinitializing shared memory and semaphores"
-msgstr ""
-
-#: postmaster/postmaster.c:1690
+#: postmaster/postmaster.c:1952
msgid "child process"
-msgstr ""
+msgstr "процесс-сын"
-#: postmaster/postmaster.c:1735
+#: postmaster/postmaster.c:1998
+msgid "checkpoint process"
+msgstr "процесс контольных точек"
+
+#: postmaster/postmaster.c:1999
msgid "server process"
-msgstr ""
+msgstr "процесс сервера"
-#: postmaster/postmaster.c:1736
+#: postmaster/postmaster.c:2002
msgid "terminating any other active server processes"
msgstr ""
-#: postmaster/postmaster.c:1757
-#, c-format
-msgid "CleanupProc: sending %s to process %d"
-msgstr ""
-
-#: postmaster/postmaster.c:1801
+#: postmaster/postmaster.c:2071
#, c-format
msgid "%s (pid %d) exited with exit code %d"
msgstr ""
-#: postmaster/postmaster.c:1804
+#: postmaster/postmaster.c:2080
#, c-format
msgid "%s (pid %d) was terminated by signal %d"
msgstr ""
-#: postmaster/postmaster.c:1807
+#: postmaster/postmaster.c:2089
#, c-format
msgid "%s (pid %d) exited with unexpected status %d"
msgstr ""
-#: postmaster/postmaster.c:1829
-#, c-format
-msgid "SignalChildren: sending signal %d to process %d"
-msgstr ""
-
-#: postmaster/postmaster.c:1867
-msgid "out of memory; connection startup aborted"
-msgstr ""
-
-#: postmaster/postmaster.c:1918
+#: postmaster/postmaster.c:2205
msgid "connection startup failed"
msgstr ""
-#: postmaster/postmaster.c:1935
+#: postmaster/postmaster.c:2221
#, c-format
-msgid "connection startup failed (fork failure): %s"
+msgid "could not fork new process for connection: %m"
msgstr ""
-#: postmaster/postmaster.c:1942
-#, c-format
-msgid "BackendStartup: forked pid=%d socket=%d"
+#: postmaster/postmaster.c:2257
+msgid "could not fork new process for connection: "
msgstr ""
-#: postmaster/postmaster.c:1976
-msgid "Server process fork() failed: "
-msgstr ""
-
-#: postmaster/postmaster.c:2123
+#: postmaster/postmaster.c:2388
#, c-format
-msgid "connection received: host=%s port=%hu"
+msgid "connection received: host=%s port=%s"
msgstr ""
-#: postmaster/postmaster.c:2143
+#: postmaster/postmaster.c:2450
#, c-format
-msgid "connection received: host=%s"
+msgid "connection authorized: user=%s database=%s"
msgstr ""
-#: postmaster/postmaster.c:2163
-msgid "DoBackend: Unable to set timer for auth timeout"
+#: postmaster/postmaster.c:2610
+#, c-format
+msgid "checkpoints are occurring too frequently (%d seconds apart)"
msgstr ""
-#: postmaster/postmaster.c:2192
-msgid "DoBackend: Unable to disable timer for auth timeout"
+#: postmaster/postmaster.c:2612
+msgid "Consider increasing CHECKPOINT_SEGMENTS."
msgstr ""
-#: postmaster/postmaster.c:2196
+#: postmaster/postmaster.c:2880
#, c-format
-msgid "connection authorized: user=%s database=%s"
+msgid "could not fork startup process: %m"
msgstr ""
-#: postmaster/postmaster.c:2285
+#: postmaster/postmaster.c:2884
#, c-format
-msgid "%s child[%d]: starting with ("
+msgid "could not fork checkpoint process: %m"
msgstr ""
-#: postmaster/postmaster.c:2288
-msgid ")"
-msgstr ")"
-
-#: postmaster/postmaster.c:2350
+#: postmaster/postmaster.c:2888
#, c-format
-msgid ""
-"Checkpoint segments are being created too frequently (%d secs)\n"
-"\tConsider increasing CHECKPOINT_SEGMENTS"
+msgid "could not fork shutdown process: %m"
msgstr ""
-#: postmaster/postmaster.c:2608
+#: postmaster/postmaster.c:2892
#, c-format
-msgid "could not launch startup process (fork failure): %m"
+msgid "could not fork process: %m"
msgstr ""
-#: postmaster/postmaster.c:2611
+#: postmaster/pgstat.c:200
#, c-format
-msgid "could not launch checkpoint process (fork failure): %m"
+msgid "could not resolve \"localhost\": %s"
msgstr ""
-#: postmaster/postmaster.c:2614
+#: postmaster/pgstat.c:220
#, c-format
-msgid "could not launch shutdown process (fork failure): %m"
+msgid "could not create socket for statistics: %m"
msgstr ""
-#: postmaster/postmaster.c:2638
-msgid "CheckPointDataBase: malloc failed"
-msgstr "CheckPointDataBase: malloc не удался"
-
-#: postmaster/postmaster.c:2677
-#, c-format
-msgid "cannot create file %s: %s"
-msgstr "не получилось создать файл %s: %s"
-
-#: postmaster/postmaster.c:2689
+#: postmaster/pgstat.c:232
#, c-format
-msgid "writing file %s failed"
-msgstr "запись файл %s не удалась"
-
-#: postmaster/pgstat.c:178
-#, c-format
-msgid "PGSTAT: socket() failed: %m"
-msgstr "PGSTAT: socket() не удался: %m"
-
-#: postmaster/pgstat.c:192
-#, c-format
-msgid "PGSTAT: bind(127.0.0.1) failed: %m"
-msgstr "PGSTAT: bind(127.0.0.1) не удался: %m"
-
-#: postmaster/pgstat.c:197
-#, c-format
-msgid "PGSTAT: getsockname() failed: %m"
-msgstr "PGSTAT: getsockname() не удался: %m"
+msgid "could not bind socket for statistics: %m"
+msgstr ""
-#: postmaster/pgstat.c:209
+#: postmaster/pgstat.c:244
#, c-format
-msgid "PGSTAT: connect() failed: %m"
-msgstr "PGSTAT: connect() не удался: %m"
+msgid "could not get address of socket for statistics: %m"
+msgstr ""
-#: postmaster/pgstat.c:221
+#: postmaster/pgstat.c:258
#, c-format
-msgid "PGSTAT: fcntl() failed: %m"
-msgstr "PGSTAT: fcntl() не удался: %m"
+msgid "could not connect socket for statistics: %m"
+msgstr ""
-#: postmaster/pgstat.c:230 postmaster/pgstat.c:1158
+#: postmaster/pgstat.c:272
#, c-format
-msgid "PGSTAT: pipe() failed: %m"
-msgstr "PGSTAT: pipe() не удался: %m"
-
-#: postmaster/pgstat.c:273
-msgid "PGSTAT: statistics collector startup skipped"
+msgid "could not set statistics socket to nonblock mode: %m"
msgstr ""
-#: postmaster/pgstat.c:296 postmaster/pgstat.c:1165
+#: postmaster/pgstat.c:283
#, c-format
-msgid "PGSTAT: fork() failed: %m"
-msgstr "PGSTAT: fork() не удался: %m"
-
-#: postmaster/pgstat.c:697
-msgid "Only database superusers can reset statistic counters"
+msgid "could not create pipe for statistics collector: %m"
msgstr ""
-#: postmaster/pgstat.c:764 postmaster/pgstat.c:773 postmaster/pgstat.c:820
-#: postmaster/pgstat.c:830
-msgid "PGSTATBE: malloc() failed"
+#: postmaster/pgstat.c:344
+msgid "statistics collector startup skipped"
msgstr ""
-#: postmaster/pgstat.c:1219
-msgid "PGSTAT: Creation of dead backend hash table failed"
+#: postmaster/pgstat.c:375
+#, c-format
+msgid "could not fork statistics buffer: %m"
msgstr ""
-#: postmaster/pgstat.c:1230
-msgid "PGSTAT: Allocation of backend table failed"
+#: postmaster/pgstat.c:785
+msgid "must be superuser to reset statistics counters"
msgstr ""
-#: postmaster/pgstat.c:1294
-#, c-format
-msgid "PGSTAT: select() failed: %m"
-msgstr "PGSTAT: select() не удался: %m"
-
-#: postmaster/pgstat.c:1334
+#: postmaster/pgstat.c:1266
#, c-format
-msgid "PGSTAT: read() failed: %m"
-msgstr "PGSTAT: read() не удался: %m"
-
-#: postmaster/pgstat.c:1352
-msgid "PGSTAT: bogus message length"
+msgid "could not create pipe for statistics buffer: %m"
msgstr ""
-#: postmaster/pgstat.c:1502
+#: postmaster/pgstat.c:1274
#, c-format
-msgid "PGSTATBUFF: fcntl() failed: %m"
+msgid "could not fork statistics collector: %m"
msgstr ""
-#: postmaster/pgstat.c:1512
-msgid "PGSTATBUFF: malloc() failed"
+#: postmaster/pgstat.c:1331
+#: postmaster/pgstat.c:1634
+#: postmaster/pgstat.c:1902
+#: postmaster/pgstat.c:1934
+#: postmaster/pgstat.c:1988
+#: postmaster/pgstat.c:2249
+#: postmaster/pgstat.c:2310
+#: postmaster/pgstat.c:2356
+#: postmaster/pgstat.c:2407
+#: postmaster/pgstat.c:2636
+#: postmaster/pgstat.c:2818
+msgid "out of memory in statistics collector --- abort"
msgstr ""
-#: postmaster/pgstat.c:1539
-msgid "PGSTATBUFF: Warning - receive buffer full"
+#: postmaster/pgstat.c:1343
+msgid "allocation of backend table failed"
msgstr ""
-#: postmaster/pgstat.c:1570
+#: postmaster/pgstat.c:1409
#, c-format
-msgid "PGSTATBUFF: select() failed: %m"
+msgid "select failed in statistics collector: %m"
msgstr ""
-#: postmaster/pgstat.c:1586
+#: postmaster/pgstat.c:1451
#, c-format
-msgid "PGSTATBUFF: recvfrom() failed: %m"
+msgid "could not read from statistics pipe: %m"
msgstr ""
-#: postmaster/pgstat.c:1661
-#, c-format
-msgid "PGSTATBUFF: write() failed: %m"
+#: postmaster/pgstat.c:1470
+msgid "invalid statistics message length"
msgstr ""
-#: postmaster/pgstat.c:1714
+#: postmaster/pgstat.c:1622
#, c-format