Use LOCKMODE in parse_relation.c/.h - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Use LOCKMODE in parse_relation.c/.h
Date
Msg-id 4bcd65fb-2497-484c-bb41-83cb435eb64d@eisentraut.org
Whole thread Raw
Responses Re: Use LOCKMODE in parse_relation.c/.h
Re: Use LOCKMODE in parse_relation.c/.h
List pgsql-hackers
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.

Attachment

pgsql-hackers by date:

Previous
From: Siddharth Kothari
Date:
Subject: [PATCH] Add RetrieveInstrumentation hook for CustomScan providers
Next
From: Anthonin Bonnefoy
Date:
Subject: Re: Don't keep closed WAL segment in page cache after replay