pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Bug in JDBC CREATE FUNCTION syntax? 2+ messages / 1 participants [nested] [flat]
* Bug in JDBC CREATE FUNCTION syntax? @ 2003-12-10 08:58 Olivier Hubaut <olivier@scmbb.ulb.ac.be> 0 siblings, 1 reply; 2+ messages in thread From: Olivier Hubaut @ 2003-12-10 08:58 UTC (permalink / raw) To: 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 boolean LANGUAGE SQL AS ' 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_uq UNIQUE (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 boolean LANGUAGE SQL AS ' 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_uq UNIQUE (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;' ; 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 ** ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Bug in JDBC CREATE FUNCTION syntax? @ 2003-12-10 09:17 Olivier Hubaut <olivier@scmbb.ulb.ac.be> parent: Olivier Hubaut <olivier@scmbb.ulb.ac.be> 0 siblings, 0 replies; 2+ messages in thread From: Olivier Hubaut @ 2003-12-10 09:17 UTC (permalink / raw) To: ; +Cc: pgsql-sql Sorry for this misplaced question. Olivier Hubaut wrote: [snip] -- Ci-git une signature avortee. ** RIP ** ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-12-10 09:17 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2003-12-10 08:58 Bug in JDBC CREATE FUNCTION syntax? Olivier Hubaut <olivier@scmbb.ulb.ac.be> 2003-12-10 09:17 ` Olivier Hubaut <olivier@scmbb.ulb.ac.be>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox