Interface Attribute

All Superinterfaces:
CatalogObject, CatalogObject.AccessControlled<CatalogObject.Grant.OnAttribute>, CatalogObject.Addressed<RegClass>, CatalogObject.Component, CatalogObject.Named<Lexicals.Identifier.Simple>

An attribute (column), either of a known relation, or of a transient record type.

Instances of the transient kind may be retrieved from a TupleDescriptor and will compare unequal to other Attribute instances even with the same classId, subId, and oid (which will be InvalidOid); for such instances, containingTupleDescriptor will return the specific transient TupleDescriptor to which the attribute belongs. Such 'virtual' instances will appear to have the invalid RegClass as relation(), and all access granted to public.

  • Field Details

    • CLASS

      static final RegClass CLASS
      CLASS rather than CLASSID because Attribute isn't an object class in its own right.

      This simply identifies the table in the catalog that holds attribute definitions. An Attribute is not regarded as an object of that 'class'; it is a subId of whatever other RegClass object it defines an attribute of.

  • Method Details

    • relation

      RegClass relation()
    • type

      RegType type()
    • length

      short length()
    • dimensions

      int dimensions()
    • cachedOffset

      int cachedOffset()
    • byValue

      boolean byValue()
    • alignment

      BaseUDT.Alignment alignment()
    • storage

      BaseUDT.Storage storage()
    • notNull

      boolean notNull()
    • hasDefault

      boolean hasDefault()
    • hasMissing

      boolean hasMissing()
    • identity

      Attribute.Identity identity()
    • generated

      Attribute.Generated generated()
    • dropped

      boolean dropped()
    • local

      boolean local()
    • inheritanceCount

      int inheritanceCount()
    • collation

      RegCollation collation()
    • containingTupleDescriptor

      TupleDescriptor containingTupleDescriptor()
      Returns the tuple descriptor to which this attribute belongs.

      For a 'cataloged' attribute corresponding to a known relation or row type, returns a TupleDescriptor for that. For a 'virtual' attribute obtained from some non-cataloged tuple descriptor, returns whatever TupleDescriptor it came from.