*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.51 2002/07/16 18:34:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.52 2002/08/27 20:29:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
if (s == (char *) NULL)
- elog(ERROR, "pg_atoi: NULL pointer!");
+ elog(ERROR, "pg_atoi: NULL pointer");
else if (*s == 0)
- l = (long) 0;
+ elog(ERROR, "pg_atoi: zero-length string");
else
l = strtol(s, &badp, 10);
-- 'e' is also a large object.
--
INSERT INTO arrtest (a[5], b[2][1][2], c, d, f, g)
- VALUES ('{1,2,3,4,5}', '{{{},{1,2}}}', '{}', '{}', '{}', '{}');
+ VALUES ('{1,2,3,4,5}', '{{{0,0},{1,2}}}', '{}', '{}', '{}', '{}');
UPDATE arrtest SET e[0] = '1.1';
UPDATE arrtest SET e[1] = '2.2';
INSERT INTO arrtest (f)
ERROR: Attribute "d" specified more than once
-- missing data: should fail
COPY x from stdin;
-ERROR: copy: line 1, Missing data for column "b"
+ERROR: copy: line 1, pg_atoi: zero-length string
lost synchronization with server, resetting connection
COPY x from stdin;
ERROR: copy: line 1, Missing data for column "e"
--
INSERT INTO arrtest (a[5], b[2][1][2], c, d, f, g)
- VALUES ('{1,2,3,4,5}', '{{{},{1,2}}}', '{}', '{}', '{}', '{}');
+ VALUES ('{1,2,3,4,5}', '{{{0,0},{1,2}}}', '{}', '{}', '{}', '{}');
UPDATE arrtest SET e[0] = '1.1';