[HACKERS] Is parsing of integer as ICONST really needed ?
[HACKERS] Is parsing of integer as ICONST really needed ?
От:
kubek <kubek@insa-tlse.fr>
Дата:
Hi, I was ready to send a message about the usefulness of Integer literal parsing on this list, but I ended with a really long text :) So I'm only posting the preamble here. Please, contact me directly if you are interested in this problem, or tell me if this discussion is in the scope of the list, in case I will post the whole thing later :) ------------ Preamble of my initial post ------------ the subject of this message is about the usefulness of integer parsing (as integer constants) in the postgres backend. From my understanding of backend source code, integer expressions are parsed as integers constants (files 'scan.l' and 'gram.y') *then* transformed back in strings in order to be processed by the right reader procedure (for example, the function 'int4in' in the case of four bytes integers). Apart from removing the overhead involved in these transformations, I think dropping the parsing of Integer constants would simplify the declaration of new types and correct a possible bug with parsing of oid litterals. As I'm surely wrong :), the remaining of this message explains how I came to this conclusion and *try to explain* some funny results I got with the regress tests after the modifications. ------------ End of preamble of my initial post ------------ Remaining of the message will be send to people interested in the problem :) Thanks, Jean-Marie ------------------------------