I use postgres with jdbc and I would like to delete all data from database without dropping any tables!! I would like to insert data in database using this
<jdbc:initialize-database data-source="DataSource">
<jdbc:script location="classpath:META-INF/test.sql"/>
</jdbc:initialize-database>
the problem is that I got a key duplicated exception, so I have to delete all data before running this code any idea?
pg_dump) and restore it without table content. Only table structure.