| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Use LOCKMODE in parse_relation.c/.h |
| Date: | 2026-02-23 20:26:10 |
| Message-ID: | E1vucVO-000sJM-1B@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Use LOCKMODE in parse_relation.c/.h
There were a couple of comments in parse_relation.c
> Note: properly, lockmode should be declared LOCKMODE not int, but that
> would require importing storage/lock.h into parse_relation.h. Since
> LOCKMODE is typedef'd as int anyway, that seems like overkill.
but actually LOCKMODE has been in storage/lockdefs.h for a while,
which is intentionally a more narrow header. So we can include that
one in parse_relation.h and just use LOCKMODE normally.
An alternative would be to add a duplicate typedef into
parse_relation.h, but that doesn't seem necessary here.
Reviewed-by: Andreas Karlsson <andreas(at)proxel(dot)se>
Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/4bcd65fb-2497-484c-bb41-83cb435eb64d%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/aca61f7e5f8a8a96865d33d0a6f993bf346f47db
Modified Files
--------------
src/backend/parser/parse_relation.c | 12 ++----------
src/include/parser/parse_relation.h | 5 +++--
2 files changed, 5 insertions(+), 12 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-02-23 20:30:56 | pgsql: Work around lgamma(NaN) bug on AIX. |
| Previous Message | Jacob Champion | 2026-02-23 18:58:07 | pgsql: libpq: Grease the protocol by default |