Skip to content

Tag: postgresql

LINUX GNU Create New user Postgres DB in Makefile

I’m new with Makefile. I need to automate create user for postgres terminal. I tried this example and it did not work for me: Neither @create user myusername; nor @/q works. When I ran make createuser and exit manually with q from postgres terminal, I receive this error: Answer When debugging makefiles,…

pg_upgrade oldbindir check fails

I’m trying to upgrade postgresql database from 9.1 to 9.4. I ran the 9.4 version of pg_upgrade as follows: I get: The folder exists, I set the permissions to 777, even gave the postgres user ownership of the directory structure, but I’m still getting the same error. Running in verbose mode does no…

PostgreSQL CSV import from command line

I’ve been using the psql Postgres terminal to import CSV files into tables using the following which works fine except that I have to be logged into the psql terminal to run it. I would like to know if anyone knows of a way to do a command similar to this from the Linux shell command line similar to how

PostgreSQL psql terminal command

I’m trying to get psql to format nicely and am following the docs here. Right now, whenever I do a query on tables with lots of columns, no matter how big I make my screen each line overflows into the next line and producing a whole screen of unreadable junk. The docs (link is above) say there’s a…