Wrong error message in REINDEX command

Started by Masahiko Sawadaabout 11 years ago2 messageshackers
Jump to latest
#1Masahiko Sawada
sawada.mshk@gmail.com

Hi,

I got wrong error message when I did REINDEX SYSTEM command in
transaction as follows.
It should say "ERROR: REINDEX SYSTEM cannot run inside a transaction block"
Attached patch fixes it.

[postgres][5432](1)=# begin;
BEGIN
[postgres][5432](1)=# reindex system postgres;
ERROR: REINDEX DATABASE cannot run inside a transaction block
STATEMENT: reindex system postgres;

Regards,

-------
Sawada Masahiko

Attachments:

fix_reindex_error_message.patchapplication/octet-stream; name=fix_reindex_error_message.patchDownload+2-1
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Masahiko Sawada (#1)
Re: Wrong error message in REINDEX command

Sawada Masahiko <sawada.mshk@gmail.com> writes:

I got wrong error message when I did REINDEX SYSTEM command in
transaction as follows.
It should say "ERROR: REINDEX SYSTEM cannot run inside a transaction block"
Attached patch fixes it.

Hm, yeah, looks like ReindexObject() has a similar disease internally
(not to mention being very inappropriately named itself...)

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers