From: thomas at tada.se (Thomas Hallgren) Date: Mon, 28 Nov 2005 16:12:41 +0100 Subject: [Pljava-dev] Re: Meta data in pljava In-Reply-To: <438B10DA.5020809@insa-toulouse.fr> References: <438ADF29.70407@insa-toulouse.fr> <438B0A6B.9030806@tada.se> <438B10DA.5020809@insa-toulouse.fr> Message-ID: <438B1E69.1080904@tada.se> Brice, The TriggerData.getSchemaName() was introduced in PL/Java 1.2. I checked the current pljava downloads and from what I can see, it is indeed there. Are you sure you're using a 1.2 version? Regards, Thomas Hallgren brice rouanet wrote: > Thanks, > > i try : > > td.getSchemaName(); //and getTableName too > > and I get : > getSchemaName() not defined to TriggerData type. > > an idea ? > > Brice. > >> Brice, >> The current metadata implementation does not implement table and >> schema name correctly. Try using the methods >> TriggerData.getSchemaName() and TriggerData.getTableName() instead. >> >> Please post further questions to the pljava-dev at gborg.postgresql.org >> mailing-list. >> >> Regards, >> Thomas Hallgren >> >> brice rouanet wrote: >> >>> Hi, >>> >>> i install plajav 1.2 and psql 8.1 to try metadata, and i get not >>> result :( >>> >>> Here my java code : >>> >>> public class Test1 { >>> public static void createFile(TriggerData td) { >>> try { >>> ResultSet _new = td.getNew(); >>> ResultSetMetaData rsmd=_new.getMetaData(); >>> System.out.println("Schema ="+rsmd.getSchemaName(1)); >>> System.out.println("Table = "+rsmd.getTableName(1)); >>> String[] args = td.getArguments(); >>> System.out.println("trigger new : "+_new.getString(args[0])); >>> } >>> catch (Exception e) { >>> e.printStackTrace(); >>> } >>> } >>> >>> } >>> >>> and here my psql output : >>> >>> Schema = >>> Table = >>> trigger new : Test >>> >>> Trigger is fire on insert and i use javaU language >>> >>> Thanks, >>> Brice. >>> >> >> > >