Please help me find out: there is a demo.sql file that creates and expands the demo database, I can’t find where the demo.sql file should be to create and deploy the database with the psql -f demo_small.sql -U postgres ? Or maybe you need to add something? While the command \i путь_к_файлу/demo_small.sql everything is fine rolls.

    1 answer 1

    Anywhere on the machine where psql runs from.

    psql is a client to PostgreSQL, the argument -f expects to get the path to the file in the file system of the machine where psql running. It can be just a file name and then psql will look for it in the directory where you were when calling psql . It may be a relative path; it may be an absolute path.

    If you can make ls путь_до_файла - the same path will do for psql

    The \i psql inside psql has exactly the same meaning, expects to get the path to the file on the system where psql running (but not where postgresql is running if it is different devices)