On Monday 12 January 2009 3:14:56 am DonnaR wrote:
> Currently I'm using PGAdmin to create everything, but I need to create a
> script file to create the schemas and the tables to ultimately run outside
> of PGAdmin. Since I have triggers, I need to 'load in' the (long)
> stored/triggered procedures during this process (ie 'call or 'include'
> another file with the stored procedure in it). It's this 'call' that I
> can't get to work. The \i <other_file> doesn't work (syntax error) within
> this main file. I just want to tell it to go and read in this other file.
> Note: I'm assuming the same file should run wthin PGAdmin and then outside
> it.
>
Have you tried:
psql -d some_db -U some_user -f trigger_func.sql
\i only works inside of psql.
--
Adrian Klaver
aklaver@comcast.net