![]() ![]() ![]() The name of a base-type property to be modified see above for possible values. Like all enum literals, it needs to be quoted. The existing enum value that should be renamed. The existing enum value that the new value should be added immediately before or after in the enum type's sort ordering. The new value to be added to an enum type's list of values, or the new name to be given to an existing value. The data type of the attribute to add, or the new type of the attribute to alter. The new name of the attribute to be renamed. The name of the attribute to add, alter, or drop. The user name of the new owner of the type. The name (possibly schema-qualified) of an existing type to alter. However, a superuser can alter ownership of any type anyway.) To add an attribute or alter an attribute type, you must also have USAGE privilege on the attribute's data type. (These restrictions enforce that altering the owner doesn't do anything you couldn't do by dropping and recreating the type. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have CREATE privilege on the type's schema. To change the schema of a type, you must also have CREATE privilege on the new schema. For example, it is possible to add several attributes and/or alter the type of several attributes in a single command. The ADD ATTRIBUTE, DROP ATTRIBUTE, and ALTER ATTRIBUTE actions can be combined into a list of multiple alterations to apply in parallel. Note that where appropriate, a change in these properties for a base type will be propagated automatically to domains based on that type. See CREATE TYPE for more details about these type properties. See ALTER TABLE to change the TOAST strategy for existing table columns. Note that changing this option doesn't by itself change any stored data, it just sets the default TOAST strategy to be used for table columns created in the future. However, changing from plain to another setting requires superuser privilege (because it requires that the type's C functions all be TOAST-ready), and changing to plain from another setting is not allowed at all (since the type may already have TOASTed values present in the database). STORAGE can be set to plain, extended, external, or main (see Section 73.2 for more information about what these mean). ![]() Using this option requires superuser privilege. SUBSCRIPT can be set to the name of a type-specific subscripting handler function, or NONE to remove the type's subscripting handler function. Using this option requires superuser privilege.ĪNALYZE can be set to the name of a type-specific statistics collection function, or NONE to remove the type's statistics collection function. TYPMOD_OUT can be set to the name of a type modifier output function, or NONE to remove the type's type modifier output function. TYPMOD_IN can be set to the name of a type modifier input function, or NONE to remove the type's type modifier input function. SEND can be set to the name of a binary output function, or NONE to remove the type's binary output function. RECEIVE can be set to the name of a binary input function, or NONE to remove the type's binary input function. Specifically, these properties can be changed: It allows adjustment of a subset of the base-type properties that can be set in CREATE TYPE. This form is only applicable to base types. An error will occur if the specified value is not present or the new name is already present. The value's place in the enum's ordering is not affected. This form renames a value of an enum type. Otherwise, an error will occur if the new value is already present. If IF NOT EXISTS is specified, it is not an error if the type already contains the new value: a notice is issued but no other action is taken. Otherwise, the new item is added at the end of the list of values. The new value's place in the enum's ordering can be specified as being BEFORE or AFTER one of the existing values. This form adds a new value to an enum type. This form changes the type of an attribute of a composite type. If IF EXISTS is specified and the attribute does not exist, no error is thrown. This form drops an attribute from a composite type. This form adds a new attribute to a composite type, using the same syntax as CREATE TYPE. It changes the name of an individual attribute of the type. This form is only usable with composite types. This form moves the type into another schema. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |