diff --git a/doc/src/sgml/ref/prepare_transaction.sgml b/doc/src/sgml/ref/prepare_transaction.sgml index b8b8d8aca83149f23c3451bd938f5e264c75c396..da304c72550adbaeb0deabd0767cf12e873d2b16 100644 --- a/doc/src/sgml/ref/prepare_transaction.sgml +++ b/doc/src/sgml/ref/prepare_transaction.sgml @@ -1,5 +1,5 @@ @@ -82,6 +82,15 @@ PREPARE TRANSACTION transaction_id Notes + + PREPARE TRANSACTION is not intended for use in applications + or interactive sessions. It's purpose is to allow an external + transaction manager to perform atomic global transactions across multiple + databases or other transactional resources. Unless you're writing a + transaction manager, you probably shouldn't be using PREPARE + TRANSACTION. + + This command must be used inside a transaction block. Use to start one. diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index da2011074ba2a8034cc29a1067d787e38c092fbf..cecd88d522ad6bcc13e3ea460611963328e8a03e 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2010, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.191 2010/01/22 16:40:19 rhaas Exp $ + * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.192 2010/01/25 18:23:09 heikki Exp $ */ /*---------------------------------------------------------------------- @@ -1882,6 +1882,11 @@ psql_completion(char *text, int start, int end) COMPLETE_WITH_LIST(list_PREPARE); } +/* + * PREPARE TRANSACTION is missing on purpose. It's intended for transaction + * managers, not for manual use in interactive sessions. + */ + /* REASSIGN OWNED BY xxx TO yyy */ else if (pg_strcasecmp(prev_wd, "REASSIGN") == 0) COMPLETE_WITH_CONST("OWNED");