@@ -333,13 +333,17 @@ _PG_init(void)
333
333
Oid
334
334
get_pathman_config_relid (bool invalid_is_ok )
335
335
{
336
+ if (!IsPathmanInitialized ())
337
+ {
338
+ if (invalid_is_ok )
339
+ return InvalidOid ;
340
+ elog (ERROR , "pg_pathman is not initialized yet" );
341
+ }
342
+
336
343
/* Raise ERROR if Oid is invalid */
337
344
if (!OidIsValid (pathman_config_relid ) && !invalid_is_ok )
338
- elog (ERROR ,
339
- (!IsPathmanInitialized () ?
340
- "pg_pathman is not initialized yet" :
341
- "unexpected error in function "
342
- CppAsString (get_pathman_config_relid )));
345
+ elog (ERROR , "unexpected error in function "
346
+ CppAsString (get_pathman_config_relid ));
343
347
344
348
return pathman_config_relid ;
345
349
}
@@ -348,13 +352,17 @@ get_pathman_config_relid(bool invalid_is_ok)
348
352
Oid
349
353
get_pathman_config_params_relid (bool invalid_is_ok )
350
354
{
355
+ if (!IsPathmanInitialized ())
356
+ {
357
+ if (invalid_is_ok )
358
+ return InvalidOid ;
359
+ elog (ERROR , "pg_pathman is not initialized yet" );
360
+ }
361
+
351
362
/* Raise ERROR if Oid is invalid */
352
363
if (!OidIsValid (pathman_config_relid ) && !invalid_is_ok )
353
- elog (ERROR ,
354
- (!IsPathmanInitialized () ?
355
- "pg_pathman is not initialized yet" :
356
- "unexpected error in function "
357
- CppAsString (get_pathman_config_params_relid )));
364
+ elog (ERROR , "unexpected error in function "
365
+ CppAsString (get_pathman_config_params_relid ));
358
366
359
367
return pathman_config_params_relid ;
360
368
}
0 commit comments