Re: Speeding up the Postgres lexer - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Speeding up the Postgres lexer
Date
Msg-id 42923E6E.3080906@dunslane.net
Whole thread Raw
In response to Speeding up the Postgres lexer  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Speeding up the Postgres lexer  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers

Tom Lane wrote:

>[snip - flex is slowed down by backtracking  - how to fix ]
>
>What I'm wondering is whether this is really worth doing or not.
>There are currently just two parts of the lexer rules that are affected
>--- the {real} rule illustrated above, and the rules that allow quoted
>strings to be split across lines as the SQL spec requires.  But the
>patches are still pretty ugly, and what's really annoying is that there
>doesn't seem to be any way to get flex to complain if someone later
>makes a change that breaks the no-backup-cases property again.
>
>  
>


I would be more concerned if there were not reasonable alternatives to 
many bulk parsed inserts (COPY, prepared statement).

But I do think it's worth it, even so ... not all client interfaces 
support prepared statements (notoriously PHP, although I understand KL 
has sent patches to fix that) and not all inserts are suitable for COPY.

cheers

andrew


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Speeding up the Postgres lexer
Next
From: "Sander Steffann"
Date:
Subject: Re: inet increment w/ int8