Search found 4 matches

by ezemasa
18.01.2010, 20:24
Forum: User Contributions
Topic: PostgreSQL cast using ::
Replies: 6
Views: 2391

Ok, now I undersand, I didn't know about the PostgreSQL arrays. I fixed it so it works, but the legacy is a big issue (that's why I made this change in the firt place, to deal with my own legacy queries).

I don't think this should be included if breaks any backwards compatibility.
by ezemasa
15.01.2010, 19:00
Forum: User Contributions
Topic: PostgreSQL cast using ::
Replies: 6
Views: 2391

I don't understand your question but maybe this example will help: select 'HELLO:WORLD'::varchar, * from TEST_TABLE where ID = :ID and NAME <> 'SOME:THING' This query works fine, the tokenizer doesn't get confused between ':' and '::', so you write de query the same just like you do in pg_admin. Or ...
by ezemasa
15.01.2010, 15:13
Forum: User Contributions
Topic: PostgreSQL cast using ::
Replies: 6
Views: 2391

Adding that line does not avoid the use of single ':', I tested queries with params and they work fine. The same way the previous line ( Add('>>') ) doesn't avoid the use of a single '>'. On the other hand, the current solution requires to escape characters when writing queries. Not a big problem on...
by ezemasa
14.01.2010, 18:22
Forum: User Contributions
Topic: PostgreSQL cast using ::
Replies: 6
Views: 2391

PostgreSQL cast using ::

Just add the marked line, otherwise it'll be treated as a parameter and throws syntax error constructor TZPostgreSQLSymbolState.Create; begin inherited Create; Add('<='); Add('>='); Add('<>'); Add('<<'); Add('>>'); + Add('::'); end; sample query: SELECT ID, 'HELLO'::varchar FROM TABLE thaks a lot ex...