SET STATISTICS acquires a SHARE UPDATE EXCLUSIVE lock. For more information on the use of statistics by the PostgreSQL query planner, refer to Section 14.2. The target can be set in the range 0 to 10000 alternatively, set it to -1 to revert to using the system default statistics target ( default_statistics_target). This form sets the per-column statistics-gathering target for subsequent ANALYZE operations. sequence_option is an option supported by ALTER SEQUENCE such as INCREMENT BY. These forms alter the sequence that underlies an existing identity column. If DROP IDENTITY IF EXISTS is specified and the column is not an identity column, no error is thrown. These forms change whether a column is an identity column or change the generation attribute of an existing identity column. RENAME CONSTRAINT constraint_name TO new_constraint_nameĪLTER TABLE ALL IN TABLESPACE name ]ĪTTACH PARTITION partition_name FOR VALUES partition_bound_specĭETACH PARTITION partition_name where action is one of:ĪDD column_name data_type ]ĭROP column_name ĪLTER column_name TYPE data_type ĪLTER column_name SET DEFAULT expressionĪLTER column_name DROP DEFAULTĪLTER column_name AS IDENTITY There is no ALTER EXTERNAL TABLE statement in the SQL standard or regular PostgreSQL.Synopsis ALTER TABLE name ĪLTER TABLE name This is the default behavior.Īdd a new column to an external table definition: ALTER EXTERNAL TABLE ext_expenses ADD COLUMN manager text Ĭhange the owner of an external table: ALTER EXTERNAL TABLE ext_data OWNER TO jojo Ĭhange the data type of an external table: ALTER EXTERNAL TABLE ext_leads ALTER COLUMN acct_code TYPE integer ĪLTER EXTERNAL TABLE is a Greenplum Database extension. Refuse to drop the column or constraint if there are any dependent objects. The role name of the new owner of the external table.Īutomatically drop objects that depend on the dropped column, such as a view that references the column. The name (possibly schema-qualified) of an existing external table definition to alter.ĭata type of the new column, or new data type for an existing column. To modify this information, you must drop and recreate the external table definition. The ALTER EXTERNAL TABLE and ALTER TABLE commands cannot modify the type of the external table (read, write, web), the table FORMAT information, or the location of the external data. A superuser has these privileges automatically.Ĭhanges that you make to an external table definition with either ALTER EXTERNAL TABLE or ALTER TABLE do not affect the external data. 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 external table’s schema. To change the schema of an external table, you must also have CREATE privilege on the new schema. You must own the external table to use ALTER EXTERNAL TABLE or ALTER TABLE. Set (change) the distribution policy (writable external table only).Use the ALTER TABLE command to perform these actions on an external table: OWNER - Changes the owner of the external table to the specified user.ALTER COLUMN TYPE - Changes the data type of a table column.The CASCADE keyword is required if anything outside the table depends on the column, such as a view that references the column. If you drop readable external table columns, it only changes the table definition in Greenplum Database. DROP COLUMN - Drops a column from the external table definition.ADD COLUMN - Adds a new column to the external table definition.These are the supported ALTER EXTERNAL TABLE actions: Synopsis ALTER EXTERNAL TABLE ĪLTER EXTERNAL TABLE changes the definition of an existing external table. Changes the definition of an external table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |