pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Updated docs needed for 7.0
11+ messages / 6 participants
[nested] [flat]

* Updated docs needed for 7.0
@ 2000-04-11 03:56 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 04:59 ` Re: Updated docs needed for 7.0 Tatsuo Ishii <t-ishii@sra.co.jp>
  2000-04-11 10:47 ` Re: Updated docs needed for 7.0 Peter Eisentraut <e99re41@DoCS.UU.SE>
  2000-04-11 11:39 ` Re: Updated docs needed for 7.0 Jan Wieck <wieck@debis.com>
  0 siblings, 3 replies; 11+ messages in thread

From: Bruce Momjian @ 2000-04-11 03:56 UTC (permalink / raw)
  To: PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

OK, I have talked to Thomas and have found which items need work for
7.0.  Comments please.

---------------------------------------------------------------------------

> Add CmdTuples() to libpq++(Vince)

> New CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands(Jan)
> ALTER TABLE CONSTRAINT
> First real FOREIGN KEY constraint trigger functionality (Jan)
> Add FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE (Jan)
> Add FOREIGN KEY ... MATCH  referential actions (Don Baccus)
> Add ALTER TABLE ... ADD FOREIGN KEY (Stephan Szabo)

Needs much more work.

> Add ecpg EXEC SQL IFDEF, EXEC SQL IFNDEF, EXEC SQL ELSE, EXEC SQL ELIF
>         and EXEC SQL ENDIF directives

ecpg.sgml?

> Updated user interfaces on initdb, initlocation, pg_dump, ipcclean (Peter E)

Need updating of switches.


> New libpq functions PQsetClientEncoding(), PQclientEncoding() (Tatsuo)

Documented, but only in README.mb.  Is that OK?

> New lztext data type for compressed text fields

Not documented.  I think we want to document it, no?

> New C-routines to implement a BIT and BIT VARYING type in /contrib
>         (Adriaan Joubert)

Let's hold on this one.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
@ 2000-04-11 04:59 ` Tatsuo Ishii <t-ishii@sra.co.jp>
  2000-04-11 15:21   ` Re: Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2 siblings, 1 reply; 11+ messages in thread

From: Tatsuo Ishii @ 2000-04-11 04:59 UTC (permalink / raw)
  To: pgman@candle.pha.pa.us; +Cc: pgsql-hackers@postgresql.org; docs@postgresql.org

> > New libpq functions PQsetClientEncoding(), PQclientEncoding() (Tatsuo)
> 
> Documented, but only in README.mb.  Is that OK?

It seems I'm not looking forward to announce widely them since we will
go into a direction supporting the national character and when they
would be available, application interfaces might be changed
dramatically.

Comments?
--
Tatsuo Ishii



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 04:59 ` Re: Updated docs needed for 7.0 Tatsuo Ishii <t-ishii@sra.co.jp>
@ 2000-04-11 15:21   ` Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Bruce Momjian @ 2000-04-11 15:21 UTC (permalink / raw)
  To: Tatsuo Ishii <t-ishii@sra.co.jp>; +Cc: pgsql-hackers@postgreSQL.org; docs@postgreSQL.org

> > > New libpq functions PQsetClientEncoding(), PQclientEncoding() (Tatsuo)
> > 
> > Documented, but only in README.mb.  Is that OK?
> 
> It seems I'm not looking forward to announce widely them since we will
> go into a direction supporting the national character and when they
> would be available, application interfaces might be changed
> dramatically.
> 
> Comments?

OK, removed from list.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
@ 2000-04-11 10:47 ` Peter Eisentraut <e99re41@DoCS.UU.SE>
  2000-04-11 14:31   ` Re: Updated docs needed for 7.0 Tom Lane <tgl@sss.pgh.pa.us>
  2000-04-11 14:45   ` Re: Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2 siblings, 2 replies; 11+ messages in thread

From: Peter Eisentraut @ 2000-04-11 10:47 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

On Mon, 10 Apr 2000, Bruce Momjian wrote:

