Skip to content

Commit 8d12962

Browse files
committed
Fix extract_typedefs.sh to capture typedef aliases like CachedExtensionIds
The previous grep -v 'struct' filter discarded lines like "typedef struct CachedExtensionIdsData CachedExtensionIds;" before the alias pattern could extract CachedExtensionIds. Reformat affected files. Signed-off-by: sfc-gh-npuka <naisila.puka@snowflake.com>
1 parent 0b06b9e commit 8d12962

16 files changed

Lines changed: 40 additions & 45 deletions

File tree

pg_extension_base/include/pg_extension_base/extension_ids.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ typedef void (*ClearFunction) (void *clearContext);
5656
struct CachedExtensionIdsData;
5757
typedef struct CachedExtensionIdsData CachedExtensionIds;
5858

59-
extern PGDLLEXPORT CachedExtensionIds * CreateExtensionIdsCache(char *extensionName,
60-
ClearFunction clearFn,
61-
void *clearContext);
62-
extern PGDLLEXPORT bool IsExtensionCreated(CachedExtensionIds * extension);
63-
extern PGDLLEXPORT Oid ExtensionId(CachedExtensionIds * extension);
64-
extern PGDLLEXPORT Oid ExtensionSchemaId(CachedExtensionIds * extension);
65-
extern PGDLLEXPORT Oid ExtensionOwnerId(CachedExtensionIds * extension);
66-
extern PGDLLEXPORT void EnsureExtensionExists(CachedExtensionIds * extension);
59+
extern PGDLLEXPORT CachedExtensionIds *CreateExtensionIdsCache(char *extensionName,
60+
ClearFunction clearFn,
61+
void *clearContext);
62+
extern PGDLLEXPORT bool IsExtensionCreated(CachedExtensionIds *extension);
63+
extern PGDLLEXPORT Oid ExtensionId(CachedExtensionIds *extension);
64+
extern PGDLLEXPORT Oid ExtensionSchemaId(CachedExtensionIds *extension);
65+
extern PGDLLEXPORT Oid ExtensionOwnerId(CachedExtensionIds *extension);
66+
extern PGDLLEXPORT void EnsureExtensionExists(CachedExtensionIds *extension);

pg_extension_base/include/pg_extension_base/pg_extension_base_ids.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#define PG_EXTENSION_BASE_NAME "pg_extension_base"
2323

2424
/* cached extension IDs for pg_extension_base */
25-
extern PGDLLEXPORT CachedExtensionIds * PgExtensionBase;
25+
extern PGDLLEXPORT CachedExtensionIds *PgExtensionBase;
2626

2727
extern PGDLLEXPORT void InitializePgExtensionBaseCache(void);

