Use LOCKMODE in parse_relation.c/.h
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-02-18T09:50:38Z
Lists: pgsql-hackers
Attachments
- 0001-Use-LOCKMODE-in-parse_relation.c-.h.patch (text/plain) patch 0001
There are 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.
Commits
-
Use LOCKMODE in parse_relation.c/.h
- aca61f7e5f8a 19 (unreleased) landed
-
Don't include low level locking code from frontend code.
- 4eda0a647057 9.6.0 cited
-
Add a bunch of new error location reports to parse-analysis error messages.
- b153c0920960 8.4.0 cited