Re: BUG #10870: digest crypto function

From: hubert depesz lubaczewski <depesz(at)gmail(dot)com>
To: rameshparnanditech(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #10870: digest crypto function
Date: 2014-07-06 10:43:18
Message-ID: CAKrjmhcbhrR-0vZ=7zHd6-wix3m8wjdf=_31Vu=LDmvHV-N8Ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Jul 5, 2014 at 5:04 PM, <rameshparnanditech(at)gmail(dot)com> wrote:

> I am new postgres,i have a problem with digest function.
> i ran create extension pgcrypto; as super user
> here ,logged in as super user
> postgres=#select digest('hi','sha1');
> digest
> --------
> 3xc232ccc323
>

Please note that you created it and used in database named "postgres".

> i created devl database and user ramesh other then super user..
> when i try same statement with diffrent users i'm not able to run ..
> its return error like this way
> ramesh=# select digest('hi','sha1')
> ramesh-# ;
> ERROR: function digest(unknown, unknown) does not exist
> LINE 1: select digest('hi','sha1')
> ^
>

And you can't use it in another database, because you created it in
"postgres" and not "ramesh". Just like tables, views, indexes - functions
also belong to database.

Just connect to ramesh database as postgres user (superuser), create
extension pgcrypto, and you'll be set.

Also - this is not a bug in PostgreSQL - please post to pgsql-general or
pgsql-novice.

depesz

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Greg Stark 2014-07-06 23:40:26 Re: Postgresql database error in data retrive
Previous Message Mahesh Narawade 2014-07-06 06:54:35 Postgresql database error in data retrive