> > I am not absolutly happy with this because it looks like the 
> > statement is not working correctly for 100%. It comes back with an 
> > strange error message if the '%' sign is at the end of '40'!!..
> >
> > select * from my_table where cast(my_int as text) like '40%';
> > ERROR:  transformExpr: does not know how to transform node 103
> >
> > Any ideas!..
> Thomas, I believe this is the problem with my processing a node twice.
> Do you have a fix for that, or should I make one?

tgl=> select * from t where cast(i as text) like '40%';
   i
----
4030
(1 row)

So, the patch for "function() BETWEEN" helps, but I'm still not sure it
is safe, since I don't know how these nodes might be handled deeper in
the backend.

Also, one of my recent testing patches slightly breaks the type
conversion stuff so the numerology regression test fails on one of the
inserts and I haven't figured out which piece caused that. Nothing
should be affected in the CVS tree though.

                       - Tom

Tue, 17 Mar 1998 02:52:04 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [QUESTIONS] UPDATE statement ORACLE 6 compatible
> 
> tgl=> select * from t where cast(i as text) like '40%';
>    i
> ----
> 4030
> (1 row)
> 
> So, the patch for "function() BETWEEN" helps, but I'm still not sure it
> is safe, since I don't know how these nodes might be handled deeper in
> the backend.
> 
> Also, one of my recent testing patches slightly breaks the type
> conversion stuff so the numerology regression test fails on one of the
> inserts and I haven't figured out which piece caused that. Nothing
> should be affected in the CVS tree though.

Ship the patch over here and I will have a look at it.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Mon, 16 Mar 1998 22:21:53 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Re: [QUESTIONS] UPDATE statement ORACLE 6 compatible
> > So, the patch for "function() BETWEEN" helps, but I'm still not sure 
> > it is safe, since I don't know how these nodes might be handled 
> > deeper in the backend.
> 
> Ship the patch over here and I will have a look at it.

OK, here it is...

                        - Tom
Tue, 17 Mar 1998 04:08:21 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Re: [QUESTIONS] UPDATE statement ORACLE 6 compatible
> > Thomas, I believe this is the problem with my processing a node 
> > twice. Do you have a fix for that, or should I make one?
> So, the patch for "function() BETWEEN" helps, but I'm still not sure
> it is safe, since I don't know how these nodes might be handled deeper 
> in the backend.

Bruce, did I remember to actually enclose the patch for you? Looks to me
like I didn't, so here it is again...

                  - Tom
Fri, 20 Mar 1998 03:27:47 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Re: [QUESTIONS] UPDATE statement ORACLE 6 compatible
> 
> This is a multi-part message in MIME format.
> --------------5B2D8E5180AAC1149F41A1FA
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> > > So, the patch for "function() BETWEEN" helps, but I'm still not sure 
> > > it is safe, since I don't know how these nodes might be handled 
> > > deeper in the backend.
> > 
> > Ship the patch over here and I will have a look at it.
> 
> OK, here it is...

Applied.  There is a nice comment, and it just prevents an elog().  I
think your logic is correct.  There are several cases, I think, where
strings are used multiple places.  Also, you are just preventing
reprocessing of the args.  We can perhaps improve this later if a
problem comes up.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Thu, 19 Mar 1998 22:59:46 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Re: [QUESTIONS] UPDATE statement ORACLE 6 compatible