PG-552: Remove unnecessary columns from PostgreSQL 11 and 12 views.

There was a typo while checking the PostgreSQL version in the SQL file. This commit
will fix the typo, and only the necessary columns will be visible in the view.
This commit is contained in:
Ibrar Ahmed
2022-11-15 17:10:42 +00:00
parent db5a6aa30e
commit 40afdce2eb
3 changed files with 22 additions and 20 deletions

View File

@@ -1627,7 +1627,7 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
elog(ERROR, "pg_stat_monitor: return type must be a row type");
if (tupdesc->natts != 50)
if (tupdesc->natts != 51)
elog(ERROR, "pg_stat_monitor: incorrect number of output arguments, required %d", tupdesc->natts);
tupstore = tuplestore_begin_heap(true, false, work_mem);
@@ -1772,7 +1772,10 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
values[i++] = CStringGetTextDatum("<insufficient privilege>");
}
/* parentid at column number 8 */
/* state at column number 8 */
values[i++] = Int64GetDatumFast(tmp.state);
/* parentid at column number 9 */
if (tmp.info.parentid != UINT64CONST(0))
{
snprintf(parentid_txt, 32, "%08lX", tmp.info.parentid);