I'm using a JDBC driver to connect to a Postgres instance. During initialization, I'd like to load a full sql file. In place of INSERT INTO Table(c1, c2) VALUES (v11, v12), (v21,v22)is it possible to directly load the file using something similar to a \i file.sql? \i file.sql itself doesn't succeed.
Asked
Active
Viewed 48 times
0
a_horse_with_no_name
- 497,550
- 91
- 775
- 843
0fnt
- 7,682
- 9
- 44
- 61
-
2`\i` is a `psql` command, not a SQL command. You can't use it from within Java. – a_horse_with_no_name Mar 29 '15 at 11:33
-
@RomanKonoval Thanks, I've voted for closing mine. – 0fnt Mar 29 '15 at 17:55