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 1eoBWD-0003Cb-U0 for pgsql-general@arkaria.postgresql.org; Tue, 20 Feb 2018 17:15:54 +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 1eoBWB-00017G-CL for pgsql-general@arkaria.postgresql.org; Tue, 20 Feb 2018 17:15:51 +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 1eoBWA-000176-VF for pgsql-general@lists.postgresql.org; Tue, 20 Feb 2018 17:15:51 +0000 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eoBW3-0001I6-V0 for pgsql-general@postgresql.org; Tue, 20 Feb 2018 17:15:49 +0000 Received: by mail-wr0-x231.google.com with SMTP id f14so12088232wre.8 for ; Tue, 20 Feb 2018 09:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zdaqPmVSDvAwq2lCjJiFuVhSFgF3dfwbBjXvS2kFo5s=; b=fc+8/wzrNAhrYfl6sgpckO2fj2YZ6a24XvJRsWNRdQ/U38+PpiDvbPcgVCN05nhY9l er8Xg/rRfoV1FnKbfFWIxRHzylesN2r0gFV2hSZAkyxZHMRFA36il0ol+LSCWoYkJ5bM P+3yN+HR04QoG16FoloSu7CoyZ7A1wLnOQ1kzPZ94ZxJltFHMLhPjXhy/RZPry8h2rZF JvKzQgahnqj/cvwQ/NCgG2nFpP406uAV2BxIMcAQVJmI8jjvPsG1Wh8+pf3SDLoHeu/j Spt2BtHueic/WvFIG3f/DHfHv2E4dPdTAeVdunqAXztRl/fQ0Tce29A4Ibz0REwoALNB T+ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zdaqPmVSDvAwq2lCjJiFuVhSFgF3dfwbBjXvS2kFo5s=; b=tOhIDzUrcn09dVXHXscH4a+OM/B27cn3hM511hJQG/Qd12MMaqV0FG3R83UGsmwERe 6tV+EiIZ0z47miy0V+ghny/9zOfJR9kgx7j2AnF5rHznCiUqyHPnIRz72KFaol6TlQ3K jx/Y7ZcL456G/ZsaSSbwmFvIVs8TjHHF6a8FPS7G0286fxeD+q3fhkfee5p5CKbVoa1v ywY2rGm1imEEkRg9w4Y7Sd2aK/br5CXiVPM9CCv3//mguLyG3etcBsKVehcsF5a1OQCh YOstjlvhv+ojBhLpkN+9Lk+V2LLYtDliqKGhRy/Q3y/YMVPY8cIKByoopj8mpjSmpRC2 OFOQ== X-Gm-Message-State: APf1xPChZeMTtJ1USr8d3dxfswS8BF26sbNiHB73+ROTbEoCkUKyTVAG HjReY/IfRRIJZJVlLLDDGBw= X-Google-Smtp-Source: AH8x227cYMgaB6F3SgGfNfDiRfrmtFu2MgIDR5hIsaYQ3vd3wLKVmglmzkhaMOE3OMaoR7pHFb99ug== X-Received: by 10.80.183.214 with SMTP id i22mr1186564ede.15.1519146941971; Tue, 20 Feb 2018 09:15:41 -0800 (PST) Received: from hollewijn.internal (84-245-13-9.dsl.cambrium.nl. [84.245.13.9]) by smtp.gmail.com with ESMTPSA id q19sm8064128edd.86.2018.02.20.09.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 09:15:40 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: stored procedure call is not working with "select procedure()" option From: Alban Hertroys In-Reply-To: Date: Tue, 20 Feb 2018 18:15:37 +0100 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <80339D2F-3A01-4BA8-B3DF-268CE7D35BB1@gmail.com> References: To: Abhra Kar X-Mailer: Apple Mail (2.3445.5.20) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On 20 Feb 2018, at 8:13, Abhra Kar wrote: >=20 > Hi ,=20 > I have a stored procedure name "procedure()". Which I am = calling by --=20 >=20 > Session sess =3D (Session)entityManager.getDelegate(); //entityManager = is javax.persistent.EntityManager[ Properly Initialise] > sess.createSQLQuery("select procedure()"); =E2=80=A6 > It's not throwing any exception but not executing the procedure.Using = oracle query -- sess.createSQLQuery("{ call procedure() = }").executeUpdate(); procedure execution is working fine. Seems to me you are forgetting to execute the query, like in your Oracle = example. IIRC, calling execute() is how to execute a statement that = returns a ResultSet in Java. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.