Re: [SQL] commit inside plpgsql function

2004-12-24 Thread Gregory S. Williamson
Already been answered (by me) -- you can't do this in postgres 7.x or earlier -- procedures may not have begins/commits or rollbacks. Version 8.0 *may* be different -- I don't have it installed yet; it does allow for some nesting of transactions but I don't know if this is allowed. The 8.0 docu

Re: [SQL] save sql result to file

2004-12-24 Thread Guy Fraser
Off the top of my head: psql -c "select into dump_table from old_table ;" database pg_dump -t dump_table -f dump_table.tmp database sed -e "s/dump_table/table_name/g" dump_table.tmp >table_name.sql rm dump_table.tmp You should now have a file called table_name.sql with the stuff requir

[SQL] Unable to execute Java Progarm

2004-12-24 Thread Anil Kumar
Dear Sir, When I tried to execute sample Java program using Postgresql its showing  runtime error Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/Savepoint    at org.postgresql.Driver.connect(Driver.java:183)    at java.sql.DriverManager.getConnection(DriverMa

[SQL] commit inside plpgsql function

2004-12-24 Thread Dennis Sacks
Hi, I am converting oracle stored procedures to plpgsql. There are several of the oracle procedures where a parameter vCommit is passed into the procedure and: if vCommit = 1 then commit; do_something_commit(vdate); else do_something(vdate); end if; does this make s

[SQL] save sql result to file

2004-12-24 Thread william lim
how to save sql result to a text file in database-backup format? I want to backup a portion of data from my query to files and can do restore from them. Thanks William ___ Sent by ePrompter, the premier email notification software. Free do