[ 
http://jira.codehaus.org/browse/MSQL-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=170193#action_170193
 ] 

Igor Artamonov commented on MSQL-36:
------------------------------------

Thanks, it working with delimeterType=row

But i want to draw attention that it works only at this example. When you have 
just semicolon on empty line (and it still valid code for this quotation) it 
fails execution although proposed workaround and developer need to fix his sql 
code. And also, maybe it's good idea to add comment about this workaround for 
postgres users into the plugin documentation?

> Invalid delimeter when using postgres quotes
> --------------------------------------------
>
>                 Key: MSQL-36
>                 URL: http://jira.codehaus.org/browse/MSQL-36
>             Project: Maven 2.x SQL Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2, 1.3, 1.4
>         Environment: postgresql (any version)
> sql-maven-plugin 1.2, 1.3
>            Reporter: Igor Artamonov
>
> When executing postgres-specific sql like this:
> {quote}
> CREATE OR REPLACE FUNCTION my_trig()
>   RETURNS "trigger" AS
> $BODY$
> declare 
>   t text; 
> begin
>   -- any plpgsql code here, where each line ends with semicolon
>   return NEW; 
> end$BODY$
>   LANGUAGE 'plpgsql' VOLATILE;
> {quote}
> it will cause an error:
> bq. ERROR: unterminated dollar-quoted string at or near "$BODY$declare t text
> It's because of SqlExecMojo.java which splits sql by ';', but all code 
> between the $QUOTE$ and $QUOTE$ need to be parsed as one command at this case.
> As i know postgres jdbc driver already can parse code like this, and maybe 
> you can make an investigation into it

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to