Thomas Lockhart wrote:
> ...
> > Fix SIMILAR TO to be Posix compiant or remove it
> 
> Sorry, was there a decision here?
> 
> No one has described the problem, just declared that there is one and
> declared that the feature should be removed.
> 
> In the old days, one might have expected to approach this differently,
> with a contribution to help fix a problem, after describing it. I'm not
> quite understanding the current process, if there is one.
> 

I had it in my mailbox as an unresolved issue.  Peter wanted it added so
I did it.  I don't know the issue either.  If you want it removed from
open item, I will do that too.

-- 
  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

Wed, 18 Sep 2002 19:20:58 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Open 7.3 items
On Wed, 18 Sep 2002, Bruce Momjian wrote:

> Thomas Lockhart wrote:
> > ...
> > > Fix SIMILAR TO to be Posix compiant or remove it
> >
> > Sorry, was there a decision here?
> >
> > No one has described the problem, just declared that there is one and
> > declared that the feature should be removed.
> >
> > In the old days, one might have expected to approach this differently,
> > with a contribution to help fix a problem, after describing it. I'm not
> > quite understanding the current process, if there is one.
> >
>
> I had it in my mailbox as an unresolved issue.  Peter wanted it added so
> I did it.  I don't know the issue either.  If you want it removed from
> open item, I will do that too.

Well, if nobody can identify what exactly the problem is, it should
definitely be removed from the Open Items list ... maybe we need to lay
down some 'rules' for the TODO list?  Some sort of criteria other hten
"someone suggested it" to work with?  For instance, change the TODO to a
pseudo-FAQ format ... where an item added to it has to have some sort of
'associated' description?

For instance, how is SIMILAR TO *not* Posix compliant?  What *is* a Posix
compliant version?  Where is such compliance defined?  Is there a
reference?

Also, since when has 'lack of compliance' been basis to remove something
... "its not fully compliant, so even partial functionality isn't
allowed"?

Basically, there should be *some* basis for an item to be on the TODO list
... some sort "this is how it should be" ...

How many items on the TODO list are ones that nobody even knows what they
are about anymore? :)



Wed, 18 Sep 2002 22:55:59 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org>
The TODO List (Was: Re: Open 7.3 items)
Marc G. Fournier wrote:
> Well, if nobody can identify what exactly the problem is, it should
> definitely be removed from the Open Items list ... maybe we need to lay
> down some 'rules' for the TODO list?  Some sort of criteria other hten
> "someone suggested it" to work with?  For instance, change the TODO to a
> pseudo-FAQ format ... where an item added to it has to have some sort of
> 'associated' description?
> 
> For instance, how is SIMILAR TO *not* Posix compliant?  What *is* a Posix
> compliant version?  Where is such compliance defined?  Is there a
> reference?
> 
> Also, since when has 'lack of compliance' been basis to remove something
> ... "its not fully compliant, so even partial functionality isn't
> allowed"?
> 
> Basically, there should be *some* basis for an item to be on the TODO list
> ... some sort "this is how it should be" ...
> 
> How many items on the TODO list are ones that nobody even knows what they
> are about anymore? :)

I think you are confusing the open items list with the TODO list.  TODO
usually has some basis, while open items is just that, things we need to
decide on.  Peter brought it up and wanted it on the list so I put it
on.  I can be taken off just as easily.  I put Peter's name on the item,
and a question mark. The open items list is just so we don't forget
things.

-- 
  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

Wed, 18 Sep 2002 22:02:08 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items)
On Wed, 18 Sep 2002, Bruce Momjian wrote:

> I think you are confusing the open items list with the TODO list.  TODO
> usually has some basis, while open items is just that, things we need to
> decide on.  Peter brought it up and wanted it on the list so I put it
> on.  I can be taken off just as easily.  I put Peter's name on the item,
> and a question mark. The open items list is just so we don't forget
> things.

I'm in agreement with Thomas here ... unless a problem has been defined a
bit more specifically then 'it isn't posix compliant', it shouldn't be
considered an open item ... please remove?


