On 2019-Apr-12, Andy Fan wrote: > for example, when I want the LOCKTAG in .c file, which is defined in > "storage/lock.h". then I wrote the code like this: > > #include "storage/lock.h" > ... > > /../../../src/include/storage/lockdefs.h:50:2: error: unknown type name > 'TransactionId' > TransactionId xid; /* xid of holder of > AccessExclusiveLock */
What are you trying to do? Your .c file must include "postgres.h" before any other header file. There should be no other dependencies. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services