summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/oid.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2005-02-11 04:09:05 +0000
committerNeil Conway <neilc@samurai.com>2005-02-11 04:09:05 +0000
commit975e27377aadcabab6504155c091d27ea2fa4c53 (patch)
treecbf5435f931969d09543401af0c1d8bb5dcb3d56 /src/backend/utils/adt/oid.c
parent4db84f0880716ece570db2debf99b773bfb82dd3 (diff)
downloadpostgresql-975e27377aadcabab6504155c091d27ea2fa4c53.tar.gz
Adjust input routines for float4, float8 and oid to reject the empty string
as valid input (it was previously treated as 0). This input was deprecated in 8.0 (and a warning was emitted). Regression tests updated.
Diffstat (limited to 'src/backend/utils/adt/oid.c')
-rw-r--r--src/backend/utils/adt/oid.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c
index f499ae71b0..ababe641b2 100644
--- a/src/backend/utils/adt/oid.c
+++ b/src/backend/utils/adt/oid.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/oid.c,v 1.60 2004/12/31 22:01:22 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/oid.c,v 1.61 2005/02/11 04:08:58 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,18 +33,11 @@ oidin_subr(const char *funcname, const char *s, char **endloc)
char *endptr;
Oid result;
- /*
- * In releases prior to 8.0, we accepted an empty string as valid
- * input (yielding an OID of 0). In 8.0, we accept empty strings, but
- * emit a warning noting that the feature is deprecated. In 8.1+, the
- * warning should be replaced by an error.
- */
if (*s == '\0')
- ereport(WARNING,
- (errcode(ERRCODE_WARNING_DEPRECATED_FEATURE),
- errmsg("deprecated input syntax for type oid: \"\""),
- errdetail("This input will be rejected in "
- "a future release of PostgreSQL.")));
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
+ errmsg("invalid input syntax for type oid: \"%s\"",
+ s)));
errno = 0;
cvt = strtoul(s, &endptr, 10);