small medium large xlarge

29 Aug 2012, 13:42
Lee Hemmings (2 posts)

Hello All,

Recently purchased “7 DB in 7 weeks” wanted to discovered other dbs areas.

Have come in to a problem with creating the function on page 26, when I run this from the shell prompt I get the below error. Where does the file need to be ?

books=# \i add_event.sql add_event.sql: No such file or directory

If I open the add_event.sql file with pgAdminIII and run it runs perfectly.

Any help would be great. Thanks

04 Sep 2012, 22:49
Mick Brooks (6 posts)

The filename argument you supply to \i is relative to the current working directory of your psql process i.e. from where you started the client.

e.g. if your client and server are on different machines, then the file must be on the client machine.

I hope that helps.


  You must be logged in to comment