Re: How To Install Extension Via Script File?

From: Quentin Hartman <qhartman(at)direwolfdigital(dot)com>
To: Don Parris <parrisdc(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How To Install Extension Via Script File?
Date: 2013-08-09 15:49:25
Message-ID: CAJ48qNa6C6zNJRHQETD_EgZFkCXMX2LrCViPP2mrPET==0hAdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A bit of an aside, but you also might want to change that "CREATE EXTENSION
ltree;" to

"CREATE EXTENSION IF NOT EXISTS ltree;"

That way your script won't error out if the extension is already enabled.

On Fri, Aug 9, 2013 at 3:57 AM, Don Parris <parrisdc(at)gmail(dot)com> wrote:

> On Thu, Aug 8, 2013 at 8:42 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> Don Parris <parrisdc(at)gmail(dot)com> writes:
>> > When I try a simple psql -U postgres -W - just to initiate the psql
>> > session, I get:
>> > psql: FATAL: Peer authentication failed for user "postgres"
>>
>> > It's like my regular user cannot connect as the postgres user.
>>
>> You're right, it can't, if you've selected peer authentication in
>> pg_hba.conf. You'd need to use some other auth method, perhaps
>> password-based auth, if you want this to work. Read up on auth methods
>> in the fine manual.
>>
>> > However, this works (with me just typing my password for sudo):
>> > donp(at)wiesbaden:~$ sudo -u postgres psql -U postgres
>> > [sudo] password for donp:
>>
>> Sure, because then psql is launched as the postgres OS user, and peer auth
>> will let that user connect as the postgres DB user.
>>
>> regards, tom lane
>>
>
> Ahhhh... now I understand. Thanks Tom! That should really help! I'll
> check that out.
>
> --
> D.C. Parris, FMP, Linux+, ESL Certificate
> Minister, Security/FM Coordinator, Free Software Advocate
> http://dcparris.net/ <https://www.xing.com/profile/Don_Parris><http://www.linkedin.com/in/dcparris>
> GPG Key ID: F5E179BE
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2013-08-09 16:06:22 Re: How to avoid Force Autovacuum
Previous Message Bèrto ëd Sèra 2013-08-09 15:38:05 Re: bi-directional syncing help request