LIKE ESCAPE doc fix (was Re: [DOCS] functions-matching correct?)

Поиск
Список
Период
Сортировка
Искать

LIKE ESCAPE doc fix (was Re: [DOCS] functions-matching correct?)

От:
Joe Conway <mail@joeconway.com>
Дата:
Tom Lane wrote:
> Joe Conway  writes:
> 
>>7.2.1 docs:
>>http://www.postgresql.org/idocs/index.php?functions-matching.html#FUNCTIONS-LIKE
> 
> 
>>" It's also possible to select no escape character by writing ESCAPE ''. 
>>In this case there is no way to turn off the special meaning of 
>>underscore and percent signs in the pattern."
> 
> 
>>7.3 development docs:
>>http://developer.postgresql.org/docs/postgres/functions-matching.html#FUNCTIONS-LIKE
> 
> 
>>" It's also possible to select no escape character by writing ESCAPE ''. 
>>This effectively disables the escape mechanism and turns off the special 
>>meaning of underscore and percent signs in the pattern."
> 
> 
>>I think the former is still correct, isn't it?
> 
> 
> Yes, as is easily proven by experiment:
> 
> regression=# select 'foo' LIKE 'f%';
>  ?column?
> ----------
>  t
> (1 row)
> 
> regression=# select 'foo' LIKE 'f%' escape '';
>  ?column?
> ----------
>  t
> (1 row)
> 
> Who put that change in?

Here's a small doc patch to fix this issue. Please apply.

Thanks,

Joe

Index: doc/src/sgml/func.sgml
===================================================================
RCS file: /opt/src/cvs/pgsql-server/doc/src/sgml/func.sgml,v
retrieving revision 1.114
diff -c -r1.114 func.sgml
*** doc/src/sgml/func.sgml	21 Aug 2002 05:25:49 -0000	1.114
--- doc/src/sgml/func.sgml	21 Aug 2002 05:42:49 -0000
***************
*** 2238,2246 ****
     
      It's also possible to select no escape character by writing
      ESCAPE ''.  This effectively disables the
!      escape mechanism and
!      turns off the special meaning of underscore and percent signs in
!     the pattern.
     
  
     
--- 2238,2245 ----
     
      It's also possible to select no escape character by writing
      ESCAPE ''.  This effectively disables the
!     escape mechanism, which makes it impossible to turn off the
!     special meaning of underscore and percent signs in the pattern.
     
  
     

Re: LIKE ESCAPE doc fix (was Re: [DOCS] functions-matching

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Your patch has been added to the PostgreSQL unapplied patches list at:

	http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

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


Joe Conway wrote:
> Tom Lane wrote:
> > Joe Conway  writes:
> > 
> >>7.2.1 docs:
> >>http://www.postgresql.org/idocs/index.php?functions-matching.html#FUNCTIONS-LIKE
> > 
> > 
> >>" It's also possible to select no escape character by writing ESCAPE ''. 
> >>In this case there is no way to turn off the special meaning of 
> >>underscore and percent signs in the pattern."
> > 
> > 
> >>7.3 development docs:
> >>http://developer.postgresql.org/docs/postgres/functions-matching.html#FUNCTIONS-LIKE
> > 
> > 
> >>" It's also possible to select no escape character by writing ESCAPE ''. 
> >>This effectively disables the escape mechanism and turns off the special 
> >>meaning of underscore and percent signs in the pattern."
> > 
> > 
> >>I think the former is still correct, isn't it?
> > 
> > 
> > Yes, as is easily proven by experiment:
> > 
> > regression=# select 'foo' LIKE 'f%';
> >  ?column?
> > ----------
> >  t
> > (1 row)
> > 
> > regression=# select 'foo' LIKE 'f%' escape '';
> >  ?column?
> > ----------
> >  t
> > (1 row)
> > 
> > Who put that change in?
> 
> Here's a small doc patch to fix this issue. Please apply.
> 
> Thanks,
> 
> Joe
> 

> Index: doc/src/sgml/func.sgml
> ===================================================================
> RCS file: /opt/src/cvs/pgsql-server/doc/src/sgml/func.sgml,v
> retrieving revision 1.114
> diff -c -r1.114 func.sgml
> *** doc/src/sgml/func.sgml	21 Aug 2002 05:25:49 -0000	1.114
> --- doc/src/sgml/func.sgml	21 Aug 2002 05:42:49 -0000
> ***************
> *** 2238,2246 ****
>      
>       It's also possible to select no escape character by writing
>       ESCAPE ''.  This effectively disables the
> !      escape mechanism and
> !      turns off the special meaning of underscore and percent signs in
> !     the pattern.
>      
>   
>      
> --- 2238,2245 ----
>      
>       It's also possible to select no escape character by writing
>       ESCAPE ''.  This effectively disables the
> !     escape mechanism, which makes it impossible to turn off the
> !     special meaning of underscore and percent signs in the pattern.
>      
>   
>      

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: LIKE ESCAPE doc fix (was Re: [DOCS] functions-matching

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Patch applied.  Thanks.

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


Joe Conway wrote:
> Tom Lane wrote:
> > Joe Conway  writes:
> > 
> >>7.2.1 docs:
> >>http://www.postgresql.org/idocs/index.php?functions-matching.html#FUNCTIONS-LIKE
> > 
> > 
> >>" It's also possible to select no escape character by writing ESCAPE ''. 
> >>In this case there is no way to turn off the special meaning of 
> >>underscore and percent signs in the pattern."
> > 
> > 
> >>7.3 development docs:
> >>http://developer.postgresql.org/docs/postgres/functions-matching.html#FUNCTIONS-LIKE
> > 
> > 
> >>" It's also possible to select no escape character by writing ESCAPE ''. 
> >>This effectively disables the escape mechanism and turns off the special 
> >>meaning of underscore and percent signs in the pattern."
> > 
> > 
> >>I think the former is still correct, isn't it?
> > 
> > 
> > Yes, as is easily proven by experiment:
> > 
> > regression=# select 'foo' LIKE 'f%';
> >  ?column?
> > ----------
> >  t
> > (1 row)
> > 
> > regression=# select 'foo' LIKE 'f%' escape '';
> >  ?column?
> > ----------
> >  t
> > (1 row)
> > 
> > Who put that change in?
> 
> Here's a small doc patch to fix this issue. Please apply.
> 
> Thanks,
> 
> Joe
> 

> Index: doc/src/sgml/func.sgml
> ===================================================================
> RCS file: /opt/src/cvs/pgsql-server/doc/src/sgml/func.sgml,v
> retrieving revision 1.114
> diff -c -r1.114 func.sgml
> *** doc/src/sgml/func.sgml	21 Aug 2002 05:25:49 -0000	1.114
> --- doc/src/sgml/func.sgml	21 Aug 2002 05:42:49 -0000
> ***************
> *** 2238,2246 ****
>      
>       It's also possible to select no escape character by writing
>       ESCAPE ''.  This effectively disables the
> !      escape mechanism and
> !      turns off the special meaning of underscore and percent signs in
> !     the pattern.
>      
>   
>      
> --- 2238,2245 ----
>      
>       It's also possible to select no escape character by writing
>       ESCAPE ''.  This effectively disables the
> !     escape mechanism, which makes it impossible to turn off the
> !     special meaning of underscore and percent signs in the pattern.
>      
>   
>      

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
FAQ