Fix pgstattuple functions to use regclass-type as the argument.
Fujii Masao <fujii@postgresql.org>
Fix pgstattuple functions to use regclass-type as the argument. This allows us to specify the target relation with several expressions, 'relname', 'schemaname.relname' and OID in all pgstattuple functions. pgstatindex() and pg_relpages() could not accept OID as the argument so far. Per discussion on -hackers, we decided to keep two types of interfaces, with regclass-type and TEXT-type argument, for each pgstattuple function because of the backward-compatibility issue. The functions which have TEXT-type argument will be deprecated in the future release. Patch by Satoshi Nagayasu, reviewed by Rushabh Lathia and Fujii Masao.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pgstattuple/expected/pgstattuple.out | modified | +84 −0 |
| contrib/pgstattuple/Makefile | modified | +1 −1 |
| contrib/pgstattuple/pgstatindex.c | modified | +66 −6 |
| contrib/pgstattuple/pgstattuple--1.1--1.2.sql | added | +39 −0 |
| contrib/pgstattuple/pgstattuple--1.2.sql (from contrib/pgstattuple/pgstattuple--1.1.sql) | renamed | +35 −14 |
| contrib/pgstattuple/pgstattuple.control | modified | +1 −1 |
| contrib/pgstattuple/sql/pgstattuple.sql | modified | +14 −0 |
| doc/src/sgml/pgstattuple.sgml | modified | +40 −7 |