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. Andreas Kretschmer-4 wrote: > > In response to Donna Rudd : >> Hi, >> All I want to do is 'include' a stored procedure (contained in another >> script file) into my main PostgreSQL database creation script file so >> that >> it can get defined/declared before I define my triggers to call it. It >> seems >> such a simple thing but I don't seem to be able to find any examples or >> documentation. Please help! > > Your main script file is executed with psql? You can use \i <other_file> > within your main-file. > > > Andreas > -- > Andreas Kretschmer > Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) > GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net > > -- > Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > > -- View this message in context: http://www.nabble.com/How-do-I-%27include%27-a-stored-procedure-in-a-SQL-script-file-tp21330479p21412577.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general