aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/nodes/read.c')
-rw-r--r--src/backend/nodes/read.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/nodes/read.c b/src/backend/nodes/read.c
index ef12ecf7347..a3b314386ba 100644
--- a/src/backend/nodes/read.c
+++ b/src/backend/nodes/read.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.7 1998/01/06 18:52:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.8 1998/01/07 08:07:58 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -94,7 +94,9 @@ nodeTokenType(char *token, int length)
retval = (*token != '.') ? T_Integer : T_Float;
}
- else if (isalpha(*token) || *token == '_')
+ /* make "" == NULL, not T_String. Is this a problem? 1998/1/7 bjm */
+ else if (isalpha(*token) || *token == '_' ||
+ (token[0] == '\"' && token[1] == '\"'))
retval = ATOM_TOKEN;
else if (*token == '(')
retval = LEFT_PAREN;
@@ -147,8 +149,8 @@ lsptok(char *string, int *length)
{
for (local_str++; *local_str != '\"'; (*length)++, local_str++)
;
- if (*length == 2)
- *length -= 2; /* if "", return zero length */
+ if (*length == 1)
+ *length = 0; /* if "", return zero length */
else
(*length)++;
local_str++;