Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 2.12 KB

domains.md

File metadata and controls

59 lines (39 loc) · 2.12 KB

Domain Operations

pgm.createDomain( domain_name, type, options )

Create a new domain - postgres docs

Arguments:

  • domain_name [Name] - name of the new domain
  • type [string] - type of the new domain
  • options [object] - options:
    • default [string] - default value of domain
    • collation [string] - collation of data type
    • notNull [boolean] - sets NOT NULL if true (not recommended)
    • check [string] - sql for a check constraint for this column
    • constraintName [string] - name for constraint

Reverse Operation: dropDomain


pgm.dropDomain( domain_name, drop_options )

Drop a domain - postgres docs

Arguments:

  • domain_name [Name] - name of the the domain to drop
  • drop_options [object] - options:
    • ifExists [boolean] - drops domain only if it exists
    • cascade [boolean] - drops also dependent objects

pgm.alterDomain( domain_name, type, options )

Alter a domain - postgres docs

Arguments:

  • domain_name [Name] - name of the new domain
  • options [object] - options:
    • default [string] - default value of domain
    • collation [string] - collation of data type
    • notNull [boolean] - sets NOT NULL if true or NULL if false
    • allowNull [boolean] - sets NULL if true (alternative to notNull)
    • check [string] - sql for a check constraint for this column
    • constraintName [string] - name for constraint

pgm.renameDomain( old_domain_name, new_domain_name )

Rename a domain - postgres docs

Arguments:

  • old_domain_name [Name] - old name of the domain
  • new_domain_name [Name] - new name of the domain