Class Lexicals.Identifier.Pseudo

  • All Implemented Interfaces:
    Serializable
    Enclosing class:
    Lexicals.Identifier

    public static final class Lexicals.Identifier.Pseudo
    extends Lexicals.Identifier.Simple
    Displays/deparses like a Simple identifier, but no singleton of this class matches anything but itself, to represent pseudo-identifiers like PUBLIC as a privilege grantee.
    See Also:
    Serialized Form
    • Field Detail

      • PUBLIC

        public static final Lexicals.Identifier.Pseudo PUBLIC
        Instance intended to represent PUBLIC when used as a privilege grantee.

        It would not be correct to use this instance for other special things that happen to be named PUBLIC, such as the PUBLIC schema. That is a real catalog object that has the actual name PUBLIC, and should be represented as a Simple with that name.

        Note: through PG 14 at least, the database itself does not treat the public grantee in the way anticipated here; it is, instead, treated as an ordinary folding name "public" and forbidden as the name of any role. Therefore, a model of grantee roles would not need this symbol after all, but the definition will remain here illustrating the concept.

    • Method Detail

      • equals

        public boolean equals​(Object other)
        A Pseudo identifier instance is only equal to itself.
        Overrides:
        equals in class Lexicals.Identifier
        Parameters:
        other - Object to compare to
        Returns:
        true if two quoted Identifiers match exactly, or two non-quoted ones match in either the PostgreSQL or ISO SQL folded form, or a quoted one exactly matches either folded form of a non-quoted one.