Search Postgresql Archives

Re: How do I 'include' a stored procedure in a SQL script file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux