Thread
Commits
-
doc: Update info on information schema usage tables
- 1a4d714e1812 14.11 landed
- 74a1bb168dd5 15.6 landed
- 1dac2dd6779a 16.2 landed
- 5b2dcead3990 17.0 landed
-
INFORMATION_SCHEMA.routine_column_usage
Erki Eessaar <erki.eessaar@taltech.ee> — 2023-11-24T11:04:09Z
Hello Here https://www.postgresql.org/docs/current/infoschema-routine-column-usage.html it is stated that "The view routine_column_usage is meant to identify all columns that are used by a function or procedure. This information is currently not tracked by PostgreSQL." However, this claim is incorrect because the view provides information about the column usage of SQL functions that have SQL-standard function body. CREATE TABLE Person (person_id SERIAL, given_name VARCHAR(50) NOT NULL, reg_time TIMESTAMP(0) NOT NULL DEFAULT LOCALTIMESTAMP(0), CONSTRAINT pk_person PRIMARY KEY (person_id)); CREATE FUNCTION f_reg_person(p_given_name Person.given_name%TYPE) RETURNS Person.person_id%TYPE LANGUAGE SQL SECURITY DEFINER BEGIN ATOMIC INSERT INTO Person (given_name) VALUES (p_given_name) RETURNING person_id; END; SELECT * FROM Information_schema.routine_column_usage; Returns information about two columns - person_id and given_name. Perhaps the better wording is: The view routine_column_usage is meant to identify all columns that are used by a function or procedure. This information is tracked by PostgreSQL in case of routines that have SQL-standard function body. Best regards Erki Eessaar
-
Re: INFORMATION_SCHEMA.routine_column_usage
Peter Eisentraut <peter@eisentraut.org> — 2023-11-29T14:01:00Z
> Here > https://www.postgresql.org/docs/current/infoschema-routine-column-usage.html <https://www.postgresql.org/docs/current/infoschema-routine-column-usage.html> > > it is stated that "The view |routine_column_usage| is meant to identify > all columns that are used by a function or procedure. This information > is currently not tracked by PostgreSQL." > > However, this claim is incorrect because the view provides information > about the column usage of SQL functions that have SQL-standard function > body. Correct, the documentation was not updated when this was added. A few other views are similarly affected. How about this attached patch.
-
Re: INFORMATION_SCHEMA.routine_column_usage
Peter Eisentraut <peter@eisentraut.org> — 2023-12-01T07:53:50Z
On 29.11.23 15:01, Peter Eisentraut wrote: >> Here >> https://www.postgresql.org/docs/current/infoschema-routine-column-usage.html <https://www.postgresql.org/docs/current/infoschema-routine-column-usage.html> >> >> it is stated that "The view |routine_column_usage| is meant to >> identify all columns that are used by a function or procedure. This >> information is currently not tracked by PostgreSQL." >> >> However, this claim is incorrect because the view provides information >> about the column usage of SQL functions that have SQL-standard >> function body. > > Correct, the documentation was not updated when this was added. A few > other views are similarly affected. How about this attached patch. Fix committed.