Wed, 18 Sep 2002 23:28:39 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org>
Re: The TODO List (Was: Re: Open 7.3 items)
Marc G. Fournier wrote:
> On Wed, 18 Sep 2002, Bruce Momjian wrote:
> 
> > I think you are confusing the open items list with the TODO list.  TODO
> > usually has some basis, while open items is just that, things we need to
> > decide on.  Peter brought it up and wanted it on the list so I put it
> > on.  I can be taken off just as easily.  I put Peter's name on the item,
> > and a question mark. The open items list is just so we don't forget
> > things.
> 
> I'm in agreement with Thomas here ... unless a problem has been defined a
> bit more specifically then 'it isn't posix compliant', it shouldn't be
> considered an open item ... please remove?

Removed.  See, I can remove them as quickly as I add them.  :-)

-- 
  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

Wed, 18 Sep 2002 22:34:32 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items)
"Marc G. Fournier" <scrappy@hub.org> writes:
> I'm in agreement with Thomas here ... unless a problem has been defined a
> bit more specifically then 'it isn't posix compliant', it shouldn't be
> considered an open item ... please remove?

A quick review of SQL99 says that their notion of SIMILAR TO patterns
is an unholy witches' brew: it does *both* common-or-garden regexp
expressions and LIKE patterns.  Specifically, I see these
metacharacters:

	|		OR  (regexp-ish)

	*		repeat 0 or more times  (regexp-ish)

	+		repeat 1 or more times  (regexp-ish)

	%		match any character sequence  (like LIKE)

	_		match any one character  (like LIKE)

	[...]		almost-but-not-quite-regexp-ish character class

	(...)		grouping  (regexp-ish)

plus a just-like-LIKE treatment of a selectable escape character.

But the most important variation from common regex practice is that
(if I'm reading the spec correctly) the pattern must match to the
entire target string --- ie, it's effectively both left- and right-
anchored.  This is like LIKE patterns but utterly unlike common regexp
usage.

I could live with the fact that our regexp patterns don't implement all
of the spec-mandated metacharacters.  But I do not think we can ignore
the difference in anchoring behavior.  This is not a subset of the spec
behavior, it is just plain wrong.

I vote with Peter: we fix this or we disable it before 7.3 release.
It is not anywhere near spec compliant, and we will be doing no one
a favor by releasing it in the current state.

			regards, tom lane

Wed, 18 Sep 2002 23:14:20 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items) 

Re-added to open items:

	Fix SIMILAR TO to be ANSI compliant or remove it (Peter, Tom)

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

Tom Lane wrote:
> "Marc G. Fournier" <scrappy@hub.org> writes:
> > I'm in agreement with Thomas here ... unless a problem has been defined a
> > bit more specifically then 'it isn't posix compliant', it shouldn't be
> > considered an open item ... please remove?
> 
> A quick review of SQL99 says that their notion of SIMILAR TO patterns
> is an unholy witches' brew: it does *both* common-or-garden regexp
> expressions and LIKE patterns.  Specifically, I see these
> metacharacters:
> 
> 	|		OR  (regexp-ish)
> 
> 	*		repeat 0 or more times  (regexp-ish)
> 
> 	+		repeat 1 or more times  (regexp-ish)
> 
> 	%		match any character sequence  (like LIKE)
> 
> 	_		match any one character  (like LIKE)
> 
> 	[...]		almost-but-not-quite-regexp-ish character class
> 
> 	(...)		grouping  (regexp-ish)
> 
> plus a just-like-LIKE treatment of a selectable escape character.
> 
> But the most important variation from common regex practice is that
> (if I'm reading the spec correctly) the pattern must match to the
> entire target string --- ie, it's effectively both left- and right-
> anchored.  This is like LIKE patterns but utterly unlike common regexp
> usage.
> 
> I could live with the fact that our regexp patterns don't implement all
> of the spec-mandated metacharacters.  But I do not think we can ignore
> the difference in anchoring behavior.  This is not a subset of the spec
> behavior, it is just plain wrong.
> 
> I vote with Peter: we fix this or we disable it before 7.3 release.
> It is not anywhere near spec compliant, and we will be doing no one
> a favor by releasing it in the current state.
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
  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

Wed, 18 Sep 2002 23:33:00 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items)
On Wed, 18 Sep 2002, Tom Lane wrote:

