Tag Info

Hot answers tagged

6

If I understand correctly what you want to achieve, you can try it with the \G separator (instead of semicolon), like this: echo 'SELECT * FROM mytable\G' | mysql -u myuser -p mypassword mydb Example output: *************************** 1. row *************************** id: 1 locale: de name: Afghanistan *************************** 2. row ...


2

You are not "using the same account, same role, and same host", not even close. In your pg_dump call you don't supply any username (-U) or database (-d), only a hostname (-h) and schema (-n). So pg_dump uses your system user as a DB username and database to connect to. Judging by the error message, your system user seems to be "cs-rsub". In the psql call ...


2

It is not possible to run multiple PostgreSQL servers from the same data directory, even if all but one are read-only. Absolutely 100% unsupported. Cannot be done. Give up now. Somebody might one day add such a feature but it'd involve major changes to PostgreSQL, as Pg relies heavily on shared memory and signals for inter-process synchronization. Also, the ...


2

You can grab the source code for 9.0.8, then install the module from source: tar xf postgresql-9.0.8.tar.gz cd postgresql-9.0.8/contrib/unaccent PATH=/usr/bin/pgsql-9.0/bin:$PATH make USE_PGXS=1 sudo PATH=/usr/bin/pgsql-9.0/bin:$PATH make USE_PGXS=1 install Of course this requires the correct headers to be present, in particular the postgresql-devel ...


1

You do need to run them on the DB hosts as well as they are required to manage the resources (which are the database instances in your case). I assume that you could also create "remote resources" and remotely manage them but I'd say it is rather inefficient.


1

First, postgres users and your operating system users are not the same thing, except by default. Unless you create an actual postgres system account on your computer, you will need to edit your pg_hba.conf file and set up your authentication methods. The default should have a line something like local all postgres ...


1

Just create a new securitygroup with 5432 as inbound TCP connection and replace current security group on your RDS instance with the newly created one.


1

You might check to make sure that the system has sufficient kernel settings. I've had problems in the past where the PostgreSQL init script will try to start postmaster and have it silently fail due to insufficient shared memory settings. Normally you would see helpful messages explaining the settings that need to be changed, but the init script can hide ...


1

Unfortunately the most useful part of the exception is hidden, because a batch was used, and the wrapped exception wasn't examined with getNextException. It might not be easy to capture that, since you didn't write the code. I suggest examining PostgreSQL's server error log, probably after setting log_statement = 'all', it'll show you more useful info, ...


1

This is what I used: psql dbname -tc "select 'grant select on '||relname||' to readonly;' from pg_stat_user_tables" | psql dbname I feel it's more natural to do formatting and where-clauses in sql..


1

If you've installed the new server, the new clients are installed too - they're a dependency of the server. Redhat systems now use an "alternatives" mechanism similar to Debian. You'll find that /usr/bin/psql is a symlink pointing to /etc/alternatives/pgsql-psql which is in turn a symlink to the default psql. You can use the update-alternatives command to ...



Only top voted, non community-wiki answers of a minimum length are eligible