![]() RESET ( attribute_option )- Sets or resets per-attribute options. When set to 0, no statistics are collected. The target can be set in the range 0 to 10000, or set to -1 to revert to using the system default statistics target ( default_statistics_target). ![]() SET STATISTICS - Sets the per-column statistics-gathering target for subsequent ANALYZE operations. You can only use SET NOT NULL when the column contains no null values. SET/DROP NOT NULL - Changes whether a column is marked to allow null values or to reject null values. Default values only apply in subsequent INSERT or UPDATE commands they do not cause rows already in the table to change. SET/DROP DEFAULT - Sets or removes the default value for a column. For information about table rewrites performed by ALTER TABLE, see Notes. If columns in the query use different collations, then Greenplum uses the Postgres Planner.Ĭhanging a column data type requires a table rewrite. GPORCA supports collation only when all columns in the query use the same collation. A USING clause must be provided if there is no implicit or assignment cast from old to new type. If omitted, the default conversion is the same as an assignment cast from old data type to new. The optional USING clause specifies how to compute the new column value from the old. The optional COLLATE clause specifies a collation for the new column if omitted, the collation is the default for the new column type. Indexes and simple table constraints involving the column will be automatically converted to use the new column type by reparsing the originally supplied expression. Note that you cannot alter column data types that are being used as distribution or partitioning keys. SET DATA TYPE - This form changes the data type of a column of a table. IF EXISTS - Do not throw an error if the table does not exist. If IF EXISTS is specified and the column does not exist, no error is thrown a notice is issued instead. You need to say CASCADE if anything outside the table depends on the column (such as views). ![]() Indexes and table constraints involving the column are automatically dropped as well. Note that if you drop table columns that are being used as the Greenplum Database distribution key, the distribution policy for the table will be changed to DISTRIBUTED RANDOMLY. For information about table rewrites performed by ALTER TABLE, see Notes.ĭROP COLUMN - Drops a column from a table. ![]() For append-optimized and hash tables, ADD COLUMN requires a table rewrite. The default compression parameter value.The compression parameter setting specified in the server configuration parameter gp_default_storage_option.The default server configuration parameter default is off, the WITH clause parameters are ignored. If the server configuration parameter gp_add_column_inherits_table_setting is on, use the table's data compression parameters specified in the WITH clause when the table was created.The compression parameter setting specified in the ALTER TABLE command ENCODING clause.When you add a column to an append-optimized, column-oriented table, Greenplum Database sets each data compression parameter for the column ( compresstype, compresslevel, and blocksize) based on the following setting, in order of preference. The ENCODING clause is valid only for append-optimized, column-oriented tables. There are several subforms:ĪDD COLUMN - Adds a new column to the table, using the same syntax as CREATE TABLE. Where table_constraint_using_index is: ĪLTER TABLE changes the definition of an existing table. Synopsis ALTER TABLE ĪLTER TABLE ALL IN TABLESPACE ]ĭROP ĪLTER TYPE ĪLTER column SET ( = )ĪLTER column RESET ( )ĭROP CONSTRAINT
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |