Your message dated Sat, 22 Oct 2011 17:27:42 +0200 with message-id <[email protected]> and subject line Re: Bug#628786: pgcrypto.so not usable by default, nor after jumping through hoops has caused the Debian Bug report #628786, regarding pgcrypto.so not usable by default, nor after jumping through hoops to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 628786: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628786 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: postgresql-contrib-9.0 Version: 9.0.4-1~bpo60+1 Hi, I needed to get SHA-1 support in PostgreSQL. Googling says pgcrypto is the contrib module to use. So I installed this package, reloaded the server, digest() wasn't available, restarted it, ditto. More googling then told me there's /usr/share/postgresql/9.0/contrib/pgcrypto.sql that I need to apply first. Why couldn't the package or at least mention that? Only /usr/share/doc/postgresql-contrib-9.0/README is shipped, and it's apparently completely generic and useless. So, anyway, I tried applying that file, % sudo -H -u postgres psql test-sha < /usr/share/postgresql/9.0/contrib/pgcrypto.sql SET ERROR: nemoguć pristup datoteci "$libdir/pgcrypto": No such file or directory ERROR: nemoguć pristup datoteci "$libdir/pgcrypto": No such file or directory [...] (the foreign string is translated "can't access file" or similar) After some more googling, I find: test-sha=# show dynamic_library_path; dynamic_library_path ---------------------- $libdir (1 row) So it's usable like that inside special variables, but not from SQL. Argh. Anyway, from shell, `pg_config --pkglibdir` tells me it's at /usr/lib/postgresql/9.0/lib So I hardcode that and try: CREATE OR REPLACE FUNCTION digest(text, text) RETURNS bytea AS '/usr/lib/postgresql/9.0/lib/pgcrypto.so', 'pg_digest' LANGUAGE C IMMUTABLE STRICT; But the new output is: ERROR: neuspjelo čitanje biblioteke "/usr/lib/postgresql/9.0/lib/pgcrypto.so": /usr/lib/postgresql/9.0/lib/pgcrypto.so: undefined symbol: cstring_to_text_with_len (the foreign string is "failed to read library" or similar) Surely this library isn't supposed to be this hard/impossible to use :) Please fix this. TIA. -- 2. That which causes joy or happiness.
--- End Message ---
--- Begin Message ---Version: 9.1.0-1 9.1 now has an uniform and easy way to install "extensions" (formerly known as "contrib modules"): test=# CREATE EXTENSION pgcrypto; CREATE EXTENSION test=# SELECT md5('foo'); md5 ---------------------------------- acbd18db4cc2f85cedef654fccc4a4d8 test=# SELECT digest('foo', 'sha1'); digest -------------------------------------------- \x0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 It's also documented quite well in postgesql-doc-9.1 / online: http://www.postgresql.org/docs/9.1/interactive/sql-createextension.html http://www.postgresql.org/docs/9.1/interactive/pgcrypto.html So I think this can be closed now. Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
signature.asc
Description: Digital signature
--- End Message ---

