Skip to content

pgpool_regclass

replacement for regclass

pgpool · replacement for regclass

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
5920pgpool_regclasspgpool4.7.3ADMINPostgreSQLC
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-rNoYesNoYesyesno
Pgpool-II/PGDG package 4.7.3; pgpool_regclass SQL/control version 1.0. Verified RPM/DEB payload includes pgpool-regclass.so; standard native extension, no preload required.

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPGDG4.7.319 18 17 16 15pgpool-
RPMPGDG4.7.319 18 17 16 15pgpool-II-pg$v-extensions-
DEBPGDG4.7.319 18 17 16 15postgresql-$v-pgpool2-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
el8.aarch64N/APGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
el9.x86_64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
el9.aarch64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
el10.x86_64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
el10.aarch64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
d12.x86_64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
d12.aarch64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
d13.x86_64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
d13.aarch64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
u22.x86_64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
u22.aarch64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
u24.x86_64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
u24.aarch64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
u26.x86_64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3
u26.aarch64PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3PGDG 4.7.3

Source

Install

Make sure PGDG repo available:

pig repo add pgdg -u    # add pgdg repo and update cache

Install this extension with pig:

pig install pgpool;		# install by package name
pig install pgpool_regclass;		# install by extension name

pig install pgpool_regclass -v 19;   # install for PG 19
pig install pgpool_regclass -v 18;   # install for PG 18
pig install pgpool_regclass -v 17;   # install for PG 17
pig install pgpool_regclass -v 16;   # install for PG 16
pig install pgpool_regclass -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION pgpool_regclass;

Usage

pgpool_regclass: replacement for regclass

The pgpool_regclass extension provides a replacement regclass function used internally by Pgpool-II to handle relation name resolution across multiple backends.

Function

-- Resolve a relation name to its OID, similar to PostgreSQL's regclass cast
SELECT pgpool_regclass('my_table');
SELECT pgpool_regclass('my_schema.my_table');

Purpose

In standard PostgreSQL, casting a string to regclass (e.g., 'my_table'::regclass) resolves the relation name to an OID. However, Pgpool-II needs to determine whether a SQL statement references a temporary table or a regular table to route queries correctly.

The pgpool_regclass function provides this resolution capability as a regular function call rather than a type cast, allowing Pgpool-II to:

  • Determine if a referenced table exists on the backend
  • Distinguish temporary tables from permanent tables for proper query routing
  • Handle schema-qualified table names correctly across pooled connections

Notes

  • This extension is primarily used internally by Pgpool-II and is not typically called directly by applications
  • It should be installed on all PostgreSQL backend nodes managed by Pgpool-II
  • For Pgpool-II 3.0+, this function helps with the check_temp_table feature

Table reader