Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009

    Unanswered: Another newbie question

    I've searched the forum here a few times and haven't found an answer, and it's difficult to google this kind of question because the terms are so common, so hopefully someone here can explain this to me.

    I've got my data model, a number of functions, and a goodish pile of test data built. My problem is that I want to run a few scripts one after the other to set up the data I need to run some tests. (These will probably form the basis of our regression testing in the future.)

    My problem is that I need different data depending on the tests I need to run, which right now I'm achieving by running script A, then B, then C for one set of tests; then running A, C, and D for another set.

    What I'd like to do is put together some "master" scripts that will run these other scripts, one after the other. How would I achieve this?

    Googling combinations of words like "include", "reference", and "script" has not provided anything relevant so far. I also have not been able to find anything in the documentation.

    I'm running Postgres 8.3 on Windows XP.


  2. #2
    Join Date
    Nov 2003
    Provided Answers: 23
    If you are running your scripts with psql check out the \i command.
    That can be used to include other sql scripts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts