Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff43b3e

Browse files
committed
Sync our DTrace infrastructure with c.h's definition of type bool.
Since commitd26a810, we've defined bool as being either _Bool from<stdbool.h>, or "unsigned char"; but that commit overlooked the factthat probes.d has "#define bool char". For consistency, make it say"unsigned char" instead. This should be strictly a cosmetic change,but it seems best to be in sync.Formally, in the now-normal case where we're using <stdbool.h>, it'dbe better to write "#define bool _Bool". However, then we'd needsome build infrastructure to inject that configuration choice intoprobes.d, and it doesn't seem worth the trouble. We only use<stdbool.h> if sizeof(_Bool) is 1, so having DTrace think thatbool parameters are "unsigned char" should be close enough.Back-patch to v12 whered26a810 came in.Discussion:https://postgr.es/m/CAA4eK1LmaKO7Du9M9Lo=kxGU8sB6aL8fa3sF6z6d5yYYVe3BuQ@mail.gmail.com
1 parentd40abd5 commitff43b3e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎doc/src/sgml/monitoring.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4638,7 +4638,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
46384638
</row>
46394639
<row>
46404640
<entry><type>bool</type></entry>
4641-
<entry><type>char</type></entry>
4641+
<entry><type>unsignedchar</type></entry>
46424642
</row>
46434643

46444644
</tbody>

‎src/backend/utils/probes.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99

1010

1111
/*
12-
* Typedefs used in PostgreSQL.
12+
* Typedefs used in PostgreSQL probes.
1313
*
1414
* NOTE: Do not use system-provided typedefs (e.g. uintptr_t, uint32_t, etc)
15-
* in probe definitions, as they cause compilation errors on macOS 10.5.
15+
* in probe definitions, as they cause compilation errors on macOS.
1616
*/
1717
#defineLocalTransactionId unsigned int
1818
#defineLWLockMode int
1919
#defineLOCKMODE int
2020
#defineBlockNumber unsigned int
2121
#defineOid unsigned int
2222
#defineForkNumber int
23-
#definebool char
23+
#defineboolunsignedchar
2424

2525
providerpostgresql {
2626

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp