Interface RegClass

All Superinterfaces:
CatalogObject, CatalogObject.AccessControlled<CatalogObject.Grant.OnClass>, CatalogObject.Addressed<RegClass>, CatalogObject.Named<Lexicals.Identifier.Simple>, CatalogObject.Namespaced<Lexicals.Identifier.Simple>, CatalogObject.Owned
All Known Subinterfaces:
RegClass.Known<T>

Model of PostgreSQL relations/"classes"/tables.

Instances of RegClass also serve as the "class ID" values for objects within the catalog (including for RegClass objects, which are no different from others in being defined by rows that appear in a catalog table; there is a row in pg_class for pg_class).

  • Field Details

  • Method Details

    • type

      RegType type()
      The PostgreSQL type that is associated with this relation as its "row type".

      This is the type that will be found in a TupleDescriptor for this relation.

    • ofType

      RegType ofType()
      Only for a relation that was created with CREATE TABLE ... OF type, this will be that type; the invalid RegType otherwise.

      Even though the tuple structure will match, this is not the same type returned by type(); that will still be a type distinctly associated with this relation.

    • toastRelation

      RegClass toastRelation()
    • hasIndex

      boolean hasIndex()
    • isShared

      boolean isShared()
      Whether this relation is shared across all databases in the cluster.

      Contrast CatalogObject.Addressed.shared(), which indicates, for any catalog object, whether that object is shared across the cluster. For any RegClass instance, shared() will be false (the pg_class catalog is not shared), but if the instance represents a shared class, isShared() will be true (and shared() will be true for any catalog object formed with that instance as its classId).

      Returns:
      whether the relation represented by this RegClass instance is shared across all databases in the cluster.
    • nAttributes

      short nAttributes()
    • checks

      short checks()
    • hasRules

      boolean hasRules()
    • hasTriggers

      boolean hasTriggers()
    • hasSubclass

      boolean hasSubclass()
    • rowSecurity

      boolean rowSecurity()
    • forceRowSecurity

      boolean forceRowSecurity()
    • isPopulated

      boolean isPopulated()
    • isPartition

      boolean isPartition()
    • options

      List<String> options()
      This is a list of keyword=value pairs and ought to have a more specific return type.

      XXX

    • tupleDescriptor

      TupleDescriptor.Interned tupleDescriptor()