Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eo27P-0004J6-R4 for pgsql-general@arkaria.postgresql.org; Tue, 20 Feb 2018 07:13:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo27O-0002Vv-Pd for pgsql-general@arkaria.postgresql.org; Tue, 20 Feb 2018 07:13:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eo27O-0002Vl-Cp for pgsql-general@lists.postgresql.org; Tue, 20 Feb 2018 07:13:38 +0000 Received: from mail-ot0-x231.google.com ([2607:f8b0:4003:c0f::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eo27L-0005M4-KT for pgsql-general@postgresql.org; Tue, 20 Feb 2018 07:13:36 +0000 Received: by mail-ot0-x231.google.com with SMTP id f11so5064402otj.12 for ; Mon, 19 Feb 2018 23:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=4TOeKo3U5yefLzCnsxiUQ1TKmvnFIGSvtzwexxg7qBw=; b=Lu0F85UoTFTWaiUDeNh8PY2Q8CmflBVAYNf7LXmk1R05Qpa7sDcqldN5d/JzRTihcW avZiRrY7pL+722FcL2lXAISdPvd4LmW65lpYE2swHI4F66ToBq7h9x/q1uO4j82APC5/ ZgrZDF/+TCkqPohvWdnUKXHE5YBZzsbYzzsmWcOTYPqHn7xu8n+BH2XsmBjSelXSQVYT 3jJvIXst9cyfKK4g4wAMYmIVwzsEC4a+DuvZGJdTD92aNmXj1oymwtejJC8QKTeDjRkm MztsgC3XSgvn2KBWnQC19KZLFxF7R1t2/2PSffvUVO1UUxoOpxRvJHq+96S0J5kzYEGk rpfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4TOeKo3U5yefLzCnsxiUQ1TKmvnFIGSvtzwexxg7qBw=; b=FTd8mxcuFx7bDP6c58XCBLmkcwGIBXUBnL82SKAFayDYVv99UBX4JMnA5etMowyHwE 74QC2nSplYFF+REUlBL5BdPNxgkvXMtDwpGlPYBF4cl+jkpESSolSOfYLmKC1bqG1bmf VCglhsdqEBfbg7q1ytyVaLTl2ROtlpVphPzzCJB5w0cIavfp9q7TZxo5XujxzZIZ5m9z sNNBGz+joaEUjCyJjpL/WcM+Z4xY3jqzTGVrMK0Yspk3xeC1wKqdbZTp9D3u2Hy8hGW/ YI5/zwACrHx4gpN8iEOOgG+QZDRfyWWbuarrXzkdK2PoM/V9iEC/6Oogte9MwH1liela xZtA== X-Gm-Message-State: APf1xPDmz/c0fBdE9Yap/hLru5YnSw7ZIgOc2a72VMKUsVwHC1p8wRPj yKVSL/gwTWo5RCimt+sET6tKkuO6r1mmjYfeOfNoBg== X-Google-Smtp-Source: AH8x226f6JDBMZXKINdm7G/eOLBtw5wf1MrBmM4Nn6n6g4UcU6VrA2ijkMRpD3fB7beSzzc/HtxZxHoAUZcZyG/O9kk= X-Received: by 10.157.89.11 with SMTP id t11mr13448031oth.386.1519110814442; Mon, 19 Feb 2018 23:13:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.74.14 with HTTP; Mon, 19 Feb 2018 23:13:34 -0800 (PST) From: Abhra Kar Date: Tue, 20 Feb 2018 12:43:34 +0530 Message-ID: Subject: stored procedure call is not working with "select procedure()" option To: pgsql-general Content-Type: multipart/alternative; boundary="089e082c48b0782fac05659f8cf0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --089e082c48b0782fac05659f8cf0 Content-Type: text/plain; charset="UTF-8" Hi , I have a stored procedure name "procedure()". Which I am calling by -- Session sess = (Session)entityManager.getDelegate(); //entityManager is javax.persistent.EntityManager[ Properly Initialise] sess.createSQLQuery("select procedure()"); procedure is containing some truncate queries like -- EXECUTE('truncate table abc'); It's not throwing any exception but not executing the procedure.Using oracle query -- sess.createSQLQuery("{ call procedure() }").executeUpdate(); procedure execution is working fine. What's need to be change here. Thanks and Regards, Abhra --089e082c48b0782fac05659f8cf0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi ,=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I have a = stored procedure name "procedure()". Which I am calling by --=C2= =A0

Session sess =3D (Session)entityManager.getDel= egate(); //entityManager is javax.persistent.EntityManager[ Properly Initia= lise]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sess.creat= eSQLQuery("select procedure()");

procedu= re is containing some truncate queries like --=C2=A0=C2=A0EX= ECUTE('truncate table abc');

It's not throwing any exception but not executing t= he procedure.Using oracle query --=C2=A0sess.crea= teSQLQuery("{ call procedure() }").executeUpdate();=C2=A0 =C2=A0p= rocedure execution is working fine.

What's need to be change here.

Thanks and Regards,
Abhra
--089e082c48b0782fac05659f8cf0--