mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
ALTER TABLE rewrite. New cool stuff:
* ALTER ... ADD COLUMN with defaults and NOT NULL constraints works per SQL spec. A default is implemented by rewriting the table with the new value stored in each row. * ALTER COLUMN TYPE. You can change a column's datatype to anything you want, so long as you can specify how to convert the old value. Rewrites the table. (Possible future improvement: optimize no-op conversions such as varchar(N) to varchar(N+1).) * Multiple ALTER actions in a single ALTER TABLE command. You can perform any number of column additions, type changes, and constraint additions with only one pass over the table contents. Basic documentation provided in ALTER TABLE ref page, but some more docs work is needed. Original patch from Rod Taylor, additional work from Tom Lane.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.236 2004/04/01 21:28:46 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.237 2004/05/05 04:48:47 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -463,9 +463,11 @@ extern Datum pg_get_viewdef_name(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_viewdef_name_ext(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_indexdef(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_indexdef_ext(PG_FUNCTION_ARGS);
|
||||
extern char *pg_get_indexdef_string(Oid indexrelid);
|
||||
extern Datum pg_get_triggerdef(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_constraintdef(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_constraintdef_ext(PG_FUNCTION_ARGS);
|
||||
extern char *pg_get_constraintdef_string(Oid constraintId);
|
||||
extern Datum pg_get_userbyid(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_expr(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_get_expr_ext(PG_FUNCTION_ARGS);
|
||||
|
Reference in New Issue
Block a user