| From: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
|---|---|
| To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | possibly outdated pg_file_read() errhint |
| Date: | 2021-02-04 01:48:35 |
| Message-ID: | 01742E65-5ED3-4184-B5E2-441E870ECD5D@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hackers,
The following errhint in pg_read_file() makes little sense:
errhint("Consider using %s, which is part of core, instead.",
"pg_file_read()")));
Grep'ing through master, there is almost nothing named pg_file_read, and what does exist is dropped when upgrading to adminpack 2.0:
Perhaps this errhint made sense at some point in the past? It looks like core only uses this C-function named "pg_read_file" by the SQL function named "pg_read_file_old", but adminpack-1.0 also used it for a SQL function named pg_file_read, which gets dropped in the adminpack--1.1--2.0.sql upgrade file. If you haven't upgraded adminpack, it makes little sense to call adminpack's pg_file_read() function and get a hint telling you to instead use pg_file_read(). But calling pg_read_file_old() and being told to use pg_file_read() instead also doesn't make sense, because it doesn't exist.
I was going to submit a patch for this, but the more I look at it the less I understand what is intended by this code. Thoughts?
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | tsunakawa.takay@fujitsu.com | 2021-02-04 01:50:01 | RE: libpq debug log |
| Previous Message | Zhihong Yu | 2021-02-04 01:35:34 | Re: WIP: BRIN multi-range indexes |