> "Marc G. Fournier" <scrappy@hub.org> writes:
> > I'm in agreement with Thomas here ... unless a problem has been defined a
> > bit more specifically then 'it isn't posix compliant', it shouldn't be
> > considered an open item ... please remove?
>
> A quick review of SQL99 says that their notion of SIMILAR TO patterns
> is an unholy witches' brew: it does *both* common-or-garden regexp
> expressions and LIKE patterns.  Specifically, I see these
> metacharacters:
>
> 	|		OR  (regexp-ish)
>
> 	*		repeat 0 or more times  (regexp-ish)
>
> 	+		repeat 1 or more times  (regexp-ish)
>
> 	%		match any character sequence  (like LIKE)
>
> 	_		match any one character  (like LIKE)
>
> 	[...]		almost-but-not-quite-regexp-ish character class
>
> 	(...)		grouping  (regexp-ish)
>
> plus a just-like-LIKE treatment of a selectable escape character.
>
> But the most important variation from common regex practice is that
> (if I'm reading the spec correctly) the pattern must match to the
> entire target string --- ie, it's effectively both left- and right-
> anchored.  This is like LIKE patterns but utterly unlike common regexp
> usage.
>
> I could live with the fact that our regexp patterns don't implement all
> of the spec-mandated metacharacters.  But I do not think we can ignore
> the difference in anchoring behavior.  This is not a subset of the spec
> behavior, it is just plain wrong.
>
> I vote with Peter: we fix this or we disable it before 7.3 release.
> It is not anywhere near spec compliant, and we will be doing no one
> a favor by releasing it in the current state.

What would it take to get it to a fixed state?  Who implemented SIMILAR TO
in the first place?  Who is able to fix this?  And, finally, what are the
implications of leaving things as they are?

 From my read of what you are saying above, its currently implemented with
an implied ^ and $ around the pattern match?


Thu, 19 Sep 2002 01:40:09 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org>
Re: The TODO List (Was: Re: Open 7.3 items) 
On Wed, 18 Sep 2002, Bruce Momjian wrote:

>
> Re-added to open items:
>
> 	Fix SIMILAR TO to be ANSI compliant or remove it (Peter, Tom)

Tke that @#$@$@@$@#$ thing out of there until its actually been fully
discussed ... you are starting to remind me of Charlie Brown ... this, I
think, was Thomas' whole point, in that things are added way too faster
and easily without fully understanding all of the ramifications ... let a
discussion cool down *before* you take things off, or add things to, the
list ...




>
> ---------------------------------------------------------------------------
>
> Tom Lane wrote:
> > "Marc G. Fournier" <scrappy@hub.org> writes:
> > > I'm in agreement with Thomas here ... unless a problem has been defined a
> > > bit more specifically then 'it isn't posix compliant', it shouldn't be
> > > considered an open item ... please remove?
> >
> > A quick review of SQL99 says that their notion of SIMILAR TO patterns
> > is an unholy witches' brew: it does *both* common-or-garden regexp
> > expressions and LIKE patterns.  Specifically, I see these
> > metacharacters:
> >
> > 	|		OR  (regexp-ish)
> >
> > 	*		repeat 0 or more times  (regexp-ish)
> >
> > 	+		repeat 1 or more times  (regexp-ish)
> >
> > 	%		match any character sequence  (like LIKE)
> >
> > 	_		match any one character  (like LIKE)
> >
> > 	[...]		almost-but-not-quite-regexp-ish character class
> >
> > 	(...)		grouping  (regexp-ish)
> >
> > plus a just-like-LIKE treatment of a selectable escape character.
> >
> > But the most important variation from common regex practice is that
> > (if I'm reading the spec correctly) the pattern must match to the
> > entire target string --- ie, it's effectively both left- and right-
> > anchored.  This is like LIKE patterns but utterly unlike common regexp
> > usage.
> >
> > I could live with the fact that our regexp patterns don't implement all
> > of the spec-mandated metacharacters.  But I do not think we can ignore
> > the difference in anchoring behavior.  This is not a subset of the spec
> > behavior, it is just plain wrong.
> >
> > I vote with Peter: we fix this or we disable it before 7.3 release.
> > It is not anywhere near spec compliant, and we will be doing no one
> > a favor by releasing it in the current state.
> >
> > 			regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
>
> --
>   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
>


Thu, 19 Sep 2002 01:42:54 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org>
Re: The TODO List (Was: Re: Open 7.3 items)

It is an open issue.  It has to be resolved. When it is, I will remove
it.  I added a question mark to it but it needs to be tracked.  I keep
having to add and remove it because I have people telling me what to do.

It was Peter who told me to add it, and you and Thomas to remove it.  It
isn't me adding/removing on my own.

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

Marc G. Fournier wrote:
> On Wed, 18 Sep 2002, Bruce Momjian wrote:
> 
> >
> > Re-added to open items:
> >
> > 	Fix SIMILAR TO to be ANSI compliant or remove it (Peter, Tom)
> 
> Tke that @#$@$@@$@#$ thing out of there until its actually been fully
> discussed ... you are starting to remind me of Charlie Brown ... this, I
> think, was Thomas' whole point, in that things are added way too faster
> and easily without fully understanding all of the ramifications ... let a
> discussion cool down *before* you take things off, or add things to, the
> list ...
> 
> 
> 
> 
> >
> > ---------------------------------------------------------------------------
> >
> > Tom Lane wrote:
> > > "Marc G. Fournier" <scrappy@hub.org> writes:
> > > > I'm in agreement with Thomas here ... unless a problem has been defined a
> > > > bit more specifically then 'it isn't posix compliant', it shouldn't be
> > > > considered an open item ... please remove?
> > >
> > > A quick review of SQL99 says that their notion of SIMILAR TO patterns
> > > is an unholy witches' brew: it does *both* common-or-garden regexp
> > > expressions and LIKE patterns.  Specifically, I see these
> > > metacharacters:
> > >
> > > 	|		OR  (regexp-ish)
> > >
> > > 	*		repeat 0 or more times  (regexp-ish)
> > >
> > > 	+		repeat 1 or more times  (regexp-ish)
> > >
> > > 	%		match any character sequence  (like LIKE)
> > >
> > > 	_		match any one character  (like LIKE)
> > >
> > > 	[...]		almost-but-not-quite-regexp-ish character class
> > >
> > > 	(...)		grouping  (regexp-ish)
> > >
> > > plus a just-like-LIKE treatment of a selectable escape character.
> > >
> > > But the most important variation from common regex practice is that
> > > (if I'm reading the spec correctly) the pattern must match to the
> > > entire target string --- ie, it's effectively both left- and right-
> > > anchored.  This is like LIKE patterns but utterly unlike common regexp
> > > usage.
> > >
> > > I could live with the fact that our regexp patterns don't implement all
> > > of the spec-mandated metacharacters.  But I do not think we can ignore
> > > the difference in anchoring behavior.  This is not a subset of the spec
> > > behavior, it is just plain wrong.
> > >
> > > I vote with Peter: we fix this or we disable it before 7.3 release.
> > > It is not anywhere near spec compliant, and we will be doing no one
> > > a favor by releasing it in the current state.
> > >
> > > 			regards, tom lane
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
> > >
> >
> > --
> >   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
> >
> 
> 

-- 
  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

Thu, 19 Sep 2002 00:46:59 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items)
On Thu, 19 Sep 2002, Bruce Momjian wrote:

>
> It is an open issue.  It has to be resolved. When it is, I will remove
> it.  I added a question mark to it but it needs to be tracked.  I keep
> having to add and remove it because I have people telling me what to do.
>
> It was Peter who told me to add it, and you and Thomas to remove it.  It
> isn't me adding/removing on my own.

Right, so you have two telling you to remove it, one telling  you to add
it, and two that are discussion why/if it *should* be added ... Tom feels
it should be added, and I'm clarifing the why of it ... don't re-add it
until we've determined *if* it is actually an open issue or not ... stop
jumping the gun ...


 >
> ---------------------------------------------------------------------------
>
> Marc G. Fournier wrote:
> > On Wed, 18 Sep 2002, Bruce Momjian wrote:
> >
> > >
> > > Re-added to open items:
> > >
> > > 	Fix SIMILAR TO to be ANSI compliant or remove it (Peter, Tom)
> >
> > Tke that @#$@$@@$@#$ thing out of there until its actually been fully
> > discussed ... you are starting to remind me of Charlie Brown ... this, I
> > think, was Thomas' whole point, in that things are added way too faster
> > and easily without fully understanding all of the ramifications ... let a
> > discussion cool down *before* you take things off, or add things to, the
> > list ...
> >
> >
> >
> >
> > >
> > > ---------------------------------------------------------------------------
> > >
> > > Tom Lane wrote:
> > > > "Marc G. Fournier" <scrappy@hub.org> writes:
> > > > > I'm in agreement with Thomas here ... unless a problem has been defined a
> > > > > bit more specifically then 'it isn't posix compliant', it shouldn't be
> > > > > considered an open item ... please remove?
> > > >
> > > > A quick review of SQL99 says that their notion of SIMILAR TO patterns
> > > > is an unholy witches' brew: it does *both* common-or-garden regexp
> > > > expressions and LIKE patterns.  Specifically, I see these
> > > > metacharacters:
> > > >
> > > > 	|		OR  (regexp-ish)
> > > >
> > > > 	*		repeat 0 or more times  (regexp-ish)
> > > >
> > > > 	+		repeat 1 or more times  (regexp-ish)
> > > >
> > > > 	%		match any character sequence  (like LIKE)
> > > >
> > > > 	_		match any one character  (like LIKE)
> > > >
> > > > 	[...]		almost-but-not-quite-regexp-ish character class
> > > >
> > > > 	(...)		grouping  (regexp-ish)
> > > >
> > > > plus a just-like-LIKE treatment of a selectable escape character.
> > > >
> > > > But the most important variation from common regex practice is that
> > > > (if I'm reading the spec correctly) the pattern must match to the
> > > > entire target string --- ie, it's effectively both left- and right-
> > > > anchored.  This is like LIKE patterns but utterly unlike common regexp
> > > > usage.
> > > >
> > > > I could live with the fact that our regexp patterns don't implement all
> > > > of the spec-mandated metacharacters.  But I do not think we can ignore
> > > > the difference in anchoring behavior.  This is not a subset of the spec
> > > > behavior, it is just plain wrong.
> > > >
> > > > I vote with Peter: we fix this or we disable it before 7.3 release.
> > > > It is not anywhere near spec compliant, and we will be doing no one
> > > > a favor by releasing it in the current state.
> > > >
> > > > 			regards, tom lane
> > > >
> > > > ---------------------------(end of broadcast)---------------------------
> > > > TIP 4: Don't 'kill -9' the postmaster
> > > >
> > >
> > > --
> > >   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
> > >
> >
> >
>
> --
>   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
>


Thu, 19 Sep 2002 01:57:55 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org>
Re: The TODO List (Was: Re: Open 7.3 items)
Marc G. Fournier wrote:
> On Thu, 19 Sep 2002, Bruce Momjian wrote:
> 
> >
> > It is an open issue.  It has to be resolved. When it is, I will remove
> > it.  I added a question mark to it but it needs to be tracked.  I keep
> > having to add and remove it because I have people telling me what to do.
> >
> > It was Peter who told me to add it, and you and Thomas to remove it.  It
> > isn't me adding/removing on my own.
> 
> Right, so you have two telling you to remove it, one telling  you to add
> it, and two that are discussion why/if it *should* be added ... Tom feels
> it should be added, and I'm clarifing the why of it ... don't re-add it
> until we've determined *if* it is actually an open issue or not ... stop
> jumping the gun ...

I will make the decision.  If you want to maintain your own open items
list, go ahead.

-- 
  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

Thu, 19 Sep 2002 01:00:55 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items)
On Thu, 19 Sep 2002, Bruce Momjian wrote:

> Marc G. Fournier wrote:
> > On Thu, 19 Sep 2002, Bruce Momjian wrote:
> >
> > >
> > > It is an open issue.  It has to be resolved. When it is, I will remove
> > > it.  I added a question mark to it but it needs to be tracked.  I keep
> > > having to add and remove it because I have people telling me what to do.
> > >
> > > It was Peter who told me to add it, and you and Thomas to remove it.  It
> > > isn't me adding/removing on my own.
> >
> > Right, so you have two telling you to remove it, one telling  you to add
> > it, and two that are discussion why/if it *should* be added ... Tom feels
> > it should be added, and I'm clarifing the why of it ... don't re-add it
> > until we've determined *if* it is actually an open issue or not ... stop
> > jumping the gun ...
>
> I will make the decision.  If you want to maintain your own open items
> list, go ahead.

Ah, okay, so your list doesn't necessarily follow reality, its more for
your own use ... k, as long as we have that clarified, we're fine ...



Thu, 19 Sep 2002 09:27:47 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org>
Re: The TODO List (Was: Re: Open 7.3 items)
"Marc G. Fournier" <scrappy@hub.org> writes:
> Who implemented SIMILAR TO in the first place? 

Thomas.  He put in the syntax, but as it stands it's simply syntactic
sugar for ~ --- that is, our Posix-compatible regex match operator.
Since the spec demands very non-Posix behavior, this is wrong.

AFAICS, getting SIMILAR TO to operate per spec would require adding some
sort of translation function that converts the spec-style pattern into
a Posix pattern that our regex match engine would handle.  This would at
least require adding ^ and $ around the pattern, converting the escape
character if any, and translating % and _ into .* and . respectively.
There are probably some differences of detail that we'd need to fix
later, but that would get it to a state where we need not be ashamed
to release it.

We already have a similar mechanism for handling LIKE ... ESCAPE
clauses, so it doesn't seem too difficult to do.  But I haven't got
time for it...

			regards, tom lane

Thu, 19 Sep 2002 09:29:28 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items) 
"Marc G. Fournier" <scrappy@hub.org> writes:
> Right, so you have two telling you to remove it, one telling  you to add
> it, and two that are discussion why/if it *should* be added ... Tom feels
> it should be added, and I'm clarifing the why of it ... don't re-add it
> until we've determined *if* it is actually an open issue or not ... stop
> jumping the gun ...

It *is* an open issue, Marc: Peter and I think so, at least.  You cannot
declare by fiat that it isn't.

			regards, tom lane

Thu, 19 Sep 2002 09:31:14 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items) 
Tom Lane wrote:
> AFAICS, getting SIMILAR TO to operate per spec would require adding some
> sort of translation function that converts the spec-style pattern into
> a Posix pattern that our regex match engine would handle.  This would at
> least require adding ^ and $ around the pattern, converting the escape
> character if any, and translating % and _ into .* and . respectively.
> There are probably some differences of detail that we'd need to fix
> later, but that would get it to a state where we need not be ashamed
> to release it.
> 
> We already have a similar mechanism for handling LIKE ... ESCAPE
> clauses, so it doesn't seem too difficult to do.  But I haven't got
> time for it...

