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

Stuart Armitage commented on MSQL-36:
-------------------------------------

I'm having a similar issue with an Oracle database.

The Oracle SQL Developer application is capable of creating ddl from an 
existing schema, but this appears to be delimited with '/' and 
DelimeterType.ROW and is surrounded by blank lines.

e.g.:

--
create table TAILING_DELIMITER1 ( PERSON_ID integer);

/

create table TAILING_DELIMITER2 ( PERSON_ID integer);
--

The current behaviour is to send trailing whitespace, which the database barfs 
on.

At the moment, the string passed to execSQL(String sql, PrintStream out) is 
only checked to see if it is empty after trimming. 

I think it should always be trimmed. Please could you review to see if my 
interpretation is correct?

> 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