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 85 times
0

0fnt
- 8,211
- 9
- 45
- 62
-
2`\i` is a `psql` command, not a SQL command. You can't use it from within Java. – Mar 29 '15 at 11:33
-
@RomanKonoval Thanks, I've voted for closing mine. – 0fnt Mar 29 '15 at 17:55