> > Updated user interfaces on initdb, initlocation, pg_dump, ipcclean (Peter E)
> 
> Need updating of switches.

initdb is up to date. initlocation and ipcclean don't even have any
switches. pg_dump switches seem up to date but I don't have anything to do
with that.

> > New libpq functions PQsetClientEncoding(), PQclientEncoding() (Tatsuo)
> 
> Documented, but only in README.mb.  Is that OK?

Seemingly, since README.mb is the de facto authorative source for MB
documentation.

> > New lztext data type for compressed text fields
> 
> Not documented.  I think we want to document it, no?

No. :)


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 10:47 ` Re: Updated docs needed for 7.0 Peter Eisentraut <e99re41@DoCS.UU.SE>
@ 2000-04-11 14:31   ` Tom Lane <tgl@sss.pgh.pa.us>
  2000-04-11 21:45     ` Re: Updated docs needed for 7.0 Peter Eisentraut <peter_e@gmx.net>
  1 sibling, 1 reply; 11+ messages in thread

From: Tom Lane @ 2000-04-11 14:31 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
> On Mon, 10 Apr 2000, Bruce Momjian wrote:
>>>> Updated user interfaces on initdb, initlocation, pg_dump, ipcclean (Peter E)
>> 
>> Need updating of switches.

> initdb is up to date. initlocation and ipcclean don't even have any
> switches. pg_dump switches seem up to date but I don't have anything to do
> with that.

initlocation has switches ... look at the source ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 10:47 ` Re: Updated docs needed for 7.0 Peter Eisentraut <e99re41@DoCS.UU.SE>
  2000-04-11 14:31   ` Re: Updated docs needed for 7.0 Tom Lane <tgl@sss.pgh.pa.us>
@ 2000-04-11 21:45     ` Peter Eisentraut <peter_e@gmx.net>
  2000-04-11 21:50       ` Re: Updated docs needed for 7.0 Tom Lane <tgl@sss.pgh.pa.us>
  2000-04-11 22:10       ` Re: Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 11+ messages in thread

From: Peter Eisentraut @ 2000-04-11 21:45 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

Tom Lane writes:

> initlocation has switches ... look at the source ...

They also come with this notice

# These options are not really necessary, but what the heck.

I think the change was actually to not require the option switch as such
anymore (because there's nothing else you could do anyway), so the
documentation could be considered up to date. :) Maybe I can put in a note
though.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 10:47 ` Re: Updated docs needed for 7.0 Peter Eisentraut <e99re41@DoCS.UU.SE>
  2000-04-11 14:31   ` Re: Updated docs needed for 7.0 Tom Lane <tgl@sss.pgh.pa.us>
  2000-04-11 21:45     ` Re: Updated docs needed for 7.0 Peter Eisentraut <peter_e@gmx.net>
@ 2000-04-11 21:50       ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 11+ messages in thread

From: Tom Lane @ 2000-04-11 21:50 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> initlocation has switches ... look at the source ...

> They also come with this notice

> # These options are not really necessary, but what the heck.

> I think the change was actually to not require the option switch as such
> anymore (because there's nothing else you could do anyway), so the
> documentation could be considered up to date. :) Maybe I can put in a note
> though.

OK, I hadn't actually stopped to look at what the options were ;-),
I was just skimming through Bruce's list of potential trouble spots
as fast as I could.

If you think there's no need to add more documentation, I'm cool with
that.  The point of this exercise was just to make sure nothing had
slipped through the cracks.  Making a conscious decision not to document
something is not dropping the ball.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 10:47 ` Re: Updated docs needed for 7.0 Peter Eisentraut <e99re41@DoCS.UU.SE>
  2000-04-11 14:31   ` Re: Updated docs needed for 7.0 Tom Lane <tgl@sss.pgh.pa.us>
  2000-04-11 21:45     ` Re: Updated docs needed for 7.0 Peter Eisentraut <peter_e@gmx.net>