pg_extension_base/src/extension_ids.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ InvalidateExtensionIdCache(Datum argument, Oid relationId)
208208
* IsExtensionCreated returns whether exists.
209209
*/
210210
bool
211-
IsExtensionCreated(CachedExtensionIds * extension)
211+
IsExtensionCreated(CachedExtensionIds *extension)
212212
{
213213
if (extension->existsStatus == EXTENSION_STATUS_EXISTS)
214214
return true;
@@ -235,7 +235,7 @@ IsExtensionCreated(CachedExtensionIds * extension)
235235
* ExtensionId returns the OID of the extension.
236236
*/
237237
Oid
238-
ExtensionId(CachedExtensionIds * extension)
238+
ExtensionId(CachedExtensionIds *extension)
239239
{
240240
if (extension->extensionId == InvalidOid)
241241
{
@@ -250,7 +250,7 @@ ExtensionId(CachedExtensionIds * extension)
250250
* ExtensionSchemaId returns the OID of the extension schema.
251251
*/
252252
Oid
253-
ExtensionSchemaId(CachedExtensionIds * extension)
253+
ExtensionSchemaId(CachedExtensionIds *extension)
254254
{
255255
if (extension->schemaId == InvalidOid)
256256
extension->schemaId = get_extension_schema(ExtensionId(extension));
@@ -263,7 +263,7 @@ ExtensionSchemaId(CachedExtensionIds * extension)
263263
* ExtensionOwnerId returns the OID of the extension owner.
264264
*/
265265
Oid
266-
ExtensionOwnerId(CachedExtensionIds * extension)
266+
ExtensionOwnerId(CachedExtensionIds *extension)
267267
{
268268
if (extension->ownerId == InvalidOid)
269269
{
@@ -300,7 +300,7 @@ ExtensionOwnerId(CachedExtensionIds * extension)
300300
* in the current database.
301301
*/
302302
void
303-
EnsureExtensionExists(CachedExtensionIds * extension)
303+
EnsureExtensionExists(CachedExtensionIds *extension)
304304
{
305305
if (IsExtensionCreated(extension))
306306
return;

pg_lake_engine/include/pg_lake/extensions/btree_gist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#define BTREE_GIST "btree_gist"
2323

2424
/* cached extension IDs for btree_gist */
25-
extern PGDLLEXPORT CachedExtensionIds * BtreeGist;
25+
extern PGDLLEXPORT CachedExtensionIds *BtreeGist;
2626

2727
void InitializeBtreeGistIdCache(void);

pg_lake_engine/include/pg_lake/extensions/pg_lake.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#define PG_LAKE "pg_lake"
2323

2424
/* cached extension IDs for pg_lake */
25-
extern PGDLLEXPORT CachedExtensionIds * PgLake;
25+
extern PGDLLEXPORT CachedExtensionIds *PgLake;
2626

2727
void InitializePgLakeIdCache(void);

pg_lake_engine/include/pg_lake/extensions/pg_lake_benchmark.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#define PG_LAKE_BENCHMARK "pg_lake_benchmark"
2323

2424
/* cached extension IDs for pg_lake_benchmark */
25-
extern PGDLLEXPORT CachedExtensionIds * PgLakeBenchmark;
25+
extern PGDLLEXPORT CachedExtensionIds *PgLakeBenchmark;
2626

2727
void InitializePgLakeBenchmarkIdCache(void);

pg_lake_engine/include/pg_lake/extensions/pg_lake_copy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#define PG_LAKE_COPY "pg_lake_copy"
2323

2424
/* cached extension IDs for pg_lake_copy */
25-
extern PGDLLEXPORT CachedExtensionIds * PgLakeCopy;
25+
extern PGDLLEXPORT CachedExtensionIds *PgLakeCopy;
2626

2727
void InitializePgLakeCopyIdCache(void);

pg_lake_engine/include/pg_lake/extensions/pg_lake_engine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern PGDLLEXPORT bool EnableHeavyAsserts;
3030
extern PGDLLEXPORT char *PgLakeStageLocation;
3131

3232
/* cached extension IDs for pg_lake_engine */
33-
extern PGDLLEXPORT CachedExtensionIds * PgLakeEngine;
33+
extern PGDLLEXPORT CachedExtensionIds *PgLakeEngine;
3434

3535
void InitializePgLakeEngineIdCache(void);
3636

pg_lake_engine/include/pg_lake/extensions/pg_lake_iceberg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define ICEBERG_INTERNAL_CATALOG_TABLE_NAME "tables_internal"
2525

2626
/* cached extension IDs for pg_lake_iceberg */
27-
extern PGDLLEXPORT CachedExtensionIds * PgLakeIceberg;
27+
extern PGDLLEXPORT CachedExtensionIds *PgLakeIceberg;
2828

2929
extern PGDLLEXPORT void InitializePgLakeIcebergIdCache(void);
3030
extern PGDLLEXPORT Oid IcebergTablesInternalTableId(void);

pg_lake_engine/include/pg_lake/extensions/pg_lake_replication.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#define PG_LAKE_REPLICATION "pg_lake_replication"
2323

2424
/* cached extension IDs for pg_lake_replication */
25-
extern PGDLLEXPORT CachedExtensionIds * PgLakeReplication;
25+
extern PGDLLEXPORT CachedExtensionIds *PgLakeReplication;
2626

2727
void InitializePgLakeReplicationIdCache(void);

0 commit comments

Comments
 (0)