Patch to ALTER TABLE docs 
Author Message
 Patch to ALTER TABLE docs

This is a multi-part message in MIME format.

------=_NextPart_000_0074_01C0D898.BD27BAA0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

If it's true that the ALTER TABLE x ADD CONSTRAINT x CHECK (x) syntax is
supported in 7.1.1, here is a patch to that alter_table.sgml that documents
it.

Chris

------=_NextPart_000_0074_01C0D898.BD27BAA0
Content-Type: application/octet-stream; name="alter_table_sgml.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="alter_table_sgml.diff"

Index: alter_table.sgml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/alter_table.s=
gml,v
retrieving revision 1.23
diff -c -r1.23 alter_table.sgml
*** alter_table.sgml    2001/05/07 00:43:15     1.23
--- alter_table.sgml    2001/05/09 06:59:46
***************
*** 207,219 ****
     </para>
=20=20
     <para>
!     In the current implementation, only FOREIGN KEY constraints can
      be added to a table.  To create or remove a unique constraint, create=
=20
      a unique index (see <xref linkend=3D"SQL-CREATEINDEX"=20
!     endterm=3D"SQL-CREATEINDEX-title">).  To add check constraints
!     you need to recreate and reload the table, using other=20
!     parameters to the <xref linkend=3D"SQL-CREATETABLE"=20
!     endterm=3D"SQL-CREATETABLE-title"> command.
     </para>
=20=20
     <para>
--- 207,216 ----
     </para>
=20=20
     <para>
!     In the current implementation, only FOREIGN KEY and CHECK constraints=
 can
      be added to a table.  To create or remove a unique constraint, create=
=20
      a unique index (see <xref linkend=3D"SQL-CREATEINDEX"=20
!     endterm=3D"SQL-CREATEINDEX-title">).
     </para>
=20=20
     <para>
***************
*** 253,258 ****
--- 250,262 ----
     To rename an existing table:
     <programlisting>
  ALTER TABLE distributors RENAME TO suppliers;
+    </programlisting>
+   </para>
+=20
+   <para>=20
+    To add a check constraint to a table:
+    <programlisting>
+ ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode=
) =3D 5)
     </programlisting>
    </para>
=20=20

------=_NextPart_000_0074_01C0D898.BD27BAA0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.***.com/

------=_NextPart_000_0074_01C0D898.BD27BAA0--



Sun, 26 Oct 2003 16:01:23 GMT
 Patch to ALTER TABLE docs

[ Charset ISO-8859-1 unsupported, converting... ]

Quote:
> If it's true that the ALTER TABLE x ADD CONSTRAINT x CHECK (x) syntax is
> supported in 7.1.1, here is a patch to that alter_table.sgml that documents
> it.

> Chris

Thanks.  Applied to 7.2.

--
  Bruce Momjian                        |  http://candle.pha.pa.us

  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command



Sun, 26 Oct 2003 21:33:16 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Patch to ALTER TABLE docs for 7.2.1

2. dbdiff2 - ALTER TABLE patch

3. ECPG patch for recent ALTER TABLE / S|D NOT NULL changes

4. ECPG patch for recent ALTER TABLE / S|D NOT NULL changes

5. docs patch: doc/src/sgml/sql.sgml for JOIN

6. docs: syntax.sgml patch

7. DROP CONSTRAINT docs patch

8. stupid patches to compile cvs docs with debian

9. stupid patches to compile cvs docs with debian

10. docs: syntax.sgml patch

11. Patch for building docs in a different directory

12. Alter Table Alter Column Syntax


 
Powered by phpBB® Forum Software