It seems like a merge of regex and LIKE patterns.  ANSI doesn't have
regex so maybe SIMILAR TO is their solution to that.

-- 
  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

Thu, 19 Sep 2002 11:32:50 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: The TODO List (Was: Re: Open 7.3 items)
On Thu, 19 Sep 2002, Tom Lane wrote:

> "Marc G. Fournier" <scrappy@hub.org> writes:
> > Who implemented SIMILAR TO in the first place?
>
> Thomas.  He put in the syntax, but as it stands it's simply syntactic
> sugar for ~ --- that is, our Posix-compatible regex match operator.
> Since the spec demands very non-Posix behavior, this is wrong.
>
> AFAICS, getting SIMILAR TO to operate per spec would require adding some
> sort of translation function that converts the spec-style pattern into
> a Posix pattern that our regex match engine would handle.  This would at
> least require adding ^ and $ around the pattern, converting the escape
> character if any, and translating % and _ into .* and . respectively.
> There are probably some differences of detail that we'd need to fix
> later, but that would get it to a state where we need not be ashamed
> to release it.
>
> We already have a similar mechanism for handling LIKE ... ESCAPE
> clauses, so it doesn't seem too difficult to do.  But I haven't got
> time for it...

'K, just curious here, but ... Thomas, do you agree with Tom's
interpretation of the spec?  If so, would it be possible to get the above
fixed?

Or is there an ambiguity there (not like *that* has never happened before)
that Tom/Peter are being more strict about then the spec requires?




Thu, 19 Sep 2002 13:30:09 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org>
SIMILAR TO syntax (Was: Re: The TODO List (Was: Re: O...)
> On Thu, 19 Sep 2002, Tom Lane wrote:
>> AFAICS, getting SIMILAR TO to operate per spec would require adding some
>> sort of translation function that converts the spec-style pattern into
>> a Posix pattern that our regex match engine would handle.

I did something about this.  The translation function probably needs
work (for one thing, it's not multibyte-aware) but it's a start; and
we shouldn't need any more initdbs to tweak it.

			regards, tom lane

Sun, 22 Sep 2002 16:00:20 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: SIMILAR TO syntax (Was: Re: The TODO List (Was: Re: O...) 