[Lazarus] Possible TQuery or resource reader problem, all (unix) targets

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Wed Jul 18 18:51:22 CEST 2012


Mark Morgan Lloyd wrote:
> I've got a problem that appears to have got into the Lazarus IDE etc. at 
> some point after 36903. It affects all targets I've tested so far, i.e. 
> SPARC/Solaris, SPARC/Linux, PPC/Linux and x86/Linux; I left x86 till 
> last on the basis that it was likely to be limited to a combination that 
> was tested less frequently with the result that I've been delayed by 
> building on slower systems. I'd rather not try testing Windows, and any 
> results might not be valid since I don't have current versions.
> 
> The project includes a form with a number of database components. One of 
> the TQuerys has a significant amount of SQL text ** (PostgreSQL 
> dialect), including a number of references to a single parameter (tz). 
> Looked at on 36903 or earlier, the TQuery has a single parameter 
> (correctly called tz) while on trunk (circa 37961) a spurious parameter 
> called 00'::interval is inserted before tz: I think that this is 
> probably part of the SQL text, mis-parsed. The project compiles, but 
> fails at runtime.
> 
> I'll try to distill this to a minimal project and Mantis it, unless 
> anybody realises they've been working in this area and can contribute a 
> quick fix for testing.
> 
> ** Including a couple of subselects of the form
>   to_char(datetime + coalesce(
>     (SELECT utc_offset FROM pg_timezone_names WHERE name = :tz),
>     '00:00'::interval
>   ), 'YYYY-MM-DD HH24:MI') AS datetime_str,
> 

Mantised as 22463. It's something to do with parsing a non-trivial 
query, so far I'm not able to duplicate it with a one-liner.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list