On 26-Sep-09, at 2:23 AM, Alexey Pechnikov wrote:
On Friday 25 September 2009 22:29:55 Tom Jackson wrote:
Personally I would use [string is double -strict] and quote anything
Tcl and PostgreSQL types are not equal.
tclsh8.5 [/tmp]string is double -strict 9999999999
1
template1=# create temp table test(value integer);
CREATE TABLE
template1=# insert into test (999999999999999999999);
template1=# insert into test values (9999999999);
ERROR: integer overflow
The rest of your message is spot on and I don't want to dispute it,
but I wanted to point out that while type similarity is misleading,
you should have used integer types in Tcl as well:
vm-hs [~] 25 % tclsh8.5
% string is integer -strict 9999999999
0
% string is wideint -strict 9999999999
1
% string is double -strict 9999999999
1
The 'integer' check above is a native int type check, whereas wideint
is the native "wide" integer (int64_t) and double is double.
Jeff
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.