How to run plpgsql to load data into postgresql server
by using tSystem component i could execute my PHP script, which executes the DB connection with postgresql & loads the data(from input file) into DB. now am trying to execute plpgsql script to get the data from the postgresql table(which is been loaded by the PHP script) & wanted to load the data into a different DB schema which is in the same postgresql server. The aim to do this is, from diferent departments the input files will be coming to the main server. From the server we are using TOS to parse the file by using PHP & loads the data into Postgresql DB(as a temporary). after this we wanna consolidate the data. so from the temporary tables, we are moving the data to the data warehouse. to move the data from temporary table to datawarehouse, am using plpgsql. but i dont know how to do this in TOS. can i use the plpgsql directly in any coponent? i hope it'd mess up the job design. so is there any component to run a whole plpgsql script? i need to do this after my PHP script loads the data successfully. please tell me some solution to do this.
Re: How to run plpgsql to load data into postgresql server
There is no tPostgresqlSP (Stored Procedure) component yet (TOS 2.4), but you can call your PL/PgSQL function directly from a tPostgresqlRow. The only drawback is that you won't get the return values of the stored procedure.