Overrides and replaced behaviour#
Everything plone.pgcatalog replaces in Plone, Zope or add-ons, and where. plone.pgcatalog does not monkeypatch: it does not assign attributes of other packages’ modules or classes. It replaces behaviour through the Zope component registry, ZCML overrides and its own persistent objects.
Replaced event handlers#
Installed by plone.pgcatalog.move.install_move_handlers() at Zope startup (IDatabaseOpenedWithRoot), in the global component registry.
Original handler |
Replaced by |
For |
Why |
|---|---|---|---|
|
|
|
Flags a move in progress, so the catalog skips the per-object uncatalog of every descendant. |
|
|
|
Registers one bulk SQL update of the subtree’s paths instead of a reindex per descendant. |
Both wrappers call the original dispatcher. The effect applies to every move and rename in the process, also on sites that do not use plone.pgcatalog: the wrappers only change behaviour while a PG catalog is active.
ZCML overrides#
Registered in overrides.zcml, which Plone loads together with the package’s configure.zcml.
To undo one, override it again in your own package’s overrides.zcml.
What |
Replaced component |
Condition |
Why |
|---|---|---|---|
GenericSetup import step |
|
always |
Keeps CMFPlone’s |
Vocabulary |
|
always |
Lists the keywords of a section ( |
Indexer |
|
always; acts only when |
Skips |
|
|
|
The same for blob fields marked searchable. |
|
|
|
Facet counts from PostgreSQL. See Addon integrations. |
Replaced persistent objects#
Done by the plone.pgcatalog:default profile on install.
The profile cannot be uninstalled (see Install plone.pgcatalog).
Object |
Replaced by |
Notes |
|---|---|---|
|
|
Index definitions and metadata columns, including add-on ones, are carried over; data lives in PostgreSQL. |
|
|
Holds the index definitions only (no BTrees). |
|
|
Hands out the proxies below. |
Index proxies#
portal_catalog._catalog.indexes[name], _catalog.getIndex(name) and portal_catalog.Indexes[name] return proxies instead of the raw ZCatalog index objects.
Attributes that the proxy does not implement are delegated to the raw index; its BTrees are empty.
Indexes |
Proxy |
Answered from PostgreSQL |
|---|---|---|
Indexes stored in the |
|
|
|
|
|
isinstance(index, ExtendedPathIndex) and similar checks see the proxy, not the original class; index.meta_type still reports the original type.
Additional hooks#
These add behaviour without replacing anything.
Hook |
Registered for |
Purpose |
|---|---|---|
|
|
Registers the state processor on zodb-pgjsonb, applies the schema, checks the database locale. |
|
|
Returns the request’s PostgreSQL connection to the pool. |
|
|
Keeps |
|
|
Drops malformed Collection query rows before |
|
|
Content count metric, when |