@ 2000-04-11 22:10       ` Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 11+ messages in thread

From: Bruce Momjian @ 2000-04-11 22:10 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL-development <pgsql-hackers@postgreSQL.org>; PostgreSQL-documentation <docs@postgreSQL.org>

[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> Tom Lane writes:
> 
> > initlocation has switches ... look at the source ...
> 
> They also come with this notice
> 
> # These options are not really necessary, but what the heck.
> 
> I think the change was actually to not require the option switch as such
> anymore (because there's nothing else you could do anyway), so the
> documentation could be considered up to date. :) Maybe I can put in a note
> though.

That's all I needed to hear.  Doc TODO item removed.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 10:47 ` Re: Updated docs needed for 7.0 Peter Eisentraut <e99re41@DoCS.UU.SE>
@ 2000-04-11 14:45   ` Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 11+ messages in thread

From: Bruce Momjian @ 2000-04-11 14:45 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> On Mon, 10 Apr 2000, Bruce Momjian wrote:
> 
> > > Updated user interfaces on initdb, initlocation, pg_dump, ipcclean (Peter E)
> > 
> > Need updating of switches.
> 
> initdb is up to date. initlocation and ipcclean don't even have any
> switches. pg_dump switches seem up to date but I don't have anything to do
> with that.

OK, thanks, I will mark it as done.

> 
> > > New libpq functions PQsetClientEncoding(), PQclientEncoding() (Tatsuo)
> > 
> > Documented, but only in README.mb.  Is that OK?
> 
> Seemingly, since README.mb is the de facto authorative source for MB
> documentation.

OK, I will remove it.

> 
> > > New lztext data type for compressed text fields
> > 
> > Not documented.  I think we want to document it, no?
> 
> No. :)
> 

OK, everyone seems to agree.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
@ 2000-04-11 11:39 ` Jan Wieck <wieck@debis.com>
  2000-04-11 14:43   ` Re: Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2 siblings, 1 reply; 11+ messages in thread

From: wieck@debis.com @ 2000-04-11 11:39 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

> OK, I have talked to Thomas and have found which items need work for
> 7.0.  Comments please.
>
> ---------------------------------------------------------------------------
>
> > Add CmdTuples() to libpq++(Vince)
>
> > New CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands(Jan)
> > ALTER TABLE CONSTRAINT
> > First real FOREIGN KEY constraint trigger functionality (Jan)
> > Add FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE (Jan)
> > Add FOREIGN KEY ... MATCH  referential actions (Don Baccus)
> > Add ALTER TABLE ... ADD FOREIGN KEY (Stephan Szabo)

    Attached  is  are  diffs  for  CREATE/ALTER  table  doc  I've
    forgotten in my mailbox (sorry). Haven't tried to  apply  and
    since I don't have working sgml stuff cannot check.

> > New lztext data type for compressed text fields
>
> Not documented.  I think we want to document it, no?

    If  at  all,  only  in the release notes because it has to be
    removed again as soon as we implement TOAST.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

Attachments:

diff4 (text/plain, 26.2K) download Index: alter_table.sgml =================================================================== RCS file: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v retrieving revision 1.10 diff -c -r1.10 alter_table.sgml *** alter_table.sgml 2000/01/29 16:58:27 1.10 --- alter_table.sgml 2000/02/08 21:55:01 *************** *** 34,39 **** --- 34,41 ---- class="PARAMETER">newcolumn</replaceable> ALTER TABLE <replaceable class="PARAMETER">table</replaceable> RENAME TO <replaceable class="PARAMETER">newtable</replaceable> + ALTER TABLE <replaceable class="PARAMETER">table</replaceable> + ADD <replaceable class="PARAMETER">table constraint definition</replaceable> </synopsis> <refsect2 id="R2-SQL-ALTERTABLE-1"> *************** *** 89,94 **** --- 91,105 ---- </para> </listitem> </varlistentry> + + <varlistentry> + <term><replaceable class="PARAMETER"> table constraint definition </replaceable></term> + <listitem> + <para> + New table constraint for the table + </para> + </listitem> + </varlistentry> </variablelist> </para> </refsect2> *************** *** 144,149 **** --- 155,163 ---- the affected table. Thus, the table or column will remain of the same type and size after this command is executed. + The ADD <replaceable class="PARAMETER">table constraint definition</replaceable> clause + adds a new constraint to the table using the same syntax as <xref + linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-title">. </para> <para> *************** *** 189,194 **** --- 203,218 ---- </para> <para> + In the current implementation, only FOREIGN KEY constraints can + be added to a table. To create or remove a unique constraint, create + a unique index (see <xref linkend="SQL-CREATEINDEX" + endterm="SQL-CREATEINDEX-title">). To add check constraints + you need to recreate and reload the table, using other + parameters to the <xref linkend="SQL-CREATETABLE" + endterm="SQL-CREATETABLE-title"> command. + </para> + + <para> You must own the class in order to change its schema. Renaming any part of the schema of a system catalog is not permitted. *************** *** 227,232 **** --- 251,263 ---- ALTER TABLE distributors RENAME TO suppliers; </programlisting> </para> + + <para> + To add a foreign key constraint to a table: + <programlisting> + ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses(address) MATCH FULL + </programlisting> + </para> </refsect1> <refsect1 id="R1-SQL-ALTERTABLE-3"> *************** *** 253,269 **** <varlistentry> <term> <synopsis> - ALTER TABLE <replaceable class="PARAMETER">table</replaceable> ADD <replaceable class="PARAMETER">table constraint definition</replaceable> ALTER TABLE <replaceable class="PARAMETER">table</replaceable> DROP CONSTRAINT <replaceable class="PARAMETER">constraint</replaceable> { RESTRICT | CASCADE } </synopsis> </term> <listitem> <para> ! Adds or removes a table constraint (such as a check constraint, ! unique constraint, or foreign key constraint). To create ! or remove a unique constraint, create or drop a unique index, ! respectively (see <xref linkend="SQL-CREATEINDEX" endterm="SQL-CREATEINDEX-title">). ! To change other kinds of constraints you need to recreate and reload the table, using other parameters to the <xref linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-title"> command. --- 284,298 ---- <varlistentry> <term> <synopsis> ALTER TABLE <replaceable class="PARAMETER">table</replaceable> DROP CONSTRAINT <replaceable class="PARAMETER">constraint</replaceable> { RESTRICT | CASCADE } </synopsis> </term> <listitem> <para> ! Removes a table constraint (such as a check constraint, ! unique constraint, or foreign key constraint). To ! remove a unique constraint, drop a unique index, ! To remove other kinds of constraints you need to recreate and reload the table, using other parameters to the <xref linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-title"> command. Index: create_table.sgml =================================================================== RCS file: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v retrieving revision 1.17 diff -c -r1.17 create_table.sgml *** create_table.sgml 1999/07/22 15:09:08 1.17 --- create_table.sgml 2000/02/08 21:55:02 *************** *** 477,483 **** <synopsis> [ CONSTRAINT <replaceable class="parameter">name</replaceable> ] { [ NULL | NOT NULL ] | UNIQUE | PRIMARY KEY | CHECK <replaceable ! class="parameter">constraint</replaceable> } [, ...] </synopsis> </para> --- 477,491 ---- <synopsis> [ CONSTRAINT <replaceable class="parameter">name</replaceable> ] { [ NULL | NOT NULL ] | UNIQUE | PRIMARY KEY | CHECK <replaceable ! class="parameter">constraint</replaceable> | REFERENCES ! <replaceable class="parameter">referenced table</replaceable> ! (<replaceable class="parameter">referenced column</replaceable>) ! [ MATCH <replaceable class="parameter">match type</replaceable> ] ! [ ON DELETE <replaceable class="parameter">action</replaceable> ] ! [ ON UPDATE <replaceable class="parameter">action</replaceable> ] ! [ [ NOT ] DEFERRABLE ] ! [ INITIALLY <replaceable class="parameter"> check time </replaceable> ] } ! [, ...] </synopsis> </para> *************** *** 602,615 **** <member>CHECK</member> <member>NOT NULL</member> </simplelist></para> - <note> - <para> - <productname>Postgres</productname> does not yet - (at release 6.5) support - REFERENCES integrity constraints. The parser - accepts the REFERENCES syntax but ignores the clause. - </para> - </note> </refsect2> <refsect2 id="R2-SQL-NOTNULL-1"> --- 610,615 ---- *************** *** 956,962 **** Only one PRIMARY KEY can be specified for a table. </para> </refsect3> ! <refsect3 id="R3-SQL-PRIMARYKEY-3"> <refsect3info> <date>1998-09-11</date> --- 956,962 ---- Only one PRIMARY KEY can be specified for a table. </para> </refsect3> ! <refsect3 id="R3-SQL-PRIMARYKEY-3"> <refsect3info> <date>1998-09-11</date> *************** *** 979,984 **** --- 979,1256 ---- </para> </refsect3> </refsect2> + + <refsect2 id="R2-SQL-REFERENCES-1"> + <refsect2info> + <date>2000-02-04</date> + </refsect2info> + <title> + REFERENCES Constraint + </title> + <synopsis> + [ CONSTRAINT <replaceable class="parameter">name</replaceable> ] REFERENCES + <replaceable class="parameter">referenced table</replaceable> [ ( <replaceable class="parameter"> referenced column</replaceable> ) ] + [ MATCH <replaceable class="parameter">matchtype</replaceable> ] + [ ON DELETE <replaceable class="parameter">action</replaceable> ] + [ ON UPDATE <replaceable class="parameter">action</replaceable> ] + [ [ NOT ] DEFERRABLE ] + [ INITIALLY <replaceable class="parameter"> check time </replaceable> ] + </synopsis> + <para> + The REFERENCES constraint specifies a rule that a column + value is checked against the values of another column. + REFERENCES can also be specified as part of + a FOREIGN KEY table constraint. + </para> + + <refsect3 id="R3-SQL-REFERENCES-1"> + <title>Inputs</title> + <para> + <variablelist> + <varlistentry> + <term>CONSTRAINT <replaceable class="PARAMETER">name</replaceable></term> + <listitem> + <para> + An arbitrary name for the constraint. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><replaceable class="parameter">referenced table</replaceable></term> + <listitem> + <para> + The table that contains the data to check against. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><replaceable class="parameter">referenced column</replaceable></term> + <listitem> + <para> + The column in the <replaceable class="parameter">referenced table</replaceable> + to check the data against. If this is not specified, the PRIMARY KEY of the + <replaceable class="parameter">referenced table</replaceable> is used. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>MATCH <replaceable class="parameter">matchtype</replaceable></term> + <listitem> + <para> + The type of comparison to do between the table data. There are three + types of matching, MATCH FULL, MATCH PARTIAL, and the unspecified match type + used if no match type is specified. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ON DELETE <replaceable class="parameter">action</replaceable></term> + <listitem> + <para> + The action to do when a referenced row in the referenced table is being + deleted. There are the following actions. + <variablelist> + <varlistentry> + <term>CASCADE</term> + <listitem> + <para> + Delete any rows referencing the deleted row. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>RESTRICT</term> + <listitem> + <para> + Disallow deletion of rows being referenced. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET NULL</term> + <listitem> + <para> + Set the referencing column values to NULL. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET DEFAULT</term> + <listitem> + <para> + Set the referencing column values to their default value. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>NO ACTION</term> + <listitem> + <para> + Do nothing. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ON UPDATE <replaceable class="parameter">action</replaceable></term> + <listitem> + <para> + The action to do when a referenced column in the referenced table is being + updated to a new value. If the row is updated, but the referenced column + is not changed, no action is done. There are the following actions. + <variablelist> + <varlistentry> + <term>CASCADE</term> + <listitem> + <para> + Update the value of the referencing column to the new value of the + referenced column. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>RESTRICT</term> + <listitem> + <para> + Disallow update of row being referenced. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET NULL</term> + <listitem> + <para> + Set the referencing column values to NULL. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET DEFAULT</term> + <listitem> + <para> + Set the referencing column values to their default value. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>NO ACTION</term> + <listitem> + <para> + Do nothing. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> [ NOT ] DEFERRABLE </term> + <listitem> + <para> + Tells the trigger manager whether this constraint may be + deferred to the end of transaction. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>INITIALLY <replaceable class="parameter"> check time </replaceable></term> + <listitem> + <para> + <replaceable class="parameter">check time</replaceable> has two possible values + which specify the default time to check the constraint. + <variablelist> + <varlistentry> + <term>DEFERRED</term> + <para> + Check this constraint at the end of the transaction. + </para> + </varlistentry> + <varlistentry> + <term>IMMEDIATE</term> + <para> + Check this constraint after each statement. + </para> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect3> + + + <refsect3 id="R3-SQL-REFERENCES-2"> + <refsect3info> + <date>2000-02-04</date> + </refsect3info> + <title> + Outputs + </title> + <para> + <variablelist> + <varlistentry> + <term><replaceable>status</replaceable></term> + <listitem> + <para> + <variablelist> + <varlistentry> + <term><computeroutput> + ERROR: <replaceable class="parameter">name</replaceable> referential integrity violation - key referenced from + <replaceable class="parameter">table</replaceable> not found in <replaceable class="parameter">referenced table</replaceable> + </computeroutput></term> + <listitem> + <para> + This error occurs at runtime if one tries to insert a value + into a column which does not have a matching column in the + referenced table. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect3> + + <refsect3 id="R3-SQL-REFERENCES-3"> + <title>Description</title> + <para> + The REFERENCES column constraint specifies that a column of a + table must only contain values which match against values + in a referenced column of a referenced table. + </para> + <para> + A value added to this column are matched against the + values of the referenced table and referenced column using + the given match type. + In addition, when the referenced column data is changed, + actions are run upon this column's matching data. + </para> + </refsect3> + + <refsect3 id="R3-SQL-REFERENCES-4"> + <refsect3info> + <date>1998-09-11</date> + </refsect3info> + <title> + Notes + </title> + <para> + Currently <productname>Postgres</productname> only supports + MATCH FULL and an unspecified MATCH type. + In addition, the referenced columns are supposed to be + the columns of a UNIQUE constraint in the referenced table, + however <productname>Postgres</productname> does not + enforce this. + </para> + </refsect3> </refsect1> <refsect1 id="R1-SQL-TABLECONSTRAINT-1"> *************** *** 992,997 **** --- 1264,1277 ---- <synopsis> [ CONSTRAINT name ] { PRIMARY KEY | UNIQUE } ( <replaceable class="parameter">column</replaceable> [, ...] ) [ CONSTRAINT name ] CHECK ( <replaceable>constraint</replaceable> ) + [ CONSTRAINT name ] FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) + REFERENCES <replaceable class="parameter">referenced table</replaceable> + (<replaceable class="parameter">referenced column</replaceable> [, ...] ) + [ MATCH <match type> ] + [ ON DELETE <replaceable class="parameter">action</replaceable> ] + [ ON UPDATE <replaceable class="parameter">action</replaceable> ] + [ [ NOT ] DEFERRABLE ] + [ INITIALLY <replaceable class="parameter"> check time </replaceable> ] </synopsis> </para> <refsect2 id="R2-SQL-TABLECONSTRAINT-1"> *************** *** 1253,1259 **** --- 1533,1803 ---- information. </para> </refsect3> + </refsect2> + <refsect2 id="R2-SQL-REFERENCES-1"> + <refsect2info> + <date>2000-02-04</date> + </refsect2info> + <title> + REFERENCES Constraint + </title> + <synopsis> + [ CONSTRAINT <replaceable class="parameter">name</replaceable> ] + FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFERENCES + <replaceable class="parameter">referenced table</replaceable> [ ( <replaceable class="parameter">referenced column</replaceable> [, ...] ) ] + [ MATCH <replaceable class="parameter">matchtype</replaceable> ] + [ ON DELETE <replaceable class="parameter">action</replaceable> ] + [ ON UPDATE <replaceable class="parameter">action</replaceable> ] + [ [ NOT ] DEFERRABLE ] + [ INITIALLY <replaceable class="parameter"> check time </replaceable> ] + </synopsis> + <para> + The REFERENCES constraint specifies a rule that a column + value is checked against the values of another column. + REFERENCES can also be specified as part of + a FOREIGN KEY table constraint. + </para> + + <refsect3 id="R3-SQL-REFERENCES-1"> + <title>Inputs</title> + <para> + <variablelist> + <varlistentry> + <term>CONSTRAINT <replaceable class="PARAMETER">name</replaceable></term> + <listitem> + <para> + An arbitrary name for the constraint. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><replaceable class="PARAMETER">column</replaceable> [, ...]</term> + <listitem> + <para> + The names of one or more columns in the table. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><replaceable class="parameter">referenced table</replaceable></term> + <listitem> + <para> + The table that contains the data to check against. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><replaceable class="parameter">referenced column</replaceable> [, ...]</term> + <listitem> + <para> + One or more column in the <replaceable class="parameter">referenced table</replaceable> + to check the data against. If this is not specified, the PRIMARY KEY of the + <replaceable class="parameter">referenced table</replaceable> is used. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>MATCH <replaceable class="parameter">matchtype</replaceable></term> + <listitem> + <para> + The type of comparison to do between the table data. There are three + types of matching, MATCH FULL, MATCH PARTIAL, and the unspecified match type + used if no match type is specified. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ON DELETE <replaceable class="parameter">action</replaceable></term> + <listitem> + <para> + The action to do when a referenced row in the referenced table is being + deleted. There are the following actions. + <variablelist> + <varlistentry> + <term>CASCADE</term> + <listitem> + <para> + Delete any rows referencing the deleted row. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>RESTRICT</term> + <listitem> + <para> + Disallow deletion of rows being referenced. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET NULL</term> + <listitem> + <para> + Set the referencing column values to NULL. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET DEFAULT</term> + <listitem> + <para> + Set the referencing column values to their default value. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>NO ACTION</term> + <listitem> + <para> + Do nothing. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ON UPDATE <replaceable class="parameter">action</replaceable></term> + <listitem> + <para> + The action to do when a referenced column in the referenced table is being + updated to a new value. If the row is updated, but the referenced column + is not changed, no action is done. There are the following actions. + <variablelist> + <varlistentry> + <term>CASCADE</term> + <listitem> + <para> + Update the value of the referencing column to the new value of the + referenced column. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>RESTRICT</term> + <listitem> + <para> + Disallow update of row being referenced. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET NULL</term> + <listitem> + <para> + Set the referencing column values to NULL. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>SET DEFAULT</term> + <listitem> + <para> + Set the referencing column values to their default value. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>NO ACTION</term> + <listitem> + <para> + Do nothing. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> [ NOT ] DEFERRABLE </term> + <listitem> + <para> + Tells the trigger manager whether this constraint may be + deferred to the end of transaction. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>INITIALLY <replaceable class="parameter"> check time </replaceable></term> + <listitem> + <para> + <replaceable class="parameter">check time</replaceable> has two possible values + which specify the default time to check the constraint. + <variablelist> + <varlistentry> + <term>DEFERRED</term> + <para> + Check this constraint at the end of the transaction. + </para> + </varlistentry> + <varlistentry> + <term>IMMEDIATE</term> + <para> + Check this constraint after each statement. + </para> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect3> + <refsect3 id="R3-SQL-REFERENCES-2"> + <refsect3info> + <date>2000-02-04</date> + </refsect3info> + <title> + Outputs + </title> + <para> + <variablelist> + <varlistentry> + <term><replaceable>status</replaceable></term> + <listitem> + <para> + <variablelist> + <varlistentry> + <term><computeroutput> + ERROR: <replaceable class="parameter">name</replaceable> referential integrity violation - key referenced from + <replaceable class="parameter">table</replaceable> not found in <replaceable class="parameter">referenced table</replaceable> + </computeroutput></term> + <listitem> + <para> + This error occurs at runtime if one tries to insert a value + into a column which does not have a matching column in the + referenced table. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect3> + <refsect3> + <title>Description</title> + <para> + The FOREIGN KEY constraint specifies a rule that a group of one + or more distinct columns of a table are related to a group + of distinct columns in the referenced table. + </para> + + <para> + The FOREIGN KEY table constraint is similar to that for column constraints, + with the additional capability of encompassing multiple columns. + </para> + <para> + Refer to the section on the FOREIGN KEY column constraint for more + information. + </para> + </refsect3> + </refsect2> </refsect1> Index: pg_dump.sgml =================================================================== RCS file: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v retrieving revision 1.14 diff -c -r1.14 pg_dump.sgml *** pg_dump.sgml 2000/01/24 19:34:13 1.14 --- pg_dump.sgml 2000/02/08 21:55:03 *************** *** 345,350 **** --- 345,360 ---- Large objects are ignored and must be dealt with manually. </para> </listitem> + + <listitem> + <para> + When doing a data only dump, <application>pg_dump</application> emits queries + to disable triggers on user tables before inserting the data and queries to + reenable them after the data has been inserted. If the restore is stopped + in the middle, the system catalogs may be left in the wrong state. + </para> + </listitem> + </itemizedlist> </para> </refsect1>
^ permalink raw reply [nested|flat] 11+ messages in thread

* Re: Updated docs needed for 7.0
  2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
  2000-04-11 11:39 ` Re: Updated docs needed for 7.0 Jan Wieck <wieck@debis.com>
