Re: help with bison - Mailing list pgsql-hackers

From Joe Conway
Subject Re: help with bison
Date
Msg-id 3CB5B92B.7090205@joeconway.com
Whole thread Raw
In response to help with bison  (Neil Conway <nconway@klamath.dyndns.org>)
Responses Re: help with bison
List pgsql-hackers
Neil Conway wrote:> On Wed, 10 Apr 2002 22:36:49 -0700 "Barry Lind" <barry@xythos.com>> wrote:>>> Neil,>>>> Will this
allowyou to pass bytea data as binary data in the>> parameters section (ability to bind values to parameters) or will>>
thisstill require that the data be passed as a text string that>> the parser needs to parse.>>> The patch I'm working
onwould require that the parameters are still> parsed, so it would likely suffer from the same performance> problems.>>
I'munsure how to fix this without a change to the FE/BE protocol> (and even then, it wouldn't be trivial).
Suggestions?>


The other day there was a discussion around the fact that X'ffff' will
get converted into an integer constant, e.g.

test=# select X'ffff'; ?column?
----------    65535
(1 row)

, while SQL99 says that this syntax *should* be used to specify a 
"binary string". It looks like the hex-to-integer magic actually occurs 
in the lexer, and then the integer value of 65535 is passed to the 
parser as an ICONST. I'm wondering if changing the lexer to make this a 
conversion to a properly escaped bytea input string, and passing it to 
the parser as a string constant would speed things up?

Joe






pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: help with bison
Next
From: Bruce Momjian
Date:
Subject: Re: RFC: Restructuring pg_aggregate