Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UwyuN-0005lk-DT for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Jul 2013 18:14:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UwyuM-0002v2-SE for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Jul 2013 18:14:30 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwxc6-0006gZ-8y for pgsql-bugs@postgresql.org; Wed, 10 Jul 2013 16:51:34 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwxc3-0003TX-M2 for pgsql-bugs@postgresql.org; Wed, 10 Jul 2013 16:51:33 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwxc3-0003pO-A6 for pgsql-bugs@postgresql.org; Wed, 10 Jul 2013 16:51:31 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1Uwxbx-00040J-VQ for pgsql-bugs@postgresql.org; Wed, 10 Jul 2013 16:51:26 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: =?utf-8?q?BUG_=238292=3A_Error_en_Una_Funci=C3=B3n_llamada_desde_N?= =?utf-8?q?etBeans?= To: pgsql-bugs@postgresql.org From: renzo_gch@hotmail.com Message-Id: Date: Wed, 10 Jul 2013 16:51:25 +0000 X-Pg-Spam-Score: 1.4 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8292 Logged by: Renzo Carranza Email address: renzo_gch@hotmail.com PostgreSQL version: 9.2.3 Operating system: Windows Description: Este es mi error "malformed function or procedure escape syntax at offset 6" Estas son mis funciones con las que hago la transacción en Java NetBeans CREATE OR REPLACE FUNCTION fu_ingresaralquiler() RETURNS integer AS $BODY$ DECLARE lalquilercodigo integer; BEGIN INSERT INTO alquiler(vigencia) VALUES (true::boolean); lalquilercodigo = CURRVAL('alquiler_codigo_seq'); return lalquilercodigo; END; $BODY$ LANGUAGE 'plpgsql' CREATE OR REPLACE FUNCTION fu_insertardetallealquiler( pnumero integer, pnombres character varying, papellidos character varying, pcodigohabitacion integer) RETURNS void AS $BODY$ BEGIN insert into detallealquiler( numero, nombres, apellidos, codigohabitacion) values((select codigo from alquiler order by codigo desc limit 1)::integer,pcodigoalquiler::integer, pnumero::integer, pnombres, papellidos, pcodigohabitacion::integer); END; $BODY$ LANGUAGE plpgsql; Este es mi código en NetBeans para llamar a la función: public void registrar(TipoHabitacion tipos) throws Exception { List parsTipo = new ArrayList(); parsTipo.add(new Parametro("", 0)); parsTipo.add(new Parametro("", 0)); parsTipo.add(new Parametro("", 0)); /*parsTipo.add(new Parametro("", tipos.getNombre())); * parsTipo.add(new Parametro("", tipos.getPrecio())); * parsTipo.add(new Parametro("", tipos.getCantidad()));*/ try { this.Conectar(true); parsTipo.get(0).setValor( tipos.getNombre()); parsTipo.get(1).setValor(tipos.getPrecio()); parsTipo.get(2).setValor( (int)tipos.getCantidad()) ; this.EjecutarProcedimiento( "{call fu_insertartipo(?, ?, ?)}", parsTipo); this.Conectar(false); } catch (Exception e) { this.Cerrar(false); JOptionPane.showMessageDialog(null, e); } finally { parsTipo.clear(); parsTipo = null; } } -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs