File tree 3 files changed +9
-7
lines changed
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.130 2000/10/31 10:22:10 petere Exp $
9
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.131 2000/10/31 13:59:52 petere Exp $
10
10
*
11
11
* NOTES
12
12
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -1353,7 +1353,8 @@ _outValue(StringInfo str, Value *value)
1353
1353
appendStringInfo (str , "\" " );
1354
1354
break ;
1355
1355
case T_BitString :
1356
- appendStringInfo (str , " B%s " , value -> val .str );
1356
+ /* internal representation already has leading 'b' */
1357
+ appendStringInfo (str , " %s " , value -> val .str );
1357
1358
break ;
1358
1359
default :
1359
1360
elog (NOTICE , "_outValue: don't know how to print type %d " ,
Original file line number Diff line number Diff line change 9
9
*
10
10
*
11
11
* IDENTIFICATION
12
- * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.24 2000/10/31 10:22:10 petere Exp $
12
+ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.25 2000/10/31 13:59:52 petere Exp $
13
13
*
14
14
* HISTORY
15
15
* AUTHOR DATE MAJOR EVENT
@@ -236,7 +236,7 @@ nodeTokenType(char *token, int length)
236
236
retval = AT_SYMBOL ;
237
237
else if (* token == '\"' && length > 1 && token [length - 1 ] == '\"' )
238
238
retval = T_String ;
239
- else if (* token == 'B ' )
239
+ else if (* token == 'b ' )
240
240
retval = T_BitString ;
241
241
else
242
242
retval = ATOM_TOKEN ;
@@ -351,7 +351,7 @@ nodeRead(bool read_car_only)
351
351
case T_BitString :
352
352
{
353
353
char * val = palloc (tok_len );
354
- /* skip leading 'B '*/
354
+ /* skip leading 'b '*/
355
355
strncpy (val , token + 1 , tok_len - 1 );
356
356
val [tok_len - 1 ] = '\0' ;
357
357
this_value = (Node * ) makeBitString (val );
Original file line number Diff line number Diff line change 9
9
*
10
10
*
11
11
* IDENTIFICATION
12
- * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.80 2000/10/31 10:22:11 petere Exp $
12
+ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.81 2000/10/31 13:59:53 petere Exp $
13
13
*
14
14
*-------------------------------------------------------------------------
15
15
*/
@@ -282,10 +282,11 @@ other .
282
282
{xbitstart } {
283
283
BEGIN (xbit);
284
284
startlit ();
285
+ addlit (" b" , 1 );
285
286
}
286
287
<xbit >{xbitstop } {
287
288
BEGIN (INITIAL);
288
- if (literalbuf[strspn (literalbuf, " 01" )] != ' \0 ' )
289
+ if (literalbuf[strspn (literalbuf + 1 , " 01" ) + 1 ] != ' \0 ' )
289
290
elog (ERROR, " invalid bit string input: '%s'" ,
290
291
literalbuf);
291
292
yylval.str = literalbuf;
You can’t perform that action at this time.
0 commit comments