Am 18.07.2012 18:51, schrieb Mark Morgan Lloyd:
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.



Just an idea:

some days ago i had a problem with a parameter sitting at the end of a line, followed directly by CRLF ( -> component StrHolder , Delphi 5 Windows)

Solution was to put a space after the parameter:
 ":parameter SPACE(!!) CRLF".

 A problem with word boundries ?!

That simple space fixed it!

Second try:
change you SQL to a oneliner.
Query.SQL.Text := part1 + part2 + ...

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to