pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgindent vs dtrace on macos
21+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2020-09-22 c4133ec169  Exclude fmgrprotos.h from pgindent processing.
  2020-09-21 f859c2ffa0  Fix a few more generator scripts to produce pgindent-clean output.
  2020-09-17 74d4608f50  Further improve pgindent's list of file exclusions.
  2020-09-17 add105840b  Improve formatting of create_help.pl and plperl_opmask.pl output.
* pgindent vs dtrace on macos
@ 2020-05-20 09:52  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 2 replies; 21+ messages in thread

From: Peter Eisentraut @ 2020-05-20 09:52 UTC (permalink / raw)
  To: pgsql-hackers

If I run pgindent on a built tree on macos, I get this error

Failure in ./src/backend/utils/probes.h: Error@375: Stuff missing from 
end of file

The file in question is built by the dtrace command.  I have attached it 
here.

Is this something to fix in pgindent?  Or should this file be excluded, 
since it's generated?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

probes.h (text/plain, 45.9K) download /* * Generated by dtrace(1M). */ #ifndef _PROBES_H_TMP #define _PROBES_H_TMP #include <unistd.h> #ifdef __cplusplus extern "C" { #endif #define TRACE_POSTGRESQL_STABILITY "___dtrace_stability$postgresql$v1$1_1_0_1_1_0_1_1_0_1_1_0_1_1_0" #define TRACE_POSTGRESQL_TYPEDEFS "___dtrace_typedefs$postgresql$v2" #if !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_DONE() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__checkpoint__done$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__checkpoint__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__checkpoint__start$v1$696e74(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__checkpoint__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__checkpoint__sync__start$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__checkpoint__sync__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_FLUSH_DONE(arg0, arg1, arg2, arg3, arg4) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__flush__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(arg0, arg1, arg2, arg3, arg4); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_FLUSH_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__flush__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_FLUSH_START(arg0, arg1, arg2, arg3, arg4) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__flush__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(arg0, arg1, arg2, arg3, arg4); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_FLUSH_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__flush__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_READ_DONE(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__read__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$756e7369676e65642063686172$756e7369676e65642063686172(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_READ_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__read__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_READ_START(arg0, arg1, arg2, arg3, arg4, arg5, arg6) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__read__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$756e7369676e65642063686172(arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_READ_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__read__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_SYNC_DONE(arg0, arg1, arg2) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__sync__done$v1$696e74$696e74$696e74(arg0, arg1, arg2); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__sync__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_SYNC_START(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__sync__start$v1$696e74$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__sync__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_SYNC_WRITTEN(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__sync__written$v1$696e74(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_WRITTEN_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__sync__written$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_DONE(arg0, arg1, arg2, arg3, arg4) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__write__dirty__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(arg0, arg1, arg2, arg3, arg4); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__write__dirty__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START(arg0, arg1, arg2, arg3, arg4) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$buffer__write__dirty__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(arg0, arg1, arg2, arg3, arg4); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$buffer__write__dirty__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_CHECKPOINT_DONE(arg0, arg1, arg2, arg3, arg4) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$checkpoint__done$v1$696e74$696e74$696e74$696e74$696e74(arg0, arg1, arg2, arg3, arg4); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_CHECKPOINT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$checkpoint__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_CHECKPOINT_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$checkpoint__start$v1$696e74(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_CHECKPOINT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$checkpoint__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_DONE(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$clog__checkpoint__done$v1$756e7369676e65642063686172(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$clog__checkpoint__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$clog__checkpoint__start$v1$756e7369676e65642063686172(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$clog__checkpoint__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_DEADLOCK_FOUND() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$deadlock__found$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_DEADLOCK_FOUND_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$deadlock__found$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LOCK_WAIT_DONE(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lock__wait__done$v1$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(arg0, arg1, arg2, arg3, arg4, arg5); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LOCK_WAIT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lock__wait__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LOCK_WAIT_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lock__wait__start$v1$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(arg0, arg1, arg2, arg3, arg4, arg5); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LOCK_WAIT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lock__wait__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__acquire$v1$63686172202a$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__acquire$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__acquire__or__wait$v1$63686172202a$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__acquire__or__wait$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_FAIL(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__acquire__or__wait__fail$v1$63686172202a$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_FAIL_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__acquire__or__wait__fail$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__condacquire$v1$63686172202a$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__condacquire$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE_FAIL(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__condacquire__fail$v1$63686172202a$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE_FAIL_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__condacquire__fail$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_RELEASE(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__release$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_RELEASE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__release$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_WAIT_DONE(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__wait__done$v1$63686172202a$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_WAIT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__wait__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_LWLOCK_WAIT_START(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$lwlock__wait__start$v1$63686172202a$696e74(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_WAIT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$lwlock__wait__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_DONE(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$multixact__checkpoint__done$v1$756e7369676e65642063686172(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$multixact__checkpoint__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$multixact__checkpoint__start$v1$756e7369676e65642063686172(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$multixact__checkpoint__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_DONE(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__done$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_EXECUTE_DONE() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__execute__done$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_EXECUTE_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__execute__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_EXECUTE_START() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__execute__start$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_EXECUTE_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__execute__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_PARSE_DONE(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__parse__done$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_PARSE_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__parse__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_PARSE_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__parse__start$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_PARSE_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__parse__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_PLAN_DONE() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__plan__done$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_PLAN_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__plan__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_PLAN_START() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__plan__start$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_PLAN_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__plan__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_REWRITE_DONE(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__rewrite__done$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_REWRITE_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__rewrite__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_REWRITE_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__rewrite__start$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_REWRITE_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__rewrite__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_QUERY_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$query__start$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_QUERY_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$query__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SMGR_MD_READ_DONE(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$smgr__md__read__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$696e74$696e74(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_READ_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$smgr__md__read__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SMGR_MD_READ_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$smgr__md__read__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(arg0, arg1, arg2, arg3, arg4, arg5); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_READ_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$smgr__md__read__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_DONE(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$smgr__md__write__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$696e74$696e74(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$smgr__md__write__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$smgr__md__write__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(arg0, arg1, arg2, arg3, arg4, arg5); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$smgr__md__write__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SORT_DONE(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$sort__done$v1$756e7369676e65642063686172$6c6f6e67(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SORT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$sort__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SORT_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$sort__start$v1$696e74$756e7369676e65642063686172$696e74$696e74$756e7369676e65642063686172$696e74(arg0, arg1, arg2, arg3, arg4, arg5); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SORT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$sort__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_STATEMENT_STATUS(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$statement__status$v1$63686172202a(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_STATEMENT_STATUS_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$statement__status$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_DONE(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$subtrans__checkpoint__done$v1$756e7369676e65642063686172(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$subtrans__checkpoint__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$subtrans__checkpoint__start$v1$756e7369676e65642063686172(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$subtrans__checkpoint__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_TRANSACTION_ABORT(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$transaction__abort$v1$756e7369676e656420696e74(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_TRANSACTION_ABORT_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$transaction__abort$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_TRANSACTION_COMMIT(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$transaction__commit$v1$756e7369676e656420696e74(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_TRANSACTION_COMMIT_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$transaction__commit$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_TRANSACTION_START(arg0) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$transaction__start$v1$756e7369676e656420696e74(arg0); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_TRANSACTION_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$transaction__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_DONE() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$twophase__checkpoint__done$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$twophase__checkpoint__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$twophase__checkpoint__start$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$twophase__checkpoint__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_DONE() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$wal__buffer__write__dirty__done$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_DONE_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$wal__buffer__write__dirty__done$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_START() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$wal__buffer__write__dirty__start$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_START_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$wal__buffer__write__dirty__start$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_WAL_INSERT(arg0, arg1) \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$wal__insert$v1$756e7369676e65642063686172$756e7369676e65642063686172(arg0, arg1); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_WAL_INSERT_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$wal__insert$v1(); \ __asm__ volatile(""); \ _r; }) #define TRACE_POSTGRESQL_WAL_SWITCH() \ do { \ __asm__ volatile(".reference " TRACE_POSTGRESQL_TYPEDEFS); \ __dtrace_probe$postgresql$wal__switch$v1(); \ __asm__ volatile(".reference " TRACE_POSTGRESQL_STABILITY); \ } while (0) #define TRACE_POSTGRESQL_WAL_SWITCH_ENABLED() \ ({ int _r = __dtrace_isenabled$postgresql$wal__switch$v1(); \ __asm__ volatile(""); \ _r; }) extern void __dtrace_probe$postgresql$buffer__checkpoint__done$v1(void); extern int __dtrace_isenabled$postgresql$buffer__checkpoint__done$v1(void); extern void __dtrace_probe$postgresql$buffer__checkpoint__start$v1$696e74(int); extern int __dtrace_isenabled$postgresql$buffer__checkpoint__start$v1(void); extern void __dtrace_probe$postgresql$buffer__checkpoint__sync__start$v1(void); extern int __dtrace_isenabled$postgresql$buffer__checkpoint__sync__start$v1(void); extern void __dtrace_probe$postgresql$buffer__flush__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(int, unsigned int, unsigned int, unsigned int, unsigned int); extern int __dtrace_isenabled$postgresql$buffer__flush__done$v1(void); extern void __dtrace_probe$postgresql$buffer__flush__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(int, unsigned int, unsigned int, unsigned int, unsigned int); extern int __dtrace_isenabled$postgresql$buffer__flush__start$v1(void); extern void __dtrace_probe$postgresql$buffer__read__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$756e7369676e65642063686172$756e7369676e65642063686172(int, unsigned int, unsigned int, unsigned int, unsigned int, int, unsigned char, unsigned char); extern int __dtrace_isenabled$postgresql$buffer__read__done$v1(void); extern void __dtrace_probe$postgresql$buffer__read__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$756e7369676e65642063686172(int, unsigned int, unsigned int, unsigned int, unsigned int, int, unsigned char); extern int __dtrace_isenabled$postgresql$buffer__read__start$v1(void); extern void __dtrace_probe$postgresql$buffer__sync__done$v1$696e74$696e74$696e74(int, int, int); extern int __dtrace_isenabled$postgresql$buffer__sync__done$v1(void); extern void __dtrace_probe$postgresql$buffer__sync__start$v1$696e74$696e74(int, int); extern int __dtrace_isenabled$postgresql$buffer__sync__start$v1(void); extern void __dtrace_probe$postgresql$buffer__sync__written$v1$696e74(int); extern int __dtrace_isenabled$postgresql$buffer__sync__written$v1(void); extern void __dtrace_probe$postgresql$buffer__write__dirty__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(int, unsigned int, unsigned int, unsigned int, unsigned int); extern int __dtrace_isenabled$postgresql$buffer__write__dirty__done$v1(void); extern void __dtrace_probe$postgresql$buffer__write__dirty__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74(int, unsigned int, unsigned int, unsigned int, unsigned int); extern int __dtrace_isenabled$postgresql$buffer__write__dirty__start$v1(void); extern void __dtrace_probe$postgresql$checkpoint__done$v1$696e74$696e74$696e74$696e74$696e74(int, int, int, int, int); extern int __dtrace_isenabled$postgresql$checkpoint__done$v1(void); extern void __dtrace_probe$postgresql$checkpoint__start$v1$696e74(int); extern int __dtrace_isenabled$postgresql$checkpoint__start$v1(void); extern void __dtrace_probe$postgresql$clog__checkpoint__done$v1$756e7369676e65642063686172(unsigned char); extern int __dtrace_isenabled$postgresql$clog__checkpoint__done$v1(void); extern void __dtrace_probe$postgresql$clog__checkpoint__start$v1$756e7369676e65642063686172(unsigned char); extern int __dtrace_isenabled$postgresql$clog__checkpoint__start$v1(void); extern void __dtrace_probe$postgresql$deadlock__found$v1(void); extern int __dtrace_isenabled$postgresql$deadlock__found$v1(void); extern void __dtrace_probe$postgresql$lock__wait__done$v1$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int); extern int __dtrace_isenabled$postgresql$lock__wait__done$v1(void); extern void __dtrace_probe$postgresql$lock__wait__start$v1$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int); extern int __dtrace_isenabled$postgresql$lock__wait__start$v1(void); extern void __dtrace_probe$postgresql$lwlock__acquire$v1$63686172202a$696e74(const char *, int); extern int __dtrace_isenabled$postgresql$lwlock__acquire$v1(void); extern void __dtrace_probe$postgresql$lwlock__acquire__or__wait$v1$63686172202a$696e74(const char *, int); extern int __dtrace_isenabled$postgresql$lwlock__acquire__or__wait$v1(void); extern void __dtrace_probe$postgresql$lwlock__acquire__or__wait__fail$v1$63686172202a$696e74(const char *, int); extern int __dtrace_isenabled$postgresql$lwlock__acquire__or__wait__fail$v1(void); extern void __dtrace_probe$postgresql$lwlock__condacquire$v1$63686172202a$696e74(const char *, int); extern int __dtrace_isenabled$postgresql$lwlock__condacquire$v1(void); extern void __dtrace_probe$postgresql$lwlock__condacquire__fail$v1$63686172202a$696e74(const char *, int); extern int __dtrace_isenabled$postgresql$lwlock__condacquire__fail$v1(void); extern void __dtrace_probe$postgresql$lwlock__release$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$lwlock__release$v1(void); extern void __dtrace_probe$postgresql$lwlock__wait__done$v1$63686172202a$696e74(const char *, int); extern int __dtrace_isenabled$postgresql$lwlock__wait__done$v1(void); extern void __dtrace_probe$postgresql$lwlock__wait__start$v1$63686172202a$696e74(const char *, int); extern int __dtrace_isenabled$postgresql$lwlock__wait__start$v1(void); extern void __dtrace_probe$postgresql$multixact__checkpoint__done$v1$756e7369676e65642063686172(unsigned char); extern int __dtrace_isenabled$postgresql$multixact__checkpoint__done$v1(void); extern void __dtrace_probe$postgresql$multixact__checkpoint__start$v1$756e7369676e65642063686172(unsigned char); extern int __dtrace_isenabled$postgresql$multixact__checkpoint__start$v1(void); extern void __dtrace_probe$postgresql$query__done$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$query__done$v1(void); extern void __dtrace_probe$postgresql$query__execute__done$v1(void); extern int __dtrace_isenabled$postgresql$query__execute__done$v1(void); extern void __dtrace_probe$postgresql$query__execute__start$v1(void); extern int __dtrace_isenabled$postgresql$query__execute__start$v1(void); extern void __dtrace_probe$postgresql$query__parse__done$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$query__parse__done$v1(void); extern void __dtrace_probe$postgresql$query__parse__start$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$query__parse__start$v1(void); extern void __dtrace_probe$postgresql$query__plan__done$v1(void); extern int __dtrace_isenabled$postgresql$query__plan__done$v1(void); extern void __dtrace_probe$postgresql$query__plan__start$v1(void); extern int __dtrace_isenabled$postgresql$query__plan__start$v1(void); extern void __dtrace_probe$postgresql$query__rewrite__done$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$query__rewrite__done$v1(void); extern void __dtrace_probe$postgresql$query__rewrite__start$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$query__rewrite__start$v1(void); extern void __dtrace_probe$postgresql$query__start$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$query__start$v1(void); extern void __dtrace_probe$postgresql$smgr__md__read__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$696e74$696e74(int, unsigned int, unsigned int, unsigned int, unsigned int, int, int, int); extern int __dtrace_isenabled$postgresql$smgr__md__read__done$v1(void); extern void __dtrace_probe$postgresql$smgr__md__read__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(int, unsigned int, unsigned int, unsigned int, unsigned int, int); extern int __dtrace_isenabled$postgresql$smgr__md__read__start$v1(void); extern void __dtrace_probe$postgresql$smgr__md__write__done$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74$696e74$696e74(int, unsigned int, unsigned int, unsigned int, unsigned int, int, int, int); extern int __dtrace_isenabled$postgresql$smgr__md__write__done$v1(void); extern void __dtrace_probe$postgresql$smgr__md__write__start$v1$696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$756e7369676e656420696e74$696e74(int, unsigned int, unsigned int, unsigned int, unsigned int, int); extern int __dtrace_isenabled$postgresql$smgr__md__write__start$v1(void); extern void __dtrace_probe$postgresql$sort__done$v1$756e7369676e65642063686172$6c6f6e67(unsigned char, long); extern int __dtrace_isenabled$postgresql$sort__done$v1(void); extern void __dtrace_probe$postgresql$sort__start$v1$696e74$756e7369676e65642063686172$696e74$696e74$756e7369676e65642063686172$696e74(int, unsigned char, int, int, unsigned char, int); extern int __dtrace_isenabled$postgresql$sort__start$v1(void); extern void __dtrace_probe$postgresql$statement__status$v1$63686172202a(const char *); extern int __dtrace_isenabled$postgresql$statement__status$v1(void); extern void __dtrace_probe$postgresql$subtrans__checkpoint__done$v1$756e7369676e65642063686172(unsigned char); extern int __dtrace_isenabled$postgresql$subtrans__checkpoint__done$v1(void); extern void __dtrace_probe$postgresql$subtrans__checkpoint__start$v1$756e7369676e65642063686172(unsigned char); extern int __dtrace_isenabled$postgresql$subtrans__checkpoint__start$v1(void); extern void __dtrace_probe$postgresql$transaction__abort$v1$756e7369676e656420696e74(unsigned int); extern int __dtrace_isenabled$postgresql$transaction__abort$v1(void); extern void __dtrace_probe$postgresql$transaction__commit$v1$756e7369676e656420696e74(unsigned int); extern int __dtrace_isenabled$postgresql$transaction__commit$v1(void); extern void __dtrace_probe$postgresql$transaction__start$v1$756e7369676e656420696e74(unsigned int); extern int __dtrace_isenabled$postgresql$transaction__start$v1(void); extern void __dtrace_probe$postgresql$twophase__checkpoint__done$v1(void); extern int __dtrace_isenabled$postgresql$twophase__checkpoint__done$v1(void); extern void __dtrace_probe$postgresql$twophase__checkpoint__start$v1(void); extern int __dtrace_isenabled$postgresql$twophase__checkpoint__start$v1(void); extern void __dtrace_probe$postgresql$wal__buffer__write__dirty__done$v1(void); extern int __dtrace_isenabled$postgresql$wal__buffer__write__dirty__done$v1(void); extern void __dtrace_probe$postgresql$wal__buffer__write__dirty__start$v1(void); extern int __dtrace_isenabled$postgresql$wal__buffer__write__dirty__start$v1(void); extern void __dtrace_probe$postgresql$wal__insert$v1$756e7369676e65642063686172$756e7369676e65642063686172(unsigned char, unsigned char); extern int __dtrace_isenabled$postgresql$wal__insert$v1(void); extern void __dtrace_probe$postgresql$wal__switch$v1(void); extern int __dtrace_isenabled$postgresql$wal__switch$v1(void); #else #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_DONE() \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_START_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START() \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_FLUSH_DONE(arg0, arg1, arg2, arg3, arg4) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_FLUSH_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_FLUSH_START(arg0, arg1, arg2, arg3, arg4) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_FLUSH_START_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_READ_DONE(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_READ_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_READ_START(arg0, arg1, arg2, arg3, arg4, arg5, arg6) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_READ_START_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_DONE(arg0, arg1, arg2) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_START(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_START_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_WRITTEN(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_SYNC_WRITTEN_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_DONE(arg0, arg1, arg2, arg3, arg4) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START(arg0, arg1, arg2, arg3, arg4) \ do { \ } while (0) #define TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START_ENABLED() (0) #define TRACE_POSTGRESQL_CHECKPOINT_DONE(arg0, arg1, arg2, arg3, arg4) \ do { \ } while (0) #define TRACE_POSTGRESQL_CHECKPOINT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_CHECKPOINT_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_CHECKPOINT_START_ENABLED() (0) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_DONE(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_CLOG_CHECKPOINT_START_ENABLED() (0) #define TRACE_POSTGRESQL_DEADLOCK_FOUND() \ do { \ } while (0) #define TRACE_POSTGRESQL_DEADLOCK_FOUND_ENABLED() (0) #define TRACE_POSTGRESQL_LOCK_WAIT_DONE(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ } while (0) #define TRACE_POSTGRESQL_LOCK_WAIT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_LOCK_WAIT_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ } while (0) #define TRACE_POSTGRESQL_LOCK_WAIT_START_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_FAIL(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_FAIL_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE_FAIL(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE_FAIL_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_RELEASE(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_RELEASE_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_WAIT_DONE(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_WAIT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_LWLOCK_WAIT_START(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_LWLOCK_WAIT_START_ENABLED() (0) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_DONE(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_MULTIXACT_CHECKPOINT_START_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_DONE(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_EXECUTE_DONE() \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_EXECUTE_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_EXECUTE_START() \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_EXECUTE_START_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_PARSE_DONE(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_PARSE_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_PARSE_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_PARSE_START_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_PLAN_DONE() \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_PLAN_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_PLAN_START() \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_PLAN_START_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_REWRITE_DONE(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_REWRITE_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_REWRITE_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_REWRITE_START_ENABLED() (0) #define TRACE_POSTGRESQL_QUERY_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_QUERY_START_ENABLED() (0) #define TRACE_POSTGRESQL_SMGR_MD_READ_DONE(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ do { \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_READ_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_SMGR_MD_READ_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_READ_START_ENABLED() (0) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_DONE(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ do { \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ } while (0) #define TRACE_POSTGRESQL_SMGR_MD_WRITE_START_ENABLED() (0) #define TRACE_POSTGRESQL_SORT_DONE(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_SORT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_SORT_START(arg0, arg1, arg2, arg3, arg4, arg5) \ do { \ } while (0) #define TRACE_POSTGRESQL_SORT_START_ENABLED() (0) #define TRACE_POSTGRESQL_STATEMENT_STATUS(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_STATEMENT_STATUS_ENABLED() (0) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_DONE(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_START_ENABLED() (0) #define TRACE_POSTGRESQL_TRANSACTION_ABORT(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_TRANSACTION_ABORT_ENABLED() (0) #define TRACE_POSTGRESQL_TRANSACTION_COMMIT(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_TRANSACTION_COMMIT_ENABLED() (0) #define TRACE_POSTGRESQL_TRANSACTION_START(arg0) \ do { \ } while (0) #define TRACE_POSTGRESQL_TRANSACTION_START_ENABLED() (0) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_DONE() \ do { \ } while (0) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START() \ do { \ } while (0) #define TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START_ENABLED() (0) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_DONE() \ do { \ } while (0) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_DONE_ENABLED() (0) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_START() \ do { \ } while (0) #define TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_START_ENABLED() (0) #define TRACE_POSTGRESQL_WAL_INSERT(arg0, arg1) \ do { \ } while (0) #define TRACE_POSTGRESQL_WAL_INSERT_ENABLED() (0) #define TRACE_POSTGRESQL_WAL_SWITCH() \ do { \ } while (0) #define TRACE_POSTGRESQL_WAL_SWITCH_ENABLED() (0) #endif /* !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED */ #ifdef __cplusplus } #endif #endif /* _PROBES_H_TMP */
^ permalink raw reply [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-05-20 10:01  Daniel Gustafsson <daniel@yesql.se>
  parent: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  1 sibling, 0 replies; 21+ messages in thread

From: Daniel Gustafsson @ 2020-05-20 10:01 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: pgsql-hackers

> On 20 May 2020, at 11:52, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

> Or should this file be excluded, since it's generated?

That would get my vote.  Generated files where we don't control the generator
can be excluded.

cheers ./daniel




^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-05-20 13:56  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  1 sibling, 1 reply; 21+ messages in thread

From: Tom Lane @ 2020-05-20 13:56 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: pgsql-hackers

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> If I run pgindent on a built tree on macos, I get this error
> Failure in ./src/backend/utils/probes.h: Error@375: Stuff missing from 
> end of file
> The file in question is built by the dtrace command.  I have attached it 
> here.
> Is this something to fix in pgindent?  Or should this file be excluded, 
> since it's generated?

Hm, there's nothing obviously wrong with the file.  But since it's
generated by code not under our control, we should exclude it.
And given that, it's probably not worth figuring out why it breaks
pgindent.

On a closely related point: I was confused for awhile on Monday
afternoon, wondering why the built tarballs didn't match my local
tree.  I eventually realized that when I'd run pgindent on Saturday,
it had reformatted some generated files such as
src/bin/psql/sql_help.h, causing those not to match the freshly-made
ones in the tarball.  I wonder if we should make an effort to ensure
that our generated .h and .c files always satisfy pgindent.  If not,
we probably should exclude them too.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-05-22 09:29  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Peter Eisentraut @ 2020-05-22 09:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers

On 2020-05-20 15:56, Tom Lane wrote:
> On a closely related point: I was confused for awhile on Monday
> afternoon, wondering why the built tarballs didn't match my local
> tree.  I eventually realized that when I'd run pgindent on Saturday,
> it had reformatted some generated files such as
> src/bin/psql/sql_help.h, causing those not to match the freshly-made
> ones in the tarball.  I wonder if we should make an effort to ensure
> that our generated .h and .c files always satisfy pgindent.

We should generally try to do that, if only so that they don't appear 
weird and random when looking at them.

I think in the past it would have been very difficult for a generation 
script to emulate pgindent's weird un-indentation logic on trailing 
lines, but that shouldn't be a problem anymore.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-16 21:17  Daniel Gustafsson <daniel@yesql.se>
  parent: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Daniel Gustafsson @ 2020-09-16 21:17 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers

> On 22 May 2020, at 11:29, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
> On 2020-05-20 15:56, Tom Lane wrote:

>> I wonder if we should make an effort to ensure
>> that our generated .h and .c files always satisfy pgindent.
> 
> We should generally try to do that, if only so that they don't appear weird and random when looking at them.

The attached patch fixes the generation of sql_help.h and perl_opmask.h to make
sure they conform to pgindent.  Those were the only file I got diffs in after a
pgindent run apart from fmgrprotos.h which gave the below:

@@ -912,7 +912,7 @@
 extern Datum interval_mul(PG_FUNCTION_ARGS);
 extern Datum pg_typeof(PG_FUNCTION_ARGS);
 extern Datum ascii(PG_FUNCTION_ARGS);
-extern Datum chr(PG_FUNCTION_ARGS);
+extern Datum chr (PG_FUNCTION_ARGS);
 extern Datum repeat(PG_FUNCTION_ARGS);
 extern Datum similar_escape(PG_FUNCTION_ARGS);
 extern Datum mul_d_interval(PG_FUNCTION_ARGS);
@@ -968,7 +968,7 @@
 extern Datum bitsubstr_no_len(PG_FUNCTION_ARGS);
 extern Datum numeric_in(PG_FUNCTION_ARGS);
 extern Datum numeric_out(PG_FUNCTION_ARGS);
-extern Datum numeric(PG_FUNCTION_ARGS);
+extern Datum numeric (PG_FUNCTION_ARGS);
 extern Datum numeric_abs(PG_FUNCTION_ARGS);
 extern Datum numeric_sign(PG_FUNCTION_ARGS);
 extern Datum numeric_round(PG_FUNCTION_ARGS);

Not sure what pgindent is doing there, but it seems hard to address in the
generator.

probes.h is also added to the exclusion list in the patch.  On that note, I
wonder if we should add the plperl .xs generated files as exclusions too since
we don't control that generator?

cheers ./daniel

Attachments:

pgindent_gen_headers.patch (application/octet-stream, 3.3K) download From 251f9c67304f785d4577648b1e7b14c66e3b64ba Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson <daniel@yesql.se> Date: Tue, 15 Sep 2020 16:28:49 +0200 Subject: [PATCH] Ensure that generated headers follow pgindent rules Headers which are generated by tools inside the repository should follow pgindent rules to avoid surprises. Also make sure to exclude probes.h which can be generated by an external tool. Discussion: https://postgr.es/m/79ed5348-be7a-b647-dd40-742207186a22@2ndquadrant.com --- src/bin/psql/create_help.pl | 13 +++++++------ src/pl/plperl/plperl_opmask.pl | 2 +- src/tools/pgindent/README | 3 +++ src/tools/pgindent/exclude_file_patterns | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl index ee82e64583..8b9266f22e 100644 --- a/src/bin/psql/create_help.pl +++ b/src/bin/psql/create_help.pl @@ -63,11 +63,12 @@ print $hfile_handle "/* struct _helpStruct { - const char *cmd; /* the command name */ - const char *help; /* the help associated with it */ - const char *docbook_id; /* DocBook XML id (for generating URL) */ - void (*syntaxfunc)(PQExpBuffer); /* function that prints the syntax associated with it */ - int nl_count; /* number of newlines in syntax (for pager) */ + const char *cmd; /* the command name */ + const char *help; /* the help associated with it */ + const char *docbook_id; /* DocBook XML id (for generating URL) */ + void (*syntaxfunc) (PQExpBuffer); /* function that prints the + * syntax associated with it */ + int nl_count; /* number of newlines in syntax (for pager) */ }; extern const struct _helpStruct QL_HELP[]; @@ -210,7 +211,7 @@ print $hfile_handle " #define QL_MAX_CMD_LEN $maxlen /* largest strlen(cmd) */ -#endif /* $define */ +#endif /* $define */ "; close $cfile_handle; diff --git a/src/pl/plperl/plperl_opmask.pl b/src/pl/plperl/plperl_opmask.pl index 3b33112ff9..ee18e91528 100644 --- a/src/pl/plperl/plperl_opmask.pl +++ b/src/pl/plperl/plperl_opmask.pl @@ -52,7 +52,7 @@ foreach my $opname (opset_to_ops(opset(@allowed_ops))) printf $fh qq{ opmask[OP_%-12s] = 0;\t/* %s */ \\\n}, uc($opname), opdesc($opname); } -printf $fh " /* end */ \n"; +printf $fh " /* end */\n"; close $fh or die "Error closing $plperl_opmask_tmp: $!"; diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README index 8eb15fafb9..e35091aa54 100644 --- a/src/tools/pgindent/README +++ b/src/tools/pgindent/README @@ -157,6 +157,9 @@ are excluded because those files are imported from an external project, not maintained locally, and are machine-generated anyway. Likewise for plperl/ppport.h. +src/backend/utils/probes.h and src/include/utils/probes.h are excluded +because those files are machine-generated. + The perltidy run processes all *.pl and *.pm files, plus a few executable Perl scripts that are not named that way. See the "find" diff --git a/src/tools/pgindent/exclude_file_patterns b/src/tools/pgindent/exclude_file_patterns index c8efc9a913..a8f1a92f4b 100644 --- a/src/tools/pgindent/exclude_file_patterns +++ b/src/tools/pgindent/exclude_file_patterns @@ -6,5 +6,6 @@ /snowball/libstemmer/ /pl/plperl/ppport\.h$ /jit/llvmjit\.h$ +/utils/probes\.h$ /tmp_check/ /tmp_install/ -- 2.21.1 (Apple Git-122.3) =
^ permalink raw reply [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-16 23:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 3 replies; 21+ messages in thread

From: Tom Lane @ 2020-09-16 23:55 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

Daniel Gustafsson <daniel@yesql.se> writes:
> The attached patch fixes the generation of sql_help.h and perl_opmask.h to make
> sure they conform to pgindent.  Those were the only file I got diffs in after a
> pgindent run apart from fmgrprotos.h which gave the below:

Hmm, I seem to recall there were more when this happened to me back in
May.  But in any case, fixing these is an improvement.

> Not sure what pgindent is doing there, but it seems hard to address in the
> generator.

I think the issue is that pgindent believes "numeric" and "chr" are
typedefs.  (The regex code can be blamed for "chr", but I'm not quite
sure where "numeric" is coming from.)  Observe that it also messes up
the definitions of those two functions, not only their extern
declarations.

We could try adding those names to the typedef exclusion list in pgindent,
but that could easily make things worse not better overall.  On balance
I'd say this particular behavior is a pgindent bug, and if anybody is hot
to remove the discrepancy then they ought to try to fix pgindent not the
fmgrprotos generator.

> probes.h is also added to the exclusion list in the patch.

Check.

> On that note, I
> wonder if we should add the plperl .xs generated files as exclusions too since
> we don't control that generator?

Not an issue I don't think; pgindent won't touch extensions other than
.c and .h.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-17 00:03  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 1 reply; 21+ messages in thread

From: Alvaro Herrera @ 2020-09-17 00:03 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Gustafsson <daniel@yesql.se>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

On 2020-Sep-16, Tom Lane wrote:

> Daniel Gustafsson <daniel@yesql.se> writes:

> > Not sure what pgindent is doing there, but it seems hard to address in the
> > generator.
> 
> I think the issue is that pgindent believes "numeric" and "chr" are
> typedefs.  (The regex code can be blamed for "chr", but I'm not quite
> sure where "numeric" is coming from.)

It's in src/interfaces/ecpg/include/pgtypes_numeric.h

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-17 00:34  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 0 replies; 21+ messages in thread

From: Tom Lane @ 2020-09-17 00:34 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

I wrote:
> Daniel Gustafsson <daniel@yesql.se> writes:
>> The attached patch fixes the generation of sql_help.h and perl_opmask.h to make
>> sure they conform to pgindent.  Those were the only file I got diffs in after a
>> pgindent run apart from fmgrprotos.h which gave the below:

> Hmm, I seem to recall there were more when this happened to me back in
> May.  But in any case, fixing these is an improvement.

Experimenting with this patch soon found one additional case: sql_help.c,
also emitted by create_help.pl, also needs some whitespace help.
I do not recall if there are other places, but fixing these is
surely a step forward.  I fixed the sql_help.c output and pushed it.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-17 00:39  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2020-09-17 00:39 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Daniel Gustafsson <daniel@yesql.se>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2020-Sep-16, Tom Lane wrote:
>> I think the issue is that pgindent believes "numeric" and "chr" are
>> typedefs.  (The regex code can be blamed for "chr", but I'm not quite
>> sure where "numeric" is coming from.)

> It's in src/interfaces/ecpg/include/pgtypes_numeric.h

It strikes me that a low-cost workaround would be to rename these
C functions.  There's no law that their C names must match the
SQL names.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-17 08:15  Daniel Gustafsson <daniel@yesql.se>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 1 reply; 21+ messages in thread

From: Daniel Gustafsson @ 2020-09-17 08:15 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

>>> The attached patch fixes the generation of sql_help.h and perl_opmask.h to make
>>> sure they conform to pgindent.  Those were the only file I got diffs in after a
>>> pgindent run apart from fmgrprotos.h which gave the below:
> 
>> Hmm, I seem to recall there were more when this happened to me back in
>> May.  But in any case, fixing these is an improvement.
> 
> Experimenting with this patch soon found one additional case: sql_help.c,
> also emitted by create_help.pl, also needs some whitespace help.
> I do not recall if there are other places, but fixing these is
> surely a step forward.  I fixed the sql_help.c output and pushed it.

Thanks!  I think a bug for .c and .h files with matching names in my small
script testing for discrepancies hid that one.

>> On that note, I
>> wonder if we should add the plperl .xs generated files as exclusions too since
>> we don't control that generator?
> 
> Not an issue I don't think; pgindent won't touch extensions other than
> .c and .h.

Sorry for being unclear, I meant the generated .c counterpart of the .xs file.
So something like the below:

inline patch 1: src/tools/pgindent/exclude_file_patterns (+2/-0 lines) download inline-1.patch--- a/src/tools/pgindent/exclude_file_patterns +++ b/src/tools/pgindent/exclude_file_patterns @@ -5,6 +5,8 @@ /ecpg/test/expected/ /snowball/libstemmer/ /pl/plperl/ppport\.h$ +/pl/plperl/SPI\.c$ +/pl/plperl/Util\.c$ /jit/llvmjit\.h$ /utils/probes\.h$ /tmp_check/
cheers ./daniel ^ permalink raw reply [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-17 15:39  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2020-09-17 15:39 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

Daniel Gustafsson <daniel@yesql.se> writes:
>>> On that note, I
>>> wonder if we should add the plperl .xs generated files as exclusions too since
>>> we don't control that generator?

>> Not an issue I don't think; pgindent won't touch extensions other than
>> .c and .h.

> Sorry for being unclear, I meant the generated .c counterpart of the .xs file.

Oh, I see.  Not sure.  For myself, I only care about files that survive
"make distclean" and get into a tarball, which those don't.  On the
other hand, if we fixed perlchunks.h and plperl_opmask.h then it's hard
to argue with worrying about SPI.c and Util.c, as those all have the
same lifespan.

I tried redoing the experiment of pgindenting all the tarball member
files, and found that we still have diffs in these generated files:

src/backend/utils/sort/qsort_tuple.c
src/common/kwlist_d.h 
src/interfaces/ecpg/preproc/c_kwlist_d.h 
src/interfaces/ecpg/preproc/ecpg_kwlist_d.h
src/pl/plpgsql/src/pl_reserved_kwlist_d.h 
src/pl/plpgsql/src/pl_unreserved_kwlist_d.h
src/pl/plpgsql/src/plerrcodes.h
src/pl/plpython/spiexceptions.h
src/pl/tcl/pltclerrcodes.h

To my eyes, what pgindent does to the *kwlist_d.h files is rather ugly,
so I'm inclined to make them exclusions rather than adjust the generator
script.  The others seem like we could tweak the relevant generators
fairly easily.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-17 18:20  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2020-09-17 18:20 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

I went ahead and added SPI.c, Util.c, and the *kwlist_d.h headers
to the exclusion list.  I then tried to run pgindent in a completely
built-out development directory (not distclean'ed, which is the way
I'd always used it before).  This found a few more exclusions we
need to have if we want to allow for that usage.  Pushed the lot.

We still have to deal with

src/backend/utils/sort/qsort_tuple.c
src/pl/plpgsql/src/plerrcodes.h
src/pl/plpython/spiexceptions.h
src/pl/tcl/pltclerrcodes.h

if we want to be entirely clean about this.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-21 17:59  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2020-09-21 17:59 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

I wrote:
> We still have to deal with
> src/backend/utils/sort/qsort_tuple.c
> src/pl/plpgsql/src/plerrcodes.h
> src/pl/plpython/spiexceptions.h
> src/pl/tcl/pltclerrcodes.h
> if we want to be entirely clean about this.

I took care of those, so I think we're done here.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-21 18:14  Daniel Gustafsson <daniel@yesql.se>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 21+ messages in thread

From: Daniel Gustafsson @ 2020-09-21 18:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

> On 21 Sep 2020, at 19:59, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> I wrote:
>> We still have to deal with
>> src/backend/utils/sort/qsort_tuple.c
>> src/pl/plpgsql/src/plerrcodes.h
>> src/pl/plpython/spiexceptions.h
>> src/pl/tcl/pltclerrcodes.h
>> if we want to be entirely clean about this.
> 
> I took care of those, so I think we're done here.

Aha, thanks!  They were still on my TODO but I got distracted by a shiny object
or two.  Thanks for fixing.

cheers ./daniel




^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-21 18:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 21+ messages in thread

From: Tom Lane @ 2020-09-21 18:55 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

Oh wait, I forgot about the fmgrprotos.h discrepancy.

I wrote:
> It strikes me that a low-cost workaround would be to rename these
> C functions.  There's no law that their C names must match the
> SQL names.

Here's a proposed patch to fix it that way.

			regards, tom lane

Attachments:

rename-C-functions-to-avoid-pgindent-funnies.patch (text/x-diff, 2.0K) download diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 27d65557df..2cc2da60eb 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -1109,7 +1109,7 @@ numeric_support(PG_FUNCTION_ARGS) * scale of the attribute have to be applied on the value. */ Datum -numeric (PG_FUNCTION_ARGS) +numeric_apply_typmod(PG_FUNCTION_ARGS) { Numeric num = PG_GETARG_NUMERIC(0); int32 typmod = PG_GETARG_INT32(1); diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c index 76e666474e..79ba28671f 100644 --- a/src/backend/utils/adt/oracle_compat.c +++ b/src/backend/utils/adt/oracle_compat.c @@ -923,7 +923,7 @@ ascii(PG_FUNCTION_ARGS) ********************************************************************/ Datum -chr (PG_FUNCTION_ARGS) +chr_code_to_text(PG_FUNCTION_ARGS) { uint32 cvalue = PG_GETARG_UINT32(0); text *result; diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index f48f5fb4d9..5eb293ee8f 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -3399,7 +3399,7 @@ prosrc => 'ascii' }, { oid => '1621', descr => 'convert int4 to char', proname => 'chr', prorettype => 'text', proargtypes => 'int4', - prosrc => 'chr' }, + prosrc => 'chr_code_to_text' }, { oid => '1622', descr => 'replicate string n times', proname => 'repeat', prorettype => 'text', proargtypes => 'text int4', prosrc => 'repeat' }, @@ -4210,7 +4210,8 @@ proargtypes => 'internal', prosrc => 'numeric_support' }, { oid => '1703', descr => 'adjust numeric to typmod precision/scale', proname => 'numeric', prosupport => 'numeric_support', - prorettype => 'numeric', proargtypes => 'numeric int4', prosrc => 'numeric' }, + prorettype => 'numeric', proargtypes => 'numeric int4', + prosrc => 'numeric_apply_typmod' }, { oid => '1704', proname => 'numeric_abs', prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_abs' },
^ permalink raw reply [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-21 19:08  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 21+ messages in thread

From: Alvaro Herrera @ 2020-09-21 19:08 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Gustafsson <daniel@yesql.se>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

On 2020-Sep-21, Tom Lane wrote:

> Oh wait, I forgot about the fmgrprotos.h discrepancy.
> 
> I wrote:
> > It strikes me that a low-cost workaround would be to rename these
> > C functions.  There's no law that their C names must match the
> > SQL names.
> 
> Here's a proposed patch to fix it that way.

pgtypes_numeric.h still contains

typedef struct
{
    int         ndigits;        /* number of digits in digits[] - can be 0! */
    int         weight;         /* weight of first digit */
    int         rscale;         /* result scale */
    int         dscale;         /* display scale */
    int         sign;           /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
    NumericDigit *buf;          /* start of alloc'd space for digits[] */
    NumericDigit *digits;       /* decimal digits */
} numeric;

... isn't this more likely to create a typedef entry than merely a
function name?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-21 19:21  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2020-09-21 19:21 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Daniel Gustafsson <daniel@yesql.se>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2020-Sep-21, Tom Lane wrote:
>> Here's a proposed patch to fix it that way.

> pgtypes_numeric.h still contains
> typedef struct
> {
> } numeric;

> ... isn't this more likely to create a typedef entry than merely a
> function name?

Well, yeah, it *is* a typedef.  My proposal is to rename the C function
to avoid the conflict, rather than renaming the typedef.  Given the
small number of direct calls (none), that's a lot less work.  Also,
I think pgtypes_numeric.h is exposed to ecpg client code, so changing
that typedef's name could be quite problematic.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-21 19:37  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 21+ messages in thread

From: Alvaro Herrera @ 2020-09-21 19:37 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Gustafsson <daniel@yesql.se>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

On 2020-Sep-21, Tom Lane wrote:

> > ... isn't this more likely to create a typedef entry than merely a
> > function name?
> 
> Well, yeah, it *is* a typedef.  My proposal is to rename the C function
> to avoid the conflict, rather than renaming the typedef.  Given the
> small number of direct calls (none), that's a lot less work.  Also,
> I think pgtypes_numeric.h is exposed to ecpg client code, so changing
> that typedef's name could be quite problematic.

Ah, of course.

The idea of adding the names to pgindent's %blacklist results in severe
uglification, particularly in the regex code, so +1 for your workaround.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-22 08:25  Daniel Gustafsson <daniel@yesql.se>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 21+ messages in thread

From: Daniel Gustafsson @ 2020-09-22 08:25 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

> On 21 Sep 2020, at 20:55, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> Oh wait, I forgot about the fmgrprotos.h discrepancy.
> 
> I wrote:
>> It strikes me that a low-cost workaround would be to rename these
>> C functions.  There's no law that their C names must match the
>> SQL names.
> 
> Here's a proposed patch to fix it that way.

+1 on this patch.  Do you think it's worth adding a note about this in the
documentation to save the next one staring at this a few minutes?  Something
along the lines of:

inline patch 1: src/tools/pgindent/README (+3/-0 lines) download inline-1.patch--- a/src/tools/pgindent/README +++ b/src/tools/pgindent/README @@ -110,6 +110,9 @@ Sometimes, if pgindent or perltidy produces odd-looking output, it's because of minor bugs like extra commas. Don't hesitate to clean that up while you're at it. +If an exported function shares a name with a typedef, the header file with the +prototype can get incorrect spacing for the function. +
cheers ./daniel ^ permalink raw reply [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-22 14:18  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2020-09-22 14:18 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

Daniel Gustafsson <daniel@yesql.se> writes:
>> On 21 Sep 2020, at 20:55, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Here's a proposed patch to fix it that way.

> +1 on this patch.  Do you think it's worth adding a note about this in the
> documentation to save the next one staring at this a few minutes?  Something
> along the lines of:

> +If an exported function shares a name with a typedef, the header file with the
> +prototype can get incorrect spacing for the function.

AFAIK, a function name that's the same as a typedef name will get
misformatted whether it's exported or not; pgindent doesn't really
know the difference.  But yeah, we could add something about this.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: pgindent vs dtrace on macos
@ 2020-09-22 15:35  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 21+ messages in thread

From: Tom Lane @ 2020-09-22 15:35 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

After further thought about this, I concluded that a much better idea
is to just exclude fmgrprotos.h from the pgindent run.  While renaming
these two functions may or may not be worthwhile, it doesn't provide
any sort of permanent fix for fmgrprotos.h, because new typedef conflicts
could arise at any time.  (The fact that the typedef list isn't fully
under our control, thanks to contributions from system headers, makes
this a bigger risk than it might appear.)

So I did that, and also added a README comment along the lines you
suggested.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread


end of thread, other threads:[~2020-09-22 15:35 UTC | newest]

Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 09:52 pgindent vs dtrace on macos Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-05-20 10:01 ` Daniel Gustafsson <daniel@yesql.se>
2020-05-20 13:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-22 09:29   ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-09-16 21:17     ` Daniel Gustafsson <daniel@yesql.se>
2020-09-16 23:55       ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-17 00:03         ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-09-17 00:39           ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-21 18:55             ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-21 19:08               ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-09-21 19:21                 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-21 19:37                   ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-09-22 08:25               ` Daniel Gustafsson <daniel@yesql.se>
2020-09-22 14:18                 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-22 15:35                   ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-17 00:34         ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-17 08:15         ` Daniel Gustafsson <daniel@yesql.se>
2020-09-17 15:39           ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-17 18:20             ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-21 17:59               ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-21 18:14                 ` Daniel Gustafsson <daniel@yesql.se>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox