John,
wasabi=> select * from atest;
x
-----------------
[0:3]={3,4,5,6}
So in this case you'd like the Perl array to be [ 3, 4, 5, 6 ], correct?
I'd be happy with that.
In fact I wish Pg had a separate LIST type as opposed to ARRAY type,
where indices were irrelevant. In Perl can you set the base index for an
anonymous array? ie. to match the starting index stored in Pg? Or would
you be forced to inflate to a Set::Array type class.
wasabi=> select * from atest where 4 = ANY(x);
wasabi=> select * from atest where 4 = ALL(x);
Gotcha. I'll work on that for the release after next.
You could emulate this in MySQL in by surrounding each element with a
distinct pattern (eg "~~~") for each element in the array, and using
RLIKE to check.
eg. store "{1,2,3}" as "~~~1~~~2~~~3~~~"
then 4=ANY(x) becomes "x RLIKE '~~~4~~~'"
and 4=ALL(x) becomes ???? (i've never had to use ALL anyway...)
--Torsten
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object