Skip to content

Commit 8daa31a

Browse files
committed
Add QNX fixes from Kardos, Dr. Andreas
1 parent 1bd6f76 commit 8daa31a

File tree

6 files changed

+539
-31
lines changed

6 files changed

+539
-31
lines changed

doc/FAQ_QNX4

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -109,56 +109,45 @@ see backend/Makefile and backend/bootstrap/Makefile.
109109
libpgsql.a currently cannot be generated because of the same problem. But this
110110
doesn't matter since shared libraries are not supported.
111111

112-
Currently yacc fails on interfaces/ecpg/preproc/preproc.y because of
113-
exceeded maximum table size. You can generate the preproc.h and preproc.c
114-
files on another platform and use them. This is only a problem when you use
115-
the current source tree since preproc.h and preporc.c are included in official
112+
Currently yacc fails on backend/parser/gram.y and
113+
interfaces/ecpg/preproc/preproc.y due to exceeded maximum table size. You can
114+
generate the gram.h, parse.h, preproc.h and preproc.c files on another platform
115+
and use them. This is only a problem when you use the current source tree since
116+
parse.h, gram.c, preproc.h and preporc.c are included in official
116117
distributions.
117118

118119
Regression tests:
119120
-----------------
120121

121122
The majority of regression tests succeeded. The following tests failed:
122123

123-
int2, int4:
124-
Error message "Result too large" instead of "Numerical result out of range".
125-
Can be ignored.
126-
127-
int8, float4:
128-
Exponent expression "e+nnn" instead of "e+nn". Can be ignored.
129-
130-
float8:
131-
Exponent expression "e+nnn" instead of "e+nn" and some slight difference
132-
in the last digit.
133-
Can be ignored.
134-
135124
geometry:
136125
Some slight deviation in the last digit and "0" instead of "-0".
137126
Can be ignored.
138127

139-
datetime, abstime, tinterval, horology:
128+
timestamp, tinterval, abstime, horology:
140129
Differences for years outside the normal Unix range, e.g. 1968
141130
instead of 2105
142131
Can be ignored.
143132

144133
create_function_2, triggers, misc, plpgsql:
145134
Error messages due to the lack of shared library support.
146135

147-
rules:
148-
Subject of further investigation.
149-
150-
numeric, numeric_big:
151-
ERROR: Cannot create unique index. Table contains non-unique values
136+
numeric, numeric_big, sanity_check:
137+
"ERROR: Cannot create unique index. Table contains non-unique values"
138+
This error occurs for indices of tables num_exp_add, num_exp_sub,
139+
num_exp_div and num_exp_mul only.
152140
Subject of further investigation. Probably because of the missing indices
153-
these tests take a long time.
141+
these numeric tests take a long time.
142+
The diffence in sanity_check.out is a consequence of this problem only.
154143

155144
The reached state of this port should be sufficient for lot of applications.
156145

157146
Have fun!
158147

159148
Andreas Kardos
160149
kardos@repas-aeg.de
161-
1999-12-16
150+
2000-02-28
162151

163152

