int4-i386-freebsd.out
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:6k
- QUERY: CREATE TABLE INT4_TBL(f1 int4);
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('0');
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('123456');
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('-123456');
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('34.5');
- ERROR: pg_atoi: error in "34.5": can't parse ".5"
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('2147483647');
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('-2147483647');
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('1000000000000');
- ERROR: pg_atoi: error reading "1000000000000": Result too large
- QUERY: INSERT INTO INT4_TBL(f1) VALUES ('asdf');
- ERROR: pg_atoi: error in "asdf": can't parse "asdf"
- QUERY: SELECT '' AS five, INT4_TBL.*;
- five| f1
- ----+-----------
- | 0
- | 123456
- | -123456
- | 2147483647
- |-2147483647
- (5 rows)
- QUERY: SELECT '' AS four, i.* FROM INT4_TBL i WHERE i.f1 <> '0'::int2;
- four| f1
- ----+-----------
- | 123456
- | -123456
- | 2147483647
- |-2147483647
- (4 rows)
- QUERY: SELECT '' AS four, i.* FROM INT4_TBL i WHERE i.f1 <> '0'::int4;
- four| f1
- ----+-----------
- | 123456
- | -123456
- | 2147483647
- |-2147483647
- (4 rows)
- QUERY: SELECT '' AS one, i.* FROM INT4_TBL i WHERE i.f1 = '0'::int2;
- one|f1
- ---+--
- | 0
- (1 row)
- QUERY: SELECT '' AS one, i.* FROM INT4_TBL i WHERE i.f1 = '0'::int4;
- one|f1
- ---+--
- | 0
- (1 row)
- QUERY: SELECT '' AS two, i.* FROM INT4_TBL i WHERE i.f1 < '0'::int2;
- two| f1
- ---+-----------
- | -123456
- |-2147483647
- (2 rows)
- QUERY: SELECT '' AS two, i.* FROM INT4_TBL i WHERE i.f1 < '0'::int4;
- two| f1
- ---+-----------
- | -123456
- |-2147483647
- (2 rows)
- QUERY: SELECT '' AS three, i.* FROM INT4_TBL i WHERE i.f1 <= '0'::int2;
- three| f1
- -----+-----------
- | 0
- | -123456
- |-2147483647
- (3 rows)
- QUERY: SELECT '' AS three, i.* FROM INT4_TBL i WHERE i.f1 <= '0'::int4;
- three| f1
- -----+-----------
- | 0
- | -123456
- |-2147483647
- (3 rows)
- QUERY: SELECT '' AS two, i.* FROM INT4_TBL i WHERE i.f1 > '0'::int2;
- two| f1
- ---+----------
- | 123456
- |2147483647
- (2 rows)
- QUERY: SELECT '' AS two, i.* FROM INT4_TBL i WHERE i.f1 > '0'::int4;
- two| f1
- ---+----------
- | 123456
- |2147483647
- (2 rows)
- QUERY: SELECT '' AS three, i.* FROM INT4_TBL i WHERE i.f1 >= '0'::int2;
- three| f1
- -----+----------
- | 0
- | 123456
- |2147483647
- (3 rows)
- QUERY: SELECT '' AS three, i.* FROM INT4_TBL i WHERE i.f1 >= '0'::int4;
- three| f1
- -----+----------
- | 0
- | 123456
- |2147483647
- (3 rows)
- QUERY: SELECT '' AS one, i.* FROM INT4_TBL i WHERE (i.f1 % '2'::int2) = '1'::int2;
- one| f1
- ---+----------
- |2147483647
- (1 row)
- QUERY: SELECT '' AS three, i.* FROM INT4_TBL i WHERE (i.f1 % '2'::int4) = '0'::int2;
- three| f1
- -----+-------
- | 0
- | 123456
- |-123456
- (3 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 * '2'::int2 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+-------
- | 0| 0
- | 123456| 246912
- | -123456|-246912
- | 2147483647| -2
- |-2147483647| 2
- (5 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 * '2'::int4 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+-------
- | 0| 0
- | 123456| 246912
- | -123456|-246912
- | 2147483647| -2
- |-2147483647| 2
- (5 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 + '2'::int2 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+-----------
- | 0| 2
- | 123456| 123458
- | -123456| -123454
- | 2147483647|-2147483647
- |-2147483647|-2147483645
- (5 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 + '2'::int4 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+-----------
- | 0| 2
- | 123456| 123458
- | -123456| -123454
- | 2147483647|-2147483647
- |-2147483647|-2147483645
- (5 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 - '2'::int2 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+----------
- | 0| -2
- | 123456| 123454
- | -123456| -123458
- | 2147483647|2147483645
- |-2147483647|2147483647
- (5 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 - '2'::int4 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+----------
- | 0| -2
- | 123456| 123454
- | -123456| -123458
- | 2147483647|2147483645
- |-2147483647|2147483647
- (5 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 / '2'::int2 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+-----------
- | 0| 0
- | 123456| 61728
- | -123456| -61728
- | 2147483647| 1073741823
- |-2147483647|-1073741823
- (5 rows)
- QUERY: SELECT '' AS five, i.f1, i.f1 / '2'::int4 AS x FROM INT4_TBL i;
- five| f1| x
- ----+-----------+-----------
- | 0| 0
- | 123456| 61728
- | -123456| -61728
- | 2147483647| 1073741823
- |-2147483647|-1073741823
- (5 rows)
- QUERY: SELECT -2+3 AS one;
- one
- ---
- 1
- (1 row)
- QUERY: SELECT 4-2 AS two;
- two
- ---
- 2
- (1 row)
- QUERY: SELECT 2- -1 AS three;
- three
- -----
- 3
- (1 row)
- QUERY: SELECT 2 - -2 AS four;
- four
- ----
- 4
- (1 row)
- QUERY: SELECT '2'::int2 * '2'::int2 = '16'::int2 / '4'::int2 AS true;
- true
- ----
- t
- (1 row)
- QUERY: SELECT '2'::int4 * '2'::int2 = '16'::int2 / '4'::int4 AS true;
- true
- ----
- t
- (1 row)
- QUERY: SELECT '2'::int2 * '2'::int4 = '16'::int4 / '4'::int2 AS true;
- true
- ----
- t
- (1 row)
- QUERY: SELECT '1000'::int4 < '999'::int4 AS false;
- false
- -----
- f
- (1 row)
- QUERY: SELECT 4! AS twenty_four;
- twenty_four
- -----------
- 24
- (1 row)
- QUERY: SELECT !!3 AS six;
- six
- ---
- 6
- (1 row)
- QUERY: SELECT 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 AS ten;
- ten
- ---
- 10
- (1 row)
- QUERY: SELECT 2 + 2 / 2 AS three;
- three
- -----
- 3
- (1 row)
- QUERY: SELECT (2 + 2) / 2 AS two;
- two
- ---
- 2
- (1 row)
- QUERY: SELECT dsqrt('64'::float8) AS eight;
- eight
- -----
- 8
- (1 row)
- QUERY: SELECT |/'64'::float8 AS eight;
- eight
- -----
- 8
- (1 row)
- QUERY: SELECT ||/'27'::float8 AS three;
- three
- -----
- 3
- (1 row)