@ 2000-04-11 14:43   ` Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Bruce Momjian @ 2000-04-11 14:43 UTC (permalink / raw)
  To: Jan Wieck <wieck@debis.com>; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>; PostgreSQL-documentation <docs@postgresql.org>

> > OK, I have talked to Thomas and have found which items need work for
> > 7.0.  Comments please.
> >
> > ---------------------------------------------------------------------------
> >
> > > Add CmdTuples() to libpq++(Vince)
> >
> > > New CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands(Jan)
> > > ALTER TABLE CONSTRAINT
> > > First real FOREIGN KEY constraint trigger functionality (Jan)
> > > Add FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE (Jan)
> > > Add FOREIGN KEY ... MATCH  referential actions (Don Baccus)
> > > Add ALTER TABLE ... ADD FOREIGN KEY (Stephan Szabo)
> 
>     Attached  is  are  diffs  for  CREATE/ALTER  table  doc  I've
>     forgotten in my mailbox (sorry). Haven't tried to  apply  and
>     since I don't have working sgml stuff cannot check.

Added.  Thanks.

> 
> > > New lztext data type for compressed text fields
> >
> > Not documented.  I think we want to document it, no?
> 
>     If  at  all,  only  in the release notes because it has to be
>     removed again as soon as we implement TOAST.

OK, I will remove the item from the list of needed doc changes.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2000-04-11 22:10 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-04-11 03:56 Updated docs needed for 7.0 Bruce Momjian <pgman@candle.pha.pa.us>
2000-04-11 04:59 ` Tatsuo Ishii <t-ishii@sra.co.jp>
2000-04-11 15:21   ` Bruce Momjian <pgman@candle.pha.pa.us>
2000-04-11 10:47 ` Peter Eisentraut <e99re41@DoCS.UU.SE>
2000-04-11 14:31   ` Tom Lane <tgl@sss.pgh.pa.us>
2000-04-11 21:45     ` Peter Eisentraut <peter_e@gmx.net>
2000-04-11 21:50       ` Tom Lane <tgl@sss.pgh.pa.us>
2000-04-11 22:10       ` Bruce Momjian <pgman@candle.pha.pa.us>
2000-04-11 14:45   ` Bruce Momjian <pgman@candle.pha.pa.us>
2000-04-11 11:39 ` Jan Wieck <wieck@debis.com>
2000-04-11 14:43   ` Bruce Momjian <pgman@candle.pha.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox