Thread: ToDo: add documentation for operator IS OF

ToDo: add documentation for operator IS OF

From
"Pavel Stehule"
Date:
Hello,

I miss doc for this operator

Regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci. 
http://messenger.msn.cz/



Re: ToDo: add documentation for operator IS OF

From
Bruce Momjian
Date:
Pavel Stehule wrote:
> Hello,
>
> I miss doc for this operator

Strang IS [NOT] OF wasn't documented, especially seeing it was added in
PostgreSQL 7.3.  Anyway, documented and backpatched to 8.2.X.

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/func.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.365
diff -c -c -r1.365 func.sgml
*** doc/src/sgml/func.sgml    19 Feb 2007 22:51:44 -0000    1.365
--- doc/src/sgml/func.sgml    20 Feb 2007 00:24:15 -0000
***************
*** 411,416 ****
--- 411,432 ----
      <literal>IS NOT NULL</literal>, respectively, except that the input
      expression must be of Boolean type.
     </para>
+
+    <para>
+     <indexterm>
+      <primary>IS OF</primary>
+     </indexterm>
+     <indexterm>
+      <primary>IS NOT OF</primary>
+     </indexterm>
+     It is possible to check the data type of an expression using the
+     constructs
+ <synopsis>
+ <replaceable>expression</replaceable> IS OF (typename, ...)
+ <replaceable>expression</replaceable> IS NOT OF (typename, ...)
+ </synopsis>
+     They return a boolean value based on whether the expression's data
+     type is one of the listed data types.
    </sect1>

    <sect1 id="functions-math">
Index: doc/src/sgml/syntax.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v
retrieving revision 1.115
diff -c -c -r1.115 syntax.sgml
*** doc/src/sgml/syntax.sgml    6 Feb 2007 09:16:07 -0000    1.115
--- doc/src/sgml/syntax.sgml    20 Feb 2007 00:24:15 -0000
***************
*** 847,853 ****
        <row>
         <entry><token>IS</token></entry>
         <entry></entry>
!        <entry><literal>IS TRUE</>, <literal>IS FALSE</>, <literal>IS UNKNOWN</>, <literal>IS NULL</></entry>
        </row>

        <row>
--- 847,854 ----
        <row>
         <entry><token>IS</token></entry>
         <entry></entry>
!        <entry><literal>IS TRUE</>, <literal>IS FALSE</>, <literal>IS
!        UNKNOWN</>, <literal>IS NULL</>, <literal>IS OF</></entry>
        </row>

        <row>

Re: ToDo: add documentation for operator IS OF

From
Joe Conway
Date:
Bruce Momjian wrote:
> Pavel Stehule wrote:
>> Hello,
>>
>> I miss doc for this operator
> 
> Strang IS [NOT] OF wasn't documented, especially seeing it was added in
> PostgreSQL 7.3.  Anyway, documented and backpatched to 8.2.X.

Here's the reason -- see this thread:
http://archives.postgresql.org/pgsql-patches/2003-08/msg00062.php

Joe



Re: ToDo: add documentation for operator IS OF

From
Bruce Momjian
Date:
Joe Conway wrote:
> Bruce Momjian wrote:
> > Pavel Stehule wrote:
> >> Hello,
> >>
> >> I miss doc for this operator
> > 
> > Strang IS [NOT] OF wasn't documented, especially seeing it was added in
> > PostgreSQL 7.3.  Anyway, documented and backpatched to 8.2.X.
> 
> Here's the reason -- see this thread:
> http://archives.postgresql.org/pgsql-patches/2003-08/msg00062.php

Wow, interesting.  I do remember that now.  Should I revert the
documentation addition and add a comment to gram.y?

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: ToDo: add documentation for operator IS OF

From
"Pavel Stehule"
Date:
>Joe Conway wrote:
> > Bruce Momjian wrote:
> > > Pavel Stehule wrote:
> > >> Hello,
> > >>
> > >> I miss doc for this operator
> > >
> > > Strang IS [NOT] OF wasn't documented, especially seeing it was added 
>in
> > > PostgreSQL 7.3.  Anyway, documented and backpatched to 8.2.X.
> >
> > Here's the reason -- see this thread:
> > http://archives.postgresql.org/pgsql-patches/2003-08/msg00062.php
>
>Wow, interesting.  I do remember that now.  Should I revert the
>documentation addition and add a comment to gram.y?
>

Nobody worked on this subject a lot of years. Who need it, knows about it 
and use it. I am for this topic is documented and in doc is note about 
difference from standard and about some incompletness of this operator.

regards
Pavel Stehule

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/



Re: ToDo: add documentation for operator IS OF

From
Tom Lane
Date:
"Pavel Stehule" <pavel.stehule@hotmail.com> writes:
> Nobody worked on this subject a lot of years. Who need it, knows about it 
> and use it. I am for this topic is documented and in doc is note about 
> difference from standard and about some incompletness of this operator.

Once we document it there's going to be a backward-compatibility issue
for any proposals to fix it.  And I do think it is broken in a number
of ways:
http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php

Per the link Joe cited, I'm not real thrilled with the spec's special
treatment of NULL, but I'd like to see us fix IS OF so that it can be
a substitute for testing tableoid to see which child table a tuple
came from.  And we definitely need to consider the domain issue.
        regards, tom lane


Re: ToDo: add documentation for operator IS OF

From
Peter Eisentraut
Date:
Am Dienstag, 20. Februar 2007 02:13 schrieb Bruce Momjian:
> Wow, interesting.  I do remember that now.  Should I revert the
> documentation addition and add a comment to gram.y?

I'd say remove the code.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


Re: ToDo: add documentation for operator IS OF

From
"Pavel Stehule"
Date:
>Am Dienstag, 20. Februar 2007 02:13 schrieb Bruce Momjian:
> > Wow, interesting.  I do remember that now.  Should I revert the
> > documentation addition and add a comment to gram.y?
>
>I'd say remove the code.
>

Propably nobody use it for inheritancy, but some people (I am too) use it in 
polymorphic functions. You can remove it, but please replace it.

Regards
Pavel Stehule

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/



Re: ToDo: add documentation for operator IS OF

From
Bruce Momjian
Date:
bruce wrote:
> Joe Conway wrote:
> > Bruce Momjian wrote:
> > > Pavel Stehule wrote:
> > >> Hello,
> > >>
> > >> I miss doc for this operator
> > > 
> > > Strang IS [NOT] OF wasn't documented, especially seeing it was added in
> > > PostgreSQL 7.3.  Anyway, documented and backpatched to 8.2.X.
> > 
> > Here's the reason -- see this thread:
> > http://archives.postgresql.org/pgsql-patches/2003-08/msg00062.php
> 
> Wow, interesting.  I do remember that now.  Should I revert the
> documentation addition and add a comment to gram.y?

OK, I have votes to remove the code, remove the documentation, and keep
all of it but document its behavior might change in the future.

I will leave the documentation, but comment it out so it doesn't appear
in the output, and state why in the comment.

I will also add a TODO item.

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: ToDo: add documentation for operator IS OF

From
"Pavel Stehule"
Date:
> > documentation addition and add a comment to gram.y?
>
>OK, I have votes to remove the code, remove the documentation, and keep
>all of it but document its behavior might change in the future.

what code do you want to remove?

>
>I will leave the documentation, but comment it out so it doesn't appear
>in the output, and state why in the comment.
>
>I will also add a TODO item.
>
>--
>   Bruce Momjian  <bruce@momjian.us>          http://momjian.us
>   EnterpriseDB                               http://www.enterprisedb.com
>
>   + If your life is a hard drive, Christ can be your backup. +

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/



Re: ToDo: add documentation for operator IS OF

From
Bruce Momjian
Date:
Pavel Stehule wrote:
> > > documentation addition and add a comment to gram.y?
> >
> >OK, I have votes to remove the code, remove the documentation, and keep
> >all of it but document its behavior might change in the future.
> 
> what code do you want to remove?

Peter suggested removing the IS OF code itself.

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: ToDo: add documentation for operator IS OF

From
"Pavel Stehule"
Date:
> > what code do you want to remove?
>
>Peter suggested removing the IS OF code itself.
>

without compensation you hip lot of people. Time for removing was 4 years 
ago.

Regards
Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com. 
http://www.msn.cz/