Bug in JDBC CREATE FUNCTION syntax? - Mailing list pgsql-sql

From Olivier Hubaut
Subject Bug in JDBC CREATE FUNCTION syntax?
Date
Msg-id 3FD6E026.6090001@scmbb.ulb.ac.be
Whole thread Raw
Responses Re: Bug in JDBC CREATE FUNCTION syntax?
List pgsql-sql
I'm trying to do a create function using JDBC 3,0 in Eclipse IDE with JFaceDBC plugin.

This function doesn't work:

CREATE FUNCTION @user_schema@.@igloo_login@_log_constraints_set ()RETURNS booleanLANGUAGE SQLAS 'ALTER TABLE
@user_schema@.@igloo_login@_log_transaction   ADD CONSTRAINT @user_schema@_@igloo_login@_log_transaction_pk PRIMARY KEY
(batch);ALTERTABLE @user_schema@.@igloo_login@_log_object    ADD CONSTRAINT
@user_schema@_@igloo_login@_log_object_batch_id_uqUNIQUE (batch, id);ALTER TABLE @user_schema@.@igloo_login@_log_object
  ADD CONSTRAINT @user_schema@_@igloo_login@_log_object_batch_id_class_pk PRIMARY KEY (batch, id, class);SELECT true;'
 
;


But the same, written using a different indetation protocol, works:

CREATE FUNCTION @user_schema@.@igloo_login@_log_constraints_set ()RETURNS booleanLANGUAGE SQLAS 'ALTER TABLE
@user_schema@.@igloo_login@_log_transaction   ADD CONSTRAINT @user_schema@_@igloo_login@_log_transaction_pk PRIMARY KEY
(batch);ALTER TABLE @user_schema@.@igloo_login@_log_object    ADD CONSTRAINT
@user_schema@_@igloo_login@_log_object_batch_id_uqUNIQUE (batch, id);    ALTER TABLE
@user_schema@.@igloo_login@_log_object   ADD CONSTRAINT @user_schema@_@igloo_login@_log_object_batch_id_class_pk
PRIMARYKEY (batch, id, class); SELECT true;'
 
;


It seem's that the problem is about the semi-colon position. The following query MUST be on the same line to make it
works...

Does anyone else notice the same thing?

Thanks,

-- 
Ci-git une signature avortee.
** RIP **


pgsql-sql by date:

Previous
From: "sqllist"
Date:
Subject: Re: How to specify the beginning of the month in Postgres SQL syntax?
Next
From: Olivier Hubaut
Date:
Subject: Re: Bug in JDBC CREATE FUNCTION syntax?