Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Bruce Momjian br...@momjian.us writes: + Exclusion constraints ensure that if any two rows are compared on + the specified columns or expressions using the specified operators, + at least one of these operator comparisons will be false. The syntax is: Isn't that phrasing outright incorrect? Consider nulls. Well, doesn't a comparison returning null really behave as false? Should I reword it as not true or false or null? Either one. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Bruce Momjian br...@momjian.us writes: + Exclusion constraints ensure that if any two rows are compared on + the specified columns or expressions using the specified operators, + at least one of these operator comparisons will be false. The syntax is: Isn't that phrasing outright incorrect? Consider nulls. Well, doesn't a comparison returning null really behave as false? Should I reword it as not true or false or null? Either one. I used false or null. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com Index: doc/src/sgml/ddl.sgml === RCS file: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v retrieving revision 1.91 diff -c -c -r1.91 ddl.sgml *** doc/src/sgml/ddl.sgml 1 Apr 2010 01:18:17 - 1.91 --- doc/src/sgml/ddl.sgml 6 Apr 2010 02:13:57 - *** *** 861,867 para Exclusion constraints ensure that if any two rows are compared on the specified columns or expressions using the specified operators, ! at least one of these operator comparisons will be false. The syntax is: programlisting CREATE TABLE circles ( c circle, --- 861,868 para Exclusion constraints ensure that if any two rows are compared on the specified columns or expressions using the specified operators, ! at least one of these operator comparisons will return false or null. ! The syntax is: programlisting CREATE TABLE circles ( c circle, -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: + Exclusion constraints ensure that if any two rows are compared on + the specified columns or expressions using the specified operators, + at least one of these operator comparisons will be false. The syntax is: Isn't that phrasing outright incorrect? Consider nulls. Well, doesn't a comparison returning null really behave as false? Should I reword it as not true or false or null? -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Bruce Momjian br...@momjian.us writes: + Exclusion constraints ensure that if any two rows are compared on + the specified columns or expressions using the specified operators, + at least one of these operator comparisons will be false. The syntax is: Isn't that phrasing outright incorrect? Consider nulls. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Robert Haas robertmh...@gmail.com wrote: * (seq_page_cost/(random_page_cost)) * EXCLUDE constraints has no tags to be linked. * EXCLUDE constraints is not indexed from the Index page. CREATE TABLE ... CONSTRAINT ... EXCLUDE rather than CREATE TABLE CONSTRAINT ... EXCLUDE. Here is a patch to fix the documentation. For exclusion constraints, I added a tag SQL-CREATETABLE-exclude to varlistentry of EXCLUDE in CREATE TABLE documentation. Also, Exclusion constraints section is added to the constraints doc. But the section is very short and just links to the CREATE TABLE doc. We could move some contents from CREATE TABLE to the constraints doc. Regards, --- Takahiro Itagaki NTT Open Source Software Center docfix_20100331.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
On 31 March 2010 07:56, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Robert Haas robertmh...@gmail.com wrote: * (seq_page_cost/(random_page_cost)) * EXCLUDE constraints has no tags to be linked. * EXCLUDE constraints is not indexed from the Index page. CREATE TABLE ... CONSTRAINT ... EXCLUDE rather than CREATE TABLE CONSTRAINT ... EXCLUDE. Here is a patch to fix the documentation. For exclusion constraints, I added a tag SQL-CREATETABLE-exclude to varlistentry of EXCLUDE in CREATE TABLE documentation. Also, Exclusion constraints section is added to the constraints doc. But the section is very short and just links to the CREATE TABLE doc. We could move some contents from CREATE TABLE to the constraints doc. Regards, --- Takahiro Itagaki NTT Open Source Software Center Just one typo: that that. Regards Thom -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
On Wed, Mar 31, 2010 at 2:56 AM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Robert Haas robertmh...@gmail.com wrote: * (seq_page_cost/(random_page_cost)) * EXCLUDE constraints has no tags to be linked. * EXCLUDE constraints is not indexed from the Index page. CREATE TABLE ... CONSTRAINT ... EXCLUDE rather than CREATE TABLE CONSTRAINT ... EXCLUDE. Here is a patch to fix the documentation. For exclusion constraints, I added a tag SQL-CREATETABLE-exclude to varlistentry of EXCLUDE in CREATE TABLE documentation. Also, Exclusion constraints section is added to the constraints doc. But the section is very short and just links to the CREATE TABLE doc. We could move some contents from CREATE TABLE to the constraints doc. This says: Exclusion constraints ensure that that if any two rows are compared on the specified column(s) or expression(s) using the specified operator(s), not all of these comparisons will return literalTRUE/. I think that's backwards - the last clause should say none of those comparisons will return literalTRUE/. Unless I'm confused. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Robert Haas robertmh...@gmail.com wrote: This says: Exclusion constraints ensure that that if any two rows are compared on the specified column(s) or expression(s) using the specified operator(s), not all of these comparisons will return literalTRUE/. I think that's backwards - the last clause should say none of those comparisons will return literalTRUE/. Unless I'm confused. not all seems correct. For example, you could be checking the room number for equality and a range of time for overlap -- both must be TRUE to have a problem; otherwise you could only schedule one thing in the room for all time and one thing at a given time across all rooms. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
On Wed, Mar 31, 2010 at 1:07 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: This says: Exclusion constraints ensure that that if any two rows are compared on the specified column(s) or expression(s) using the specified operator(s), not all of these comparisons will return literalTRUE/. I think that's backwards - the last clause should say none of those comparisons will return literalTRUE/. Unless I'm confused. not all seems correct. For example, you could be checking the room number for equality and a range of time for overlap -- both must be TRUE to have a problem; otherwise you could only schedule one thing in the room for all time and one thing at a given time across all rooms. Oh, I see. I thought it was referring to all pairs of rows, but I see now it's referring to pairs of columns, so it's correct. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Takahiro Itagaki wrote: Robert Haas robertmh...@gmail.com wrote: * (seq_page_cost/(random_page_cost)) * EXCLUDE constraints has no tags to be linked. * EXCLUDE constraints is not indexed from the Index page. CREATE TABLE ... CONSTRAINT ... EXCLUDE rather than CREATE TABLE CONSTRAINT ... EXCLUDE. Here is a patch to fix the documentation. For exclusion constraints, I added a tag SQL-CREATETABLE-exclude to varlistentry of EXCLUDE in CREATE TABLE documentation. Also, Exclusion constraints section is added to the constraints doc. But the section is very short and just links to the CREATE TABLE doc. We could move some contents from CREATE TABLE to the constraints doc. I applied a clarified version of your submitted patch, attached. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com Index: doc/src/sgml/backup.sgml === RCS file: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v retrieving revision 2.144 diff -c -c -r2.144 backup.sgml *** doc/src/sgml/backup.sgml 22 Feb 2010 17:15:10 - 2.144 --- doc/src/sgml/backup.sgml 31 Mar 2010 23:34:20 - *** *** 604,614 directory). It is advisable to test your proposed archive command to ensure that it indeed does not overwrite an existing file, emphasisand that it returns ! nonzero status in this case/. We have found that literalcp -i/ does ! this correctly on some platforms but not others. If the chosen command ! does not itself handle this case correctly, you should add a command ! to test for existence of the archive file. For example, something ! like: programlisting archive_command = 'test ! -f .../%f amp;amp; cp %p .../%f' /programlisting --- 604,615 directory). It is advisable to test your proposed archive command to ensure that it indeed does not overwrite an existing file, emphasisand that it returns ! nonzero status in this case/. On many Unix platforms, commandcp ! -i/ causes copy to prompt before overwriting a file, and ! literallt; /dev/null/ causes the prompt (and overwriting) to ! fail. If your platform does not support this behavior, you should ! add a command to test for the existence of the archive file. For ! example, something like: programlisting archive_command = 'test ! -f .../%f amp;amp; cp %p .../%f' /programlisting -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [SPAM]Re: [HACKERS] Questions about 9.0 release note
Takahiro Itagaki wrote: Robert Haas robertmh...@gmail.com wrote: * (seq_page_cost/(random_page_cost)) * EXCLUDE constraints has no tags to be linked. * EXCLUDE constraints is not indexed from the Index page. CREATE TABLE ... CONSTRAINT ... EXCLUDE rather than CREATE TABLE CONSTRAINT ... EXCLUDE. Here is a patch to fix the documentation. For exclusion constraints, I added a tag SQL-CREATETABLE-exclude to varlistentry of EXCLUDE in CREATE TABLE documentation. Also, Exclusion constraints section is added to the constraints doc. But the section is very short and just links to the CREATE TABLE doc. We could move some contents from CREATE TABLE to the constraints doc. [ Apologies, proper patch now attached.] I applied a clarified version of your submitted patch. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com diff -cprN head/doc/src/sgml/ddl.sgml work/doc/src/sgml/ddl.sgml *** head/doc/src/sgml/ddl.sgml 2010-02-25 09:58:18.518068000 +0900 --- work/doc/src/sgml/ddl.sgml 2010-03-31 15:46:11.748532000 +0900 *** CREATE TABLE order_items ( *** 845,850 --- 845,880 xref linkend=sql-createtable endterm=sql-createtable-title. /para /sect2 + + sect2 +titleExclusion constraints/title + +indexterm + primaryexclusion constraint/primary +/indexterm + +indexterm + primaryconstraint/primary + secondaryexclusion/secondary +/indexterm + +para + Exclusion constraints ensure that if any two rows are compared on + the specified columns or expressions using the specified operators, + at least one of these operator comparisons will be false. The syntax is: + programlisting + CREATE TABLE circles ( + c circle, + EXCLUDE USING gist (c WITH amp;amp;) + ); + /programlisting +/para + +para + See also link linkend=SQL-CREATETABLE-EXCLUDEcommandCREATE + TABLE ... CONSTRAINT ... EXCLUDE//link for details. +/para + /sect2 /sect1 sect1 id=ddl-system-columns -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers