[CDBI] Using scalar functions with AbstractSearch

Dylan Vanderhoof DylanV at semaphore.com
Thu Feb 2 05:29:12 GMT 2006


That's especially bizarre, and I'm fairly certainly it violates the SQL standard.  A scalar function or column function in ticks should always evaluate as a literal, not the function.

You're doing a comparison there though, what happens if you select NOW() and 'NOW()' as a result?

-Dylan

-----Original Message-----
From: Bill Moseley [mailto:moseley at hank.org]
Sent: Wednesday, February 01, 2006 9:23 PM
To: classdbi at svr02.digitalcraftsmen.net
Subject: Re: [CDBI] Using scalar functions with AbstractSearch


On Thu, Feb 02, 2006 at 05:54:24AM +0100, Rhesa Rozendaal wrote:
> I suppose it's my lack of experience with postgresql, but I find it a bit 
> unsettling that placeholder values would be executed instead of used as 
> plain strings. I would not have expected

Does seem odd.


test=> select * from times where time < now();
 id | name  |          time          
----+-------+------------------------
  1 | hello | 2006-02-01 20:10:53-08
(1 row)

test=> select * from times where time < 'now()';
 id | name  |          time          
----+-------+------------------------
  1 | hello | 2006-02-01 20:10:53-08
(1 row)

-- 
Bill Moseley
moseley at hank.org


_______________________________________________
ClassDBI mailing list
ClassDBI at lists.digitalcraftsmen.net
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi




More information about the ClassDBI mailing list