postgresql/doc/src/sgml/ref
Tom Lane a0b012a1ab Rearrange ALTER TABLE syntax processing as per my recent proposal: the
grammar allows ALTER TABLE/INDEX/SEQUENCE/VIEW interchangeably for all
subforms of those commands, and then we sort out what's really legal
at execution time.  This allows the ALTER SEQUENCE/VIEW reference pages
to fully document all the ALTER forms available for sequences and views
respectively, and eliminates a longstanding cause of confusion for users.

The net effect is that the following forms are allowed that weren't before:
	ALTER SEQUENCE OWNER TO
	ALTER VIEW ALTER COLUMN SET/DROP DEFAULT
	ALTER VIEW OWNER TO
	ALTER VIEW SET SCHEMA
(There's no actual functionality gain here, but formerly you had to say
ALTER TABLE instead.)

Interestingly, the grammar tables actually get smaller, probably because
there are fewer special cases to keep track of.

I did not disallow using ALTER TABLE for these operations.  Perhaps we
should, but there's a backwards-compatibility issue if we do; in fact
it would break existing pg_dump scripts.  I did however tighten up
ALTER SEQUENCE and ALTER VIEW to reject non-sequences and non-views
in the new cases as well as a couple of cases where they didn't before.

The patch doesn't change pg_dump to use the new syntaxes, either.
2008-06-15 01:25:54 +00:00
..
abort.sgml
allfiles.sgml Remove ipcclean utility command --- didn't work on all Unixes and on 2008-03-27 17:24:16 +00:00
alter_aggregate.sgml
alter_conversion.sgml
alter_database.sgml Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, ALTER ROLE. 2007-09-03 18:46:30 +00:00
alter_domain.sgml Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD CONSTRAINT 2007-05-11 20:17:15 +00:00
alter_function.sgml Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, ALTER ROLE. 2007-09-03 18:46:30 +00:00
alter_group.sgml
alter_index.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
alter_language.sgml Allow non-superuser database owners to create procedural languages. 2007-03-26 16:58:41 +00:00
alter_opclass.sgml
alter_operator.sgml
alter_opfamily.sgml Push index operator lossiness determination down to GIST/GIN opclass 2008-04-14 17:05:34 +00:00
alter_role.sgml Add example showing how to remove a password from a role. 2008-04-30 12:38:49 +00:00
alter_schema.sgml
alter_sequence.sgml Rearrange ALTER TABLE syntax processing as per my recent proposal: the 2008-06-15 01:25:54 +00:00
alter_table.sgml Change the rules for inherited CHECK constraints to be essentially the same 2008-05-09 23:32:05 +00:00
alter_tablespace.sgml
alter_trigger.sgml
alter_tsconfig.sgml Fix cut-n-paste-o. 2007-08-22 06:26:32 +00:00
alter_tsdictionary.sgml Another round of editorialization on the text search documentation. 2007-10-17 01:01:28 +00:00
alter_tsparser.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
alter_tstemplate.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
alter_type.sgml Support ALTER TYPE RENAME. Petr Jelinek 2008-03-19 18:38:30 +00:00
alter_user.sgml Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, ALTER ROLE. 2007-09-03 18:46:30 +00:00
alter_view.sgml Rearrange ALTER TABLE syntax processing as per my recent proposal: the 2008-06-15 01:25:54 +00:00
analyze.sgml A few improvements to analyze and vacuum sections in documentation: add "see 2007-10-07 01:16:42 +00:00
begin.sgml Fix a bunch of bad grammar in the docs: "<link>, which see for more 2007-05-15 19:43:51 +00:00
checkpoint.sgml
close.sgml Document that "ROLLBACK TO savepoint" does not un-close cursors. 2008-05-12 16:23:26 +00:00
cluster.sgml <optional> cannot be used here, because psql doesn't handle it. 2007-11-07 14:07:53 +00:00
clusterdb.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
comment.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
commit.sgml
commit_prepared.sgml
copy.sgml Document the fact that COPY always uses the client encoding. 2008-01-16 22:07:04 +00:00
create_aggregate.sgml
create_cast.sgml Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
create_constraint.sgml
create_conversion.sgml Remove "convert 'blah' using conversion_name" facility, because if it 2007-09-24 01:29:30 +00:00
create_database.sgml Change initdb and CREATE DATABASE to actively reject attempts to create 2007-09-28 22:25:49 +00:00
create_domain.sgml
create_function.sgml Arrange for SET LOCAL's effects to persist until the end of the current top 2007-09-11 00:06:42 +00:00
create_group.sgml Fix a bunch of bad grammar in the docs: "<link>, which see for more 2007-05-15 19:43:51 +00:00
create_index.sgml Add a note to the CREATE INDEX reference page about the impact of 2008-03-16 23:57:51 +00:00
create_language.sgml Allow non-superuser database owners to create procedural languages. 2007-03-26 16:58:41 +00:00
create_opclass.sgml Push index operator lossiness determination down to GIST/GIN opclass 2008-04-14 17:05:34 +00:00
create_operator.sgml spell checker run 2007-11-28 15:42:31 +00:00
create_opfamily.sgml
create_role.sgml Use "alternative" instead of "alternate" where it is clearer. 2007-11-07 12:24:24 +00:00
create_rule.sgml Use "alternative" instead of "alternate" where it is clearer. 2007-11-07 12:24:24 +00:00
create_schema.sgml
create_sequence.sgml
create_table.sgml Change the rules for inherited CHECK constraints to be essentially the same 2008-05-09 23:32:05 +00:00
create_table_as.sgml Create a GUC parameter temp_tablespaces that allows selection of the 2007-06-03 17:08:34 +00:00
create_tablespace.sgml
create_trigger.sgml Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00
create_tsconfig.sgml Remove option to change parser of an existing text search configuration. 2007-08-22 05:13:50 +00:00
create_tsdictionary.sgml Simplify the syntax of CREATE/ALTER TEXT SEARCH DICTIONARY by treating the 2007-08-22 01:39:46 +00:00
create_tsparser.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
create_tstemplate.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
create_type.sgml Clarify description of typmod input function, per Jeff Davis. 2008-05-27 18:05:13 +00:00
create_user.sgml Fix a bunch of bad grammar in the docs: "<link>, which see for more 2007-05-15 19:43:51 +00:00
create_view.sgml Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE. 2007-07-03 01:30:37 +00:00
createdb.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
createlang.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
createuser.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
deallocate.sgml RESET SESSION, plus related new DDL commands. Patch from Marko Kreen, 2007-04-12 06:53:49 +00:00
declare.sgml Disallow scrolling of FOR UPDATE/FOR SHARE cursors, so as to avoid problems 2007-10-24 23:27:08 +00:00
delete.sgml Allow AS to be omitted when specifying an output column name in SELECT 2008-02-15 22:17:06 +00:00
discard.sgml Minor tweak for DISCARD ref page. 2007-04-26 18:00:24 +00:00
drop_aggregate.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
drop_cast.sgml
drop_conversion.sgml
drop_database.sgml
drop_domain.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
drop_function.sgml
drop_group.sgml Fix a bunch of bad grammar in the docs: "<link>, which see for more 2007-05-15 19:43:51 +00:00
drop_index.sgml
drop_language.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
drop_opclass.sgml
drop_operator.sgml
drop_opfamily.sgml
drop_owned.sgml
drop_role.sgml
drop_rule.sgml
drop_schema.sgml
drop_sequence.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
drop_table.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
drop_tablespace.sgml Create a GUC parameter temp_tablespaces that allows selection of the 2007-06-03 17:08:34 +00:00
drop_trigger.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
drop_tsconfig.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
drop_tsdictionary.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
drop_tsparser.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
drop_tstemplate.sgml First rough cut at text search documentation: bare bones reference 2007-08-21 21:08:47 +00:00
drop_type.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
drop_user.sgml Fix a bunch of bad grammar in the docs: "<link>, which see for more 2007-05-15 19:43:51 +00:00
drop_view.sgml Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE. 2007-07-03 01:30:37 +00:00
dropdb.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
droplang.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
dropuser.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
ecpg-ref.sgml
end.sgml
execute.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
explain.sgml Cause EXPLAIN's VERBOSE option to print the target list (output column list) 2008-04-18 01:42:17 +00:00
fetch.sgml Remove obsolete statement that you can't update through a cursor. 2007-10-24 22:55:52 +00:00
grant.sgml Improve GRANT documentation to point out that UPDATE and DELETE typically 2008-05-28 00:45:40 +00:00
initdb.sgml Fix seriously broken markup for libpq-envars cross-references. 2007-03-26 17:23:37 +00:00
insert.sgml Allow AS to be omitted when specifying an output column name in SELECT 2008-02-15 22:17:06 +00:00
listen.sgml
load.sgml
lock.sgml
move.sgml
notify.sgml
pg_config-ref.sgml Added --htmldir option to pg_config, equivalent to the new configure option. 2008-02-18 14:51:48 +00:00
pg_controldata.sgml More clearly document that most PostgreSQL utilities support libpq 2007-02-20 18:10:59 +00:00
pg_ctl-ref.sgml Prevent shutdown in normal mode if online backup is running, and 2008-04-23 13:44:59 +00:00
pg_dump.sgml Turn the -i/--ignore-version options of pg_dump and pg_dumpall into no-ops: 2008-04-13 03:49:22 +00:00
pg_dumpall.sgml Turn the -i/--ignore-version options of pg_dump and pg_dumpall into no-ops: 2008-04-13 03:49:22 +00:00
pg_resetxlog.sgml
pg_restore.sgml Turn the -i/--ignore-version options of pg_dump and pg_dumpall into no-ops: 2008-04-13 03:49:22 +00:00
postgres-ref.sgml Minor copy-editing. 2007-07-09 01:08:09 +00:00
postmaster.sgml
prepare.sgml Various fixes for the SGML docs. Consistently use spaces before/after 2007-05-15 19:13:55 +00:00
prepare_transaction.sgml Fix LISTEN/NOTIFY race condition reported by Laurent Birtz, by postponing 2008-03-12 20:11:46 +00:00
psql-ref.sgml Add optional on/off argument to \timing. 2008-06-11 10:48:17 +00:00
reassign_owned.sgml
reindex.sgml Remove no-longer-accurate claim that REINDEX won't invalidate cached 2007-11-18 18:42:03 +00:00
reindexdb.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
release_savepoint.sgml
reset.sgml Arrange for SET LOCAL's effects to persist until the end of the current top 2007-09-11 00:06:42 +00:00
revoke.sgml Document that REVOKE doesn't remove all permissions if PUBLIC has permissions. 2008-03-03 19:17:27 +00:00
rollback.sgml
rollback_prepared.sgml
rollback_to.sgml
savepoint.sgml
select.sgml Allow AS to be omitted when specifying an output column name in SELECT 2008-02-15 22:17:06 +00:00
select_into.sgml Allow AS to be omitted when specifying an output column name in SELECT 2008-02-15 22:17:06 +00:00
set.sgml Document and enforce that the usable range of setseed() arguments is 2008-03-10 12:39:23 +00:00
set_constraints.sgml
set_role.sgml Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:23:15 +00:00
set_session_auth.sgml Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:23:15 +00:00
set_transaction.sgml
show.sgml Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:23:15 +00:00
start_transaction.sgml
truncate.sgml Rewrite the warning about non-transaction-safety of TRUNCATE ... RESTART 2008-05-17 23:36:27 +00:00
unlisten.sgml
update.sgml Allow AS to be omitted when specifying an output column name in SELECT 2008-02-15 22:17:06 +00:00
vacuum.sgml Fix mistaken duplicate reference to max_fsm_pages, per bug #3926. 2008-02-03 16:24:08 +00:00
vacuumdb.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
values.sgml