Обсуждение: Bug in all version with encryption

Поиск
Список
Период
Сортировка

Bug in all version with encryption

От
"Suresh Gupta VG"
Дата:

			
		

Re: Bug in all version with encryption

От
John R Pierce
Дата:
Suresh Gupta VG wrote:
>
> I had recently upgraded my pgsql 7.4.2 to pgsql 8.2.5 on Solaris 9
> Sparc machine. All the installation went normally as per install
> documents of Postgresql. In between the installation, I got the
> following error. But at the end I could create database and can use
> the DB as normal.
> -------
> ERROR: incompatible library "/usr/lib/pgsql_clcrypt.so": missing magic
> block
> HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro.
> STATEMENT: CREATE FUNCTION blowfish_encrypt(text, text) RETURNS text
> AS '/usr/lib/pgsql_clcrypt.so', 'blowfish_encrypt'
> LANGUAGE c;
> ...
> -----------
>
> This problem is coming with all the versions of PGSQL. We had a good
> experience with similar error when we were upgraded with 7.4.2 long
> back. Can you pls advice what to do to rectify this error in
> Postgresql 8.2.5.
>

this does not look like a postgres bug to me.


Offhand, it looks like your database loads custom functions from the
shared object library /usr/lib/pgsql_clcrypt.so which was probably built
for your older 7.4...  you'd either need to rebuild that library to be
8.2 compatible, or remove the CREATE FUNCTION statements that reference
it (and modify any SQL code you have which calls these
blowfish_encrypt() etc functions...)

Re: Bug in all version with encryption

От
"Suresh Gupta VG"
Дата:
Thanks for your reply.

=20

As per your suggestion, if we remove "CREATE FUNCTION" statement, we
cannot use that function.

Actually, we need this feature.

=20

Can you pls suggest some url or docs to help us in developing the
c-language code to rectify this as we had done earlier for pgsql7.4.2.

=20

And pls provide us with new macros introduced in 8.2.5 later to 7.4.2,
so that it can help us in our coding very mush

Thanks in advice.

=20

=20

Regards,

G. V. Suresh Gupta

------------------------------------------------------------------------
---------------------------------------------------------

Innovative Technology Solutions(ITS), Zensar Technologies=20

Zensar Knowledge Park, Plot#5, MIDC IT Tower,=20

Kharadi, Off Nagar Road, Pune - 411014

Landline :  +91-20-66453471           | +91-9890898688=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20

Email     :   suresh.g@zensar.com    | website:  www.zensar.com

=20

=20

=20

=20

=20

=20

-----Original Message-----
From: John R Pierce [mailto:pierce@hogranch.com]=20
Sent: Thursday, January 17, 2008 2:31 PM
To: Suresh Gupta VG
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Bug in all version with encryption

=20

Suresh Gupta VG wrote:

>=20

> I had recently upgraded my pgsql 7.4.2 to pgsql 8.2.5 on Solaris 9=20

> Sparc machine. All the installation went normally as per install=20

> documents of Postgresql. In between the installation, I got the=20

> following error. But at the end I could create database and can use=20

> the DB as normal.

> -------

> ERROR: incompatible library "/usr/lib/pgsql_clcrypt.so": missing magic


> block

> HINT: Extension libraries are required to use the PG_MODULE_MAGIC
macro.

> STATEMENT: CREATE FUNCTION blowfish_encrypt(text, text) RETURNS text

> AS '/usr/lib/pgsql_clcrypt.so', 'blowfish_encrypt'

> LANGUAGE c;

> ...

> -----------

>=20

> This problem is coming with all the versions of PGSQL. We had a good=20

> experience with similar error when we were upgraded with 7.4.2 long=20

> back. Can you pls advice what to do to rectify this error in=20

> Postgresql 8.2.5.

>=20

=20

this does not look like a postgres bug to me.

=20

=20

Offhand, it looks like your database loads custom functions from the=20

shared object library /usr/lib/pgsql_clcrypt.so which was probably built


for your older 7.4...  you'd either need to rebuild that library to be=20

8.2 compatible, or remove the CREATE FUNCTION statements that reference=20

it (and modify any SQL code you have which calls these=20

blowfish_encrypt() etc functions...)

=20

=20



DISCLAIMER:
This email may contain confidential or privileged information for the inten=
ded recipient(s) and the views expressed in the same are not necessarily th=
e views of Zensar Technologies Ltd. If you are not the intended recipient o=
r have received this e-mail by error, its use is strictly prohibited, pleas=
e delete the e-mail and notify the sender. Zensar Technologies Ltd. does no=
t accept any liability for virus infected mails.=20

Re: Bug in all version with encryption

От
Alvaro Herrera
Дата:
Suresh Gupta VG wrote:

> As per your suggestion, if we remove "CREATE FUNCTION" statement, we
> cannot use that function.

Add the PG_MODULE_MAGIC stuff to your code and recompile it.  This is
mentioned in the documentation.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: Bug in all version with encryption

От
John R Pierce
Дата:
Suresh Gupta VG wrote:
>
> Thanks for your reply.
>
> As per your suggestion, if we remove =93CREATE FUNCTION=94 statement, we=
=20
> cannot use that function.
>
> Actually, we need this feature.
>
> Can you pls suggest some url or docs to help us in developing the=20
> c-language code to rectify this as we had done earlier for pgsql7.4.2.
>

http://www.postgresql.org/docs/current/static/xfunc-c.html

again, this isn't a postgres bug. you're posting this on the wrong list.