RE: [HACKERS] SQL92

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: PostgreSQL Hackers Mailing List <pgsql-hackers(at)hub(dot)org>
Subject: RE: [HACKERS] SQL92
Date: 1998-09-30 15:30:08
Message-ID: F10BB1FAF801D111829B0060971D839F43D627@cpsmail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Well, In all of the major Databases that I have worked with there is
> > also the "[character_set]" matching operator.
> > Does anybody know if the "[character_set]" stuff is part of the
> > standard?
>
> Hoping against hope, eh? afaik those are all extensions (though SQL3
> has
> some enhanced functionality with the SIMILAR operator). From my copy
> of
> the second draft standard published in 1992:
>
> <like predicate> uses the triadic operator LIKE (or the inverse,
> NOT LIKE), operating on three character strings and returning
> a Boolean. LIKE determines whether or not a character string
> "matches" a given "pattern" (also a character string). The char-
> acters '%' (percent) and '_' (underscore) have special meaning when
> they occur in the pattern. The optional third argument is a charac-
> ter string containing exactly one character, known as the "escape
> character", for use when a percent or underscore is required in the
> pattern without its special meaning.
>
> What version of Postgres are you running? I vaguely recall some
> complaints and fixes in the sort-of-recent past. Don't know if it
> affected simple patterns or only more complicated stuff.
>
> Can you send a simple
>
> SELECT text 'your string here' LIKE 'your pattern here';
>
> which doesn't behave as you would expect? That would make this a bit
> less theoretical...
>
> - Tom
>
Well, this all started with this message:
>
Since I didn't get any feedback from the list about it I decided to jump
into the code myself.
Upon finding the like.c I looked through the code and found that
"[character_set]"'s were ignored and that the problem expressed in the
above message was not evident in the code. (btw this is the CVS version
of 6.4; I cvs update daily.)
So, I asked weather the "[character_set]" stuff was in the standard,
which it is not.
And I asked if I should be looking somewhere else for munging of "%%".
(I'm currently looking at src/backend/utils/adt/like.c)

So, that's where I stand.
-DEJ

Browse pgsql-hackers by date

  From Date Subject
Next Message Jackson, DeJuan 1998-09-30 15:47:00 RE: [HACKERS] SQL92
Previous Message Thomas G. Lockhart 1998-09-30 15:28:50 Re: Antwort: Patches for gram.y and keywords.c