164153
---------------------------------------------------------------------------
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
--
2+
-- FLOAT4
3+
--
4+
CREATE TABLE FLOAT4_TBL (f1 float4);
5+
INSERT INTO FLOAT4_TBL(f1) VALUES ('0.0');
6+
INSERT INTO FLOAT4_TBL(f1) VALUES ('1004.30');
7+
INSERT INTO FLOAT4_TBL(f1) VALUES ('-34.84');
8+
INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20');
9+
INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20');
10+
-- test for over and under flow
11+
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e40');
12+
ERROR: Bad float4 input format -- overflow
13+
INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e40');
14+
ERROR: Bad float4 input format -- overflow
15+
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-40');
16+
ERROR: Bad float4 input format -- underflow
17+
INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-40');
18+
ERROR: Bad float4 input format -- underflow
19+
SELECT '' AS five, FLOAT4_TBL.*;
20+
five | f1
21+
------+--------------
22+
| 0
23+
| 1004.3
24+
| -34.84
25+
| 1.23457e+020
26+
| 1.23457e-020
27+
(5 rows)
28+
29+
SELECT '' AS four, f.* FROM FLOAT4_TBL f WHERE f.f1 <> '1004.3';
30+
four | f1
31+
------+--------------
32+
| 0
33+
| -34.84
34+
| 1.23457e+020
35+
| 1.23457e-020
36+
(4 rows)
37+
38+
SELECT '' AS one, f.* FROM FLOAT4_TBL f WHERE f.f1 = '1004.3';
39+
one | f1
40+
-----+--------
41+
| 1004.3
42+
(1 row)
43+
44+
SELECT '' AS three, f.* FROM FLOAT4_TBL f WHERE '1004.3' > f.f1;
45+
three | f1
46+
-------+--------------
47+
| 0
48+
| -34.84
49+
| 1.23457e-020
50+
(3 rows)
51+
52+
SELECT '' AS three, f.* FROM FLOAT4_TBL f WHERE f.f1 < '1004.3';
53+
three | f1
54+
-------+--------------
55+
| 0
56+
| -34.84
57+
| 1.23457e-020
58+
(3 rows)
59+
60+
SELECT '' AS four, f.* FROM FLOAT4_TBL f WHERE '1004.3' >= f.f1;
61+
four | f1
62+
------+--------------
63+
| 0
64+
| 1004.3
65+
| -34.84
66+
| 1.23457e-020
67+
(4 rows)
68+
69+
SELECT '' AS four, f.* FROM FLOAT4_TBL f WHERE f.f1 <= '1004.3';
70+
four | f1
71+
------+--------------
72+
| 0
73+
| 1004.3
74+
| -34.84
75+
| 1.23457e-020
76+
(4 rows)
77+
78+
SELECT '' AS three, f.f1, f.f1 * '-10' AS x FROM FLOAT4_TBL f
79+
WHERE f.f1 > '0.0';
80+
three | f1 | x
81+
-------+--------------+---------------
82+
| 1004.3 | -10043
83+
| 1.23457e+020 | -1.23457e+021
84+
| 1.23457e-020 | -1.23457e-019
85+
(3 rows)
86+
87+
SELECT '' AS three, f.f1, f.f1 + '-10' AS x FROM FLOAT4_TBL f
88+
WHERE f.f1 > '0.0';
89+
three | f1 | x
90+
-------+--------------+--------------
91+
| 1004.3 | 994.3
92+
| 1.23457e+020 | 1.23457e+020
93+
| 1.23457e-020 | -10
94+
(3 rows)
95+
96+
SELECT '' AS three, f.f1, f.f1 / '-10' AS x FROM FLOAT4_TBL f
97+
WHERE f.f1 > '0.0';
98+
three | f1 | x
99+
-------+--------------+---------------
100+
| 1004.3 | -100.43
101+
| 1.23457e+020 | -1.23457e+019
102+
| 1.23457e-020 | -1.23457e-021
103+
(3 rows)
104+
105+
SELECT '' AS three, f.f1, f.f1 - '-10' AS x FROM FLOAT4_TBL f
106+
WHERE f.f1 > '0.0';
107+
three | f1 | x
108+
-------+--------------+--------------
109+
| 1004.3 | 1014.3
110+
| 1.23457e+020 | 1.23457e+020
111+
| 1.23457e-020 | 10
112+
(3 rows)
113+
114+
-- test divide by zero
115+
SELECT '' AS bad, f.f1 / '0.0' from FLOAT4_TBL f;
116+
ERROR: float4div: divide by zero error
117+
SELECT '' AS five, FLOAT4_TBL.*;
118+
five | f1
119+
------+--------------
120+
| 0
121+
| 1004.3
122+
| -34.84
123+
| 1.23457e+020
124+
| 1.23457e-020
125+
(5 rows)
126+
127+
-- test the unary float4abs operator
128+
SELECT '' AS five, f.f1, @f.f1 AS abs_f1 FROM FLOAT4_TBL f;
129+
five | f1 | abs_f1
130+
------+--------------+--------------
131+
| 0 | 0
132+
| 1004.3 | 1004.3
133+
| -34.84 | 34.84
134+
| 1.23457e+020 | 1.23457e+020
135+
| 1.23457e-020 | 1.23457e-020
136+
(5 rows)
137+
138+
UPDATE FLOAT4_TBL
139+
SET f1 = FLOAT4_TBL.f1 * '-1'
140+
WHERE FLOAT4_TBL.f1 > '0.0';
141+
SELECT '' AS five, FLOAT4_TBL.*;
142+
five | f1
143+
------+---------------
144+
| 0
145+
| -34.84
146+
| -1004.3
147+
| -1.23457e+020
148+
| -1.23457e-020
149+
(5 rows)
150+

0 commit comments

Comments
 (0)