Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 92985 invoked from network); 8 Feb 2007 18:01:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2007 18:01:37 -0000 Received: (qmail 52247 invoked by uid 500); 8 Feb 2007 18:01:43 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 52215 invoked by uid 500); 8 Feb 2007 18:01:43 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 52206 invoked by uid 99); 8 Feb 2007 18:01:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2007 10:01:43 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of bryan@maine.rr.com designates 24.24.2.56 as permitted sender) Received: from [24.24.2.56] (HELO ms-smtp-02.nyroc.rr.com) (24.24.2.56) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2007 10:01:33 -0800 Received: from rrcs-24-97-162-130.nys.biz.rr.com (rrcs-24-97-162-130.nys.biz.rr.com [24.97.162.130]) by ms-smtp-02.nyroc.rr.com (8.13.6/8.13.6) with SMTP id l18I1Ahh005874 for ; Thu, 8 Feb 2007 13:01:11 -0500 (EST) Received: from no.name.available by rrcs-24-97-162-130.nys.biz.rr.com via smtpd (for smtp-server.nyroc.rr.com [24.92.226.49]) with SMTP; Thu, 8 Feb 2007 13:01:10 -0500 Message-ID: <45CB6564.7050105@maine.rr.com> Date: Thu, 08 Feb 2007 13:01:08 -0500 From: Bryan Lewis User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: user@cayenne.apache.org Subject: Re: can't find procedure without a parameter on Postgres References: <45C867F9.5050608@maine.rr.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Checked: Checked by ClamAV on apache.org Thanks! Andrus Adamchik wrote: > Bryan, > > this is a bug, I can confirm that: > > https://issues.apache.org/cayenne/browse/CAY-750 > > I fixed it on trunk (Cayenne 3.0). Will apply it to 2.0 and 1.2 > branches shortly. > > Andrus > > > On Feb 6, 2007, at 1:35 PM, Bryan Lewis wrote: > >> I had this code working on an Oracle8 database: >> >> ProcedureQuery procQuery = new >> ProcedureQuery("proc_eu_update_begin"); >> dc.performQuery(procQuery); >> >> The procedure is only a few sql statements to create a temporary table >> and takes no parameters. When I ported to Postgres 8.2, Cayenne says it >> can't find the procedure. The log shows: >> >> {call proc_eu_update_begin} >> org.postgresql.util.PSQLException: ERROR: relation >> "proc_eu_update_begin" does not exist >> >> I could execute the procedure manually with "select >> proc_eu_update_begin()". Note that the empty parentheses were required. >> >> I had other working procedures so I suspected it was the absence of >> parameters causing the problem. Adding a dummy parameter made things >> work: >> >> {call proc_eu_update_begin(?)} [bind: 'xx'] >> >> So I have a work-around, but... maybe Cayenne could generate a call that >> Postgres would handle better, something like the empty parentheses in >> the manual command. >> >> >> P.S. The definition of the procedure (now a function in Postgres) looks >> like: >> >> CREATE OR REPLACE function proc_eu_update_begin() >> RETURNS void AS ... >> >> >