| From: | Japin Li <japinli(at)hotmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Terminology: "temporary relation" vs "temporary table" in tablecmds.c |
| Date: | 2026-07-03 01:57:46 |
| Message-ID: | SY7PR01MB10921620E06C3131409AB2FABB6F42@SY7PR01MB10921.ausprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
While reviewing the global temporary table patch [1], I noticed
inconsistent terminology in tablecmds.c, where both "temporary relation"
and "temporary table" appear.
$ rg 'temporary table|temporary relation' src/backend/commands/tablecmds.c
856: errmsg("ON COMMIT can only be used on temporary tables")));
893: errmsg("cannot create temporary table within security-restricted operation")));
1608: * Note that for temporary relations this lock may get upgraded later
1609: * on, but as no other session can access a temporary relation, this
2514: errmsg("cannot truncate temporary tables of other sessions")));
2789: errmsg("cannot create a temporary relation as partition of permanent relation \"%s\"",
2798: ? "cannot inherit from temporary relation \"%s\""
2799: : "cannot create a permanent relation as partition of temporary relation \"%s\"",
2807: ? "cannot inherit from temporary relation of another session"
2808: : "cannot create as partition of temporary relation of another session")));
3807: errmsg("cannot move temporary tables of other sessions")));
4551: errmsg("cannot alter temporary tables of other sessions")));
6005: /* Build a temporary relation and copy data */
6040: errmsg("cannot rewrite temporary tables of other sessions")));
10294: errmsg("constraints on temporary tables may reference only temporary tables")));
10298: errmsg("constraints on temporary tables must involve temporary tables of this session")));
17817: errmsg("cannot inherit from temporary relation \"%s\"",
17824: errmsg("cannot inherit from temporary relation of another session")));
17830: errmsg("cannot inherit to temporary relation of another session")));
20995: errmsg("cannot attach a temporary relation as partition of permanent relation \"%s\"",
21003: errmsg("cannot attach a permanent relation as partition of temporary relation \"%s\"",
21010: errmsg("cannot attach as partition of temporary relation of another session")));
21016: errmsg("cannot attach temporary relation of another session as partition")));
23053: errmsg("cannot create as partition of temporary relation of another session"));
23082: errmsg("cannot create a temporary relation as partition of permanent relation \"%s\"",
23090: errmsg("cannot create a permanent relation as partition of temporary relation \"%s\"",˜J
Given that these paths are table-specific, I suggest we prefer "temporary table"
for user-facing messages to keep the terminology consistent and user-friendly.
Any thoughts?
--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ewan Young | 2026-07-03 02:07:46 | Re: satisfies_hash_partition crash |
| Previous Message | Xuneng Zhou | 2026-07-03 01:24:19 | Re: BUG: ReadStream look-ahead exhausts local buffers when effective_io_concurrency>=64 |