CREATE OR REPLACE FUNCTION with ZSQLProcessor

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
francis.rangel
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 25.08.2010, 19:12

CREATE OR REPLACE FUNCTION with ZSQLProcessor

Post by francis.rangel »

Hi everbody!

I've been having problems to create a database with a Delphi application.

In this application I create the database and all of its objects based on a metadata backup file.

The creation of the database, tables, keys, indexes and almost everthing is fine. But when I try to create a function using the ZSQLProcessor I got the error: "unterminated dollar-quoted string at or near "$$ DECLARE (...)"

I've googled about the problem and got just one clue: I'm using a old psql to execute the create function command. But I don't know how to use a newer version of psql with the zeoslib components.

So, is there a way to execute a create function using zeoslib? I've already tried to upgrade my zeoslib to the 6.6 stable version and it haven't worked.

Thanks for your time.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

I'm afraid somebody will have to debug the ZSQLProcessor parser code with this case. Can you please give it a try? Essentially the problem seems to be that the parser splits the procedure somewhere in the middle of the function.

Mark
Image
josimarz
Junior Boarder
Junior Boarder
Posts: 41
Joined: 14.09.2009, 17:29
Location: Brazil

Post by josimarz »

Hello francis.rangel!

In the TZSQLProcessor component change Delimiter property to $$ and change the DelimiterType property to dtSetTerm.

Try!

Josimar
Post Reply