Re: [GENERAL] md5(large_object_id)

2015-10-07 Thread Karsten Hilbert
On Wed, Oct 07, 2015 at 01:01:41PM -0500, Jim Nasby wrote: > >Still, I'd welcome a native, streaming md5(loid) which is > >bound to be more optimized by design. > > It would be nice if we had an interface to TOAST that allowed for streaming > (well, really chunking) data to a function. That would

Re: [GENERAL] md5(large_object_id)

2015-10-07 Thread Jim Nasby
On 10/7/15 10:34 AM, Karsten Hilbert wrote: Still, I'd welcome a native, streaming md5(loid) which is bound to be more optimized by design. It would be nice if we had an interface to TOAST that allowed for streaming (well, really chunking) data to a function. That wouldn't help in this partic

Re: [GENERAL] md5(large_object_id)

2015-10-07 Thread Karsten Hilbert
For the record - I have also devised another solution to the underlying problem (md5(bytea) cannot process large amounts of input), chunked md5(): create or replace function lo_chunked_md5(oid, int) returns text language 'plpgsql' stable stri

Re: [GENERAL] md5(large_object_id)

2015-10-07 Thread Karsten Hilbert
On Wed, Oct 07, 2015 at 01:30:24PM +0200, Pavel Stehule wrote: > > > > > I am dealing with radiology studies aka DICOM data) one would > > > > > want an md5 function which streams in parts of a large object > > > > > piece by piece using md5_update and m5_finalize or some such. > > > > It would ce

Re: [GENERAL] md5(large_object_id)

2015-10-07 Thread Pavel Stehule
2015-10-07 13:18 GMT+02:00 Karsten Hilbert : > On Wed, Oct 07, 2015 at 12:55:38PM +0200, Karsten Hilbert wrote: > > > > > I am dealing with radiology studies aka DICOM data) one would > > > > want an md5 function which streams in parts of a large object > > > > piece by piece using md5_update and

Re: [GENERAL] md5(large_object_id)

2015-10-07 Thread Karsten Hilbert
On Wed, Oct 07, 2015 at 12:55:38PM +0200, Karsten Hilbert wrote: > > > I am dealing with radiology studies aka DICOM data) one would > > > want an md5 function which streams in parts of a large object > > > piece by piece using md5_update and m5_finalize or some such. > > It would certainly be pos

Re: [GENERAL] md5(large_object_id)

2015-10-07 Thread Karsten Hilbert
On Mon, Oct 05, 2015 at 03:27:26PM +, Kevin Grittner wrote: > Karsten Hilbert wrote: > > > I am dealing with radiology studies aka DICOM data) one would > > want an md5 function which streams in parts of a large object > > piece by piece using md5_update and m5_finalize or some such. > It wo

Re: [GENERAL] md5(large_object_id)

2015-10-06 Thread Daniel Verite
Karsten Hilbert wrote: > On Mon, Oct 05, 2015 at 03:27:26PM +, Kevin Grittner wrote: > > > Karsten Hilbert wrote: > > > > > I am dealing with radiology studies aka DICOM data) one would > > > want an md5 function which streams in parts of a large object > > > piece by piece using md

Re: [GENERAL] md5(large_object_id)

2015-10-05 Thread Karsten Hilbert
On Mon, Oct 05, 2015 at 03:27:26PM +, Kevin Grittner wrote: > Karsten Hilbert wrote: > > > I am dealing with radiology studies aka DICOM data) one would > > want an md5 function which streams in parts of a large object > > piece by piece using md5_update and m5_finalize or some such. > It wo

Re: [GENERAL] md5(large_object_id)

2015-10-05 Thread Kevin Grittner
Karsten Hilbert wrote: > I am dealing with radiology studies aka DICOM data) one would > want an md5 function which streams in parts of a large object > piece by piece using md5_update and m5_finalize or some such. It would certainly be possible to write a lo_md5(oid) function to do this, but as

Re: [GENERAL] md5(large_object_id)

2015-09-22 Thread Karsten Hilbert
> I don't think that it is possible to stream the result of a query anyway, I was unclear. I don't expect query results to stream out to the client. I want the "SELECT md5(OID);" to return a single md5 hash value. It is already possible to "SELECT md5(lo_read(OID));" but that will read the entire

Re: [GENERAL] md5(large_object_id)

2015-09-22 Thread Willy-Bas Loos
On Mon, Sep 21, 2015 at 10:17 PM, Karsten Hilbert wrote: > I am dealing with radiology > studies aka DICOM data) one would want an md5 function which > streams in parts of a large object piece by piece using > md5_update and m5_finalize or some such. > > It didn't look like pgcrypto offers a str

Re: [GENERAL] MD5 password storage - should be the same everywhere?

2015-05-26 Thread Francisco Reyes
On 05/25/2015 07:58 PM, Adrian Klaver wrote: On 05/25/2015 01:41 PM, Francisco Reyes wrote: I understood that is just a md5 hash of the password and the username with the string md5 pre-appended, so it should be the same. Mistery solved.. Because I usually do "script" of most of my work for aud

Re: [GENERAL] MD5 password storage - should be the same everywhere?

2015-05-25 Thread Adrian Klaver
On 05/25/2015 08:41 PM, Yves Dorfsman wrote: On 2015-05-25 17:58, Adrian Klaver wrote: On 05/25/2015 01:41 PM, Francisco Reyes wrote: On multiple machines, should the MD5 be the same? using select rolname, rolpassword,rolcanlogin from pg_catalog.pg_authid where rolname = 'SomeUser'; Should the

Re: [GENERAL] MD5 password storage - should be the same everywhere?

2015-05-25 Thread Yves Dorfsman
On 2015-05-25 17:58, Adrian Klaver wrote: > On 05/25/2015 01:41 PM, Francisco Reyes wrote: >> On multiple machines, should the MD5 be the same? >> using >> select rolname, rolpassword,rolcanlogin from pg_catalog.pg_authid where >> rolname = 'SomeUser'; >> >> Should the MD5 be the same? > > I under

Re: [GENERAL] MD5 password storage - should be the same everywhere?

2015-05-25 Thread Yves Dorfsman
On 2015-05-25 17:58, Adrian Klaver wrote: > On 05/25/2015 01:41 PM, Francisco Reyes wrote: >> On multiple machines, should the MD5 be the same? >> using >> select rolname, rolpassword,rolcanlogin from pg_catalog.pg_authid where >> rolname = 'SomeUser'; >> >> Should the MD5 be the same? > > I under

Re: [GENERAL] MD5 password storage - should be the same everywhere?

2015-05-25 Thread Adrian Klaver
On 05/25/2015 01:41 PM, Francisco Reyes wrote: Should the same password, stored in MD5, be the same across different DBs? If I did either: create user SomeUser encrypted password 'SomePassword'; alter user SomeUser encrypted password 'SomePassword'; On multiple machines, should the MD5 be the s

Re: [GENERAL] MD5 salt in pg_authid password hashes

2012-02-16 Thread Stefan Weiss
On 2012-02-16 04:18, Adrian Klaver wrote: > When you alter the role name you are told the password has been cleared. It > would be fairly easy to wrap the rename and the setting of the password in a > transaction. But this shouldn't be necessary. I don't get why the salt has to be linked with th

Re: [GENERAL] MD5 salt in pg_authid password hashes

2012-02-15 Thread Adrian Klaver
On Wednesday, February 15, 2012 6:34:21 pm Stefan Weiss wrote: > From the manual: > | Because MD5-encrypted passwords use the role name as cryptographic > | salt, renaming a role clears its password if the password is > | MD5-encrypted. > > In backend/commands/user.c > > if (!pg_md5_encrypt(p

Re: [GENERAL] md5 of table

2011-09-03 Thread Sim Zacks
I thought about using dblink and the EXCEPT query, but then I need to know the field list of each query result, which is a pain in the butt. That is not correct. As long as the table definitions are precisely the same, you can move records across dblink without specifying fields. You do this

Re: [GENERAL] md5 of table

2011-09-02 Thread Vincent de Phily
On Thursday 01 September 2011 11:47:24 Sim Zacks wrote: > Is there a way to get an md5 or other hash of an entire table? > > I want to be able to easily compare 2 tables in different databases. > > I thought about using dblink and the EXCEPT query, but then I need to > know the field list of each

Re: [GENERAL] md5 of table

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 7:56 AM, Achilleas Mantzios wrote: > Στις Thursday 01 September 2011 15:50:21 ο/η Scott Marlowe έγραψε: >> Really?  I was not aware of size limits of md5, what are they? >> > > sorry, i was wrong. i dont know why i had this impression, > just checked with a 43GB table on a f

Re: [GENERAL] md5 of table

2011-09-01 Thread Merlin Moncure
2011/9/1 Sim Zacks : > >> OP: >>> >>> I thought about using dblink and the EXCEPT query, but then I need to >>> know the field list of each query result, which is a pain in the butt. >> >> That is not correct.  As long as the table definitions are precisely >> the same, you can move records across

Re: [GENERAL] md5 of table

2011-09-01 Thread Robert Treat
2011/9/1 Merlin Moncure : > 2011/9/1 Grzegorz Jaśkiewicz : >> On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: >>> On 09/01/2011 12:26 PM, Pavel Stehule wrote: Hello postgres=# create table tt(a int, b varchar); CREATE TABLE postgres=# insert into tt values(10,'hello

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
OP: I thought about using dblink and the EXCEPT query, but then I need to know the field list of each query result, which is a pain in the butt. That is not correct. As long as the table definitions are precisely the same, you can move records across dblink without specifying fields. You do

Re: [GENERAL] md5 of table

2011-09-01 Thread Merlin Moncure
2011/9/1 Grzegorz Jaśkiewicz : > On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: >> On 09/01/2011 12:26 PM, Pavel Stehule wrote: >>> >>> Hello >>> >>> postgres=# create table tt(a int, b varchar); >>> CREATE TABLE >>> postgres=# insert into tt values(10,'hello'); >>> INSERT 0 1 >>> >>> postgres=

Re: [GENERAL] md5 of table

2011-09-01 Thread Achilleas Mantzios
Στις Thursday 01 September 2011 15:50:21 ο/η Scott Marlowe έγραψε: > On Thu, Sep 1, 2011 at 3:48 AM, Achilleas Mantzios > wrote: > > md5 has size limitations, the second approach seems more practical. > > Really? I was not aware of size limits of md5, what are they? > sorry, i was wrong. i don

Re: [GENERAL] md5 of table

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 3:48 AM, Achilleas Mantzios wrote: > md5 has size limitations, the second approach seems more practical. Really? I was not aware of size limits of md5, what are they? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
On 09/01/2011 01:35 PM, Grzegorz Jaśkiewicz wrote: On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: On 09/01/2011 12:26 PM, Pavel Stehule wrote: Hello postgres=# create table tt(a int, b varchar); CREATE TABLE postgres=# insert into tt

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
I am not sure if this will work, but you can try it http://www.pgsql.cz/index.php/PostgreSQL_SQL_Tricks#Cast_to_varchar Pavel I appreciate your help, but UDTs don't have input/ouput functions unless you define them manually and I need this for all of my

Re: [GENERAL] md5 of table

2011-09-01 Thread Grzegorz Jaśkiewicz
On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: > On 09/01/2011 12:26 PM, Pavel Stehule wrote: >> >> Hello >> >> postgres=# create table tt(a int, b varchar); >> CREATE TABLE >> postgres=# insert into tt values(10,'hello'); >> INSERT 0 1 >> >> postgres=# select md5(array_to_string(array_agg(md5(

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
On 09/01/2011 12:26 PM, Pavel Stehule wrote: Hello postgres=# create table tt(a int, b varchar); CREATE TABLE postgres=# insert into tt values(10,'hello'); INSERT 0 1 postgres=# select md5(array_to_string(array_agg(md5(tt::text)),'')) from tt; md5 ---

Re: [GENERAL] md5 of table

2011-09-01 Thread Achilleas Mantzios
md5 has size limitations, the second approach seems more practical. Στις Thursday 01 September 2011 12:30:45 ο/η Karsten Hilbert έγραψε: > On Thu, Sep 01, 2011 at 11:47:24AM +0300, Sim Zacks wrote: > > > Is there a way to get an md5 or other hash of an entire table? > > > > I want to be able to

Re: [GENERAL] md5 of table

2011-09-01 Thread Karsten Hilbert
On Thu, Sep 01, 2011 at 11:47:24AM +0300, Sim Zacks wrote: > Is there a way to get an md5 or other hash of an entire table? > > I want to be able to easily compare 2 tables in different databases. > > I thought about using dblink and the EXCEPT query, but then I need to > know the field list of

Re: [GENERAL] MD5 Authentication

2009-11-06 Thread Raimon Fernandez
On 06/11/2009, at 8:48, Raimon Fernandez wrote: I'm blocked ... On 06/11/2009, at 6:27, John DeSoi wrote: On Nov 5, 2009, at 12:35 PM, Raimon Fernandez wrote: at least, my first md5 (psw+user) is the same as the pg_shadow (wihtout the 'md5') ... should I md5 the first md5 as I get

Re: [GENERAL] MD5 Authentication

2009-11-05 Thread Raimon Fernandez
I'm blocked ... On 06/11/2009, at 6:27, John DeSoi wrote: On Nov 5, 2009, at 12:35 PM, Raimon Fernandez wrote: at least, my first md5 (psw+user) is the same as the pg_shadow (wihtout the 'md5') ... should I md5 the first md5 as I get it as string (like username) or byte by byte ?

Re: [GENERAL] MD5 Authentication

2009-11-05 Thread Tom Lane
John DeSoi writes: > ... But it is unclear to me what happens when > the user or database name has non-ascii characters. The client > encoding is not established until after authentication. No encoding conversion will happen on those names. If you consistently use the same encoding in all cl

Re: [GENERAL] MD5 Authentication

2009-11-05 Thread John DeSoi
On Nov 5, 2009, at 12:35 PM, Raimon Fernandez wrote: at least, my first md5 (psw+user) is the same as the pg_shadow (wihtout the 'md5') ... should I md5 the first md5 as I get it as string (like username) or byte by byte ? As far as I know, a string. But it is unclear to me what happens

Re: [GENERAL] MD5 sum mismatch in source rpm

2009-09-20 Thread Devrim GÜNDÜZ
On Fri, 2009-09-18 at 22:38 -0300, Clodoaldo Neto wrote: > Although I have already built some srpms I was just following recipes > and I never really tried to understand what I was doing so it is > probably my mistake. This time I was trying to install the f11 srpm > (the only one I found in the mi

Re: [GENERAL] MD5 sum mismatch in source rpm

2009-09-18 Thread Clodoaldo Neto
2009/9/18 Devrim GÜNDÜZ : > Hi Clodoaldo, > > On Fri, 2009-09-18 at 19:42 -0300, Clodoaldo Neto wrote: >> >> # rpm -Uhv postgresql-8.2.14-1PGDG.f11.src.rpm >> warning: postgresql-8.2.14-1PGDG.f11.src.rpm: Header V4 DSA signature: >> NOKEY, key ID 442df0f8 >>1:postgresql warning: use

Re: [GENERAL] MD5 sum mismatch in source rpm

2009-09-18 Thread Devrim GÜNDÜZ
Hi Clodoaldo, On Fri, 2009-09-18 at 19:42 -0300, Clodoaldo Neto wrote: > > # rpm -Uhv postgresql-8.2.14-1PGDG.f11.src.rpm > warning: postgresql-8.2.14-1PGDG.f11.src.rpm: Header V4 DSA signature: > NOKEY, key ID 442df0f8 >1:postgresql warning: user devrim does not exist - > using r

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Alvaro Herrera
Andreas Wenk wrote: > Yes thats correct with the IP address range. Maybe I did not understand > the auth concept yet. I thought, that with METHOD set to md5, a md5 > hashed password is required. The password is submitted with the PHP 5 > pg_connect function - as plain text. It is specified

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Hi Tom, Tom Lane schrieb: Andreas Wenk writes: In pg_hba.conf we have: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident sameuser # IPv4 local connections: host

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Alvaro Herrera schrieb: Andreas Wenk wrote: Yes thats correct with the IP address range. Maybe I did not understand the auth concept yet. I thought, that with METHOD set to md5, a md5 hashed password is required. The password is submitted with the PHP 5 pg_connect function - as plain tex

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Hi Joshua Joshua D. Drake schrieb: On Thu, 2009-01-15 at 18:05 +0100, Andreas Wenk wrote: postgres=# SELECT rolname,rolpassword from pg_authid; rolname | rolpassword - ---+- postgres | pgadmin | plaintext odie | md5passs

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Tom Lane
Andreas Wenk writes: > In pg_hba.conf we have: > # TYPE DATABASEUSERCIDR-ADDRESS METHOD > # "local" is for Unix domain socket connections only > local all all ident sameuser > # IPv4 local connections: > hostall all

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Joshua D. Drake
On Thu, 2009-01-15 at 18:05 +0100, Andreas Wenk wrote: > postgres=# SELECT rolname,rolpassword from pg_authid; > rolname | rolpassword > - ---+- > postgres | > pgadmin | plaintext > odie | md5passsorrrd > > The user odi

Re: [GENERAL] md5() sorting

2007-11-17 Thread Scott Marlowe
On Nov 12, 2007 1:53 PM, Lew <[EMAIL PROTECTED]> wrote: > Karsten Hilbert wrote: > > On Wed, Nov 07, 2007 at 05:36:47PM +0200, Marko Kreen wrote: > > > I'm wondering if you cast the md5sum as a bytea instead of text and > then sort, if that would solve it simply. > >>> Along the lines of

Re: [GENERAL] md5() sorting

2007-11-17 Thread Lew
Karsten Hilbert wrote: On Wed, Nov 07, 2007 at 05:36:47PM +0200, Marko Kreen wrote: I'm wondering if you cast the md5sum as a bytea instead of text and then sort, if that would solve it simply. Along the lines of ... ORDER BY decode(md5('...'), 'hex'); Maybe using digest(.., 'md5')

Re: [GENERAL] md5() sorting

2007-11-07 Thread Marko Kreen
On 11/7/07, Karsten Hilbert <[EMAIL PROTECTED]> wrote: > On Wed, Nov 07, 2007 at 03:54:02PM +0100, Martijn van Oosterhout wrote: > > > Should I be going about this sorting or hashing or detection > > > business in another way entirely which can be done at the > > > SQL level ? > > > > I'm wonder

Re: [GENERAL] md5() sorting

2007-11-07 Thread Karsten Hilbert
On Wed, Nov 07, 2007 at 05:36:47PM +0200, Marko Kreen wrote: > > > I'm wondering if you cast the md5sum as a bytea instead of text and > > > then sort, if that would solve it simply. > > > > Along the lines of > > > > ... ORDER BY decode(md5('...'), 'hex'); > > > Maybe using digest(.., 'md

Re: [GENERAL] md5() sorting

2007-11-07 Thread Martijn van Oosterhout
On Wed, Nov 07, 2007 at 03:42:11PM +0100, Karsten Hilbert wrote: > Should I be going about this sorting or hashing or detection > business in another way entirely which can be done at the > SQL level ? I'm wondering if you cast the md5sum as a bytea instead of text and then sort, if that would

Re: [GENERAL] md5() sorting

2007-11-07 Thread Karsten Hilbert
On Wed, Nov 07, 2007 at 03:54:02PM +0100, Martijn van Oosterhout wrote: > > Should I be going about this sorting or hashing or detection > > business in another way entirely which can be done at the > > SQL level ? > > I'm wondering if you cast the md5sum as a bytea instead of text and > then

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Wed, Nov 02, 2005 at 06:07:45PM +0100, A. Kretschmer wrote: >> is 'record_out()' new in 8.1? > The signature has changed over time: > 7.3 record_out(record) > 7.4 record_out(record) > 8.0 record_out(record,oid) > 8.1 record_out(record) BTW, the a

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Bruce Momjian
Michael Fuhr wrote: > On Wed, Nov 02, 2005 at 06:07:45PM +0100, A. Kretschmer wrote: > > am 02.11.2005, um 9:35:33 -0700 mailte Michael Fuhr folgendes: > > > test=> SELECT id, md5(textin(record_out(foo))) FROM foo; > > > > is 'record_out()' new in 8.1? > > The signature has changed over time: >

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 06:07:45PM +0100, A. Kretschmer wrote: > am 02.11.2005, um 9:35:33 -0700 mailte Michael Fuhr folgendes: > > test=> SELECT id, md5(textin(record_out(foo))) FROM foo; > > is 'record_out()' new in 8.1? The signature has changed over time: 7.3 record_out(record) 7.4 recor

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 12:18:15PM -0500, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > I just noticed that record_out(foo) works only in 8.1. When I have > > more time I'll see if it's possible in earlier versions. > > Probably not :-( This works in 8.0.4, although it gives eve

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 02:49:57PM -0200, Jon Lapham wrote: > Michael Fuhr wrote: > >test=> SELECT id, foo FROM foo; > > id | foo > >+- > > 1 | (1,123,"this is a test",2005-11-02,t,"\\0

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > I just noticed that record_out(foo) works only in 8.1. When I have > more time I'll see if it's possible in earlier versions. Probably not :-( 2005-05-04 20:19 tgl * src/backend/parser/parse_coerce.c: Allow implicit cast from any named

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread A. Kretschmer
am 02.11.2005, um 9:35:33 -0700 mailte Michael Fuhr folgendes: > test=> SELECT id, md5(textin(record_out(foo))) FROM foo; is 'record_out()' new in 8.1? Regards, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://ww

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 09:35:33AM -0700, Michael Fuhr wrote: > test=> SELECT id, md5(textin(record_out(foo))) FROM foo; > id | md5 > +-- > 1 | b1cbe3d5ed304f31da57b85258f20c8f I just noticed that record_out(foo) works only in 8.

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Jon Lapham
Michael Fuhr wrote: test=> SELECT id, foo FROM foo; id | foo +- 1 | (1,123,"this is a test",2005-11-02,t,"\\000\\001\\002") Perfect! Wow, in all these years of using PostgreSQL,

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 11:38:46AM -0200, Jon Lapham wrote: > I would love something like this: > select id, md5(*) from mytable; Is it acceptable to have some decoration around the data being hashed? If so then this example might be useful: test=> SELECT * FROM foo; id | integer | text

Re: [GENERAL] MD5(MD5(pw)) OK?

2004-12-17 Thread Tom Lane
Joachim Zobel <[EMAIL PROTECTED]> writes: > I am thinking about building a login, where the logged in users are > stored in a table logins. To make it shure and documented the users have > entered a password I want to store the MD5(pw) in logins. To make it > impossible to fake logins entries I pla

Re: [GENERAL] MD5

2004-12-16 Thread Tino Wildenhain
Hi, Am Freitag, den 17.12.2004, 09:41 +1100 schrieb Jamie Deppeler: > Hi, > > I was just wondering is it possible to encrypt a filed in the database > with md5? i know it is possible to do it with DB users No. You cannot encrypt with md5 because you cant decrypt. md5 is a hash function. But you

Re: [GENERAL] MD5

2004-12-16 Thread Tino Wildenhain
Am Freitag, den 17.12.2004, 10:55 +1100 schrieb Jamie Deppeler: > Tino Wildenhain wrote: > > Hi, > > > > Am Freitag, den 17.12.2004, 09:41 +1100 schrieb Jamie Deppeler: > > > > > Hi, > > > > > > I was just wondering is it possible to encrypt a filed in the database > > > with md5? i know it

Re: [GENERAL] MD5

2004-12-16 Thread Michael Fuhr
[Please don't post in HTML] On Fri, Dec 17, 2004 at 10:55:47AM +1100, Jamie Deppeler wrote: > Well basically i want to store and hashed value that will never be > changed just compaired too hashed values In that case MD5 should suffice, although recently-discovered weaknesses have led some peopl

Re: [GENERAL] MD5

2004-12-16 Thread Chris Smith
(Ignore my other reply.. ;P) You'll need to import the pgcrypto.sql file (this creates the functions for you). Read the doco on how to install the extension, it should tell you where the sql file is. Regards, Chris Smith Suite 30, 45-51 Huntley St, Alexandria, NSW 2015 Australia Ph: +61 2 9517

Re: [GENERAL] MD5

2004-12-16 Thread Chris Smith
Use the md5 function: select md5('welcome'); md5 -- 40be4e59b9a2a2b5dffb918c0e86b3d7 (1 row) Regards, Chris Smith Suite 30, 45-51 Huntley St, Alexandria, NSW 2015 Australia Ph: +61 2 9517 2505 Fx: +61 2 9517 1915 email: [EMAIL PROTECTED] web: www.inte

Re: [GENERAL] MD5

2004-12-16 Thread Jamie Deppeler
Tino Wildenhain wrote: Hi, Am Freitag, den 17.12.2004, 09:41 +1100 schrieb Jamie Deppeler: Hi, I was just wondering is it possible to encrypt a filed in the database with md5? i know it is possible to do it with DB users No. You cannot encrypt with md5 because you can

Re: [GENERAL] MD5

2004-12-16 Thread Michael Fuhr
On Fri, Dec 17, 2004 at 09:41:22AM +1100, Jamie Deppeler wrote: > I was just wondering is it possible to encrypt a filed in the database > with md5? i know it is possible to do it with DB users MD5 returns a hash, not an encrypted string that could later be decrypted. For an encryption mechanis

Re: [GENERAL] md5 checksum mismatch

2004-12-02 Thread Richard Huxton
Bill Kurland wrote: I've downloaded several versions of postgresql from several mirrors. On none of them did the md5 checksums from http://www.gtsm.com/postgres_sigs.html match the md5 checksum from the postgresql-*.tar.gz source file I downloaded. As a follow-up to my last message, "md5sum --ch

Re: [GENERAL] md5 checksum mismatch

2004-12-02 Thread Richard Huxton
Bill Kurland wrote: I've downloaded several versions of postgresql from several mirrors. On none of them did the md5 checksums from http://www.gtsm.com/postgres_sigs.html match the md5 checksum from the postgresql-*.tar.gz source file I downloaded. I can't imagine that all these file are corrup

Re: [GENERAL] MD5 for PostgreSQL 7.3.4

2004-11-03 Thread Joe Conway
Tk421 wrote: I've been looking at contrib/pgcrypto but it hasn't any information about md5 encryption Sure it does. See README.pgcrypto: "SQL FUNCTIONS = If any of arguments are NULL they return NULL. digest(data::bytea, type::text)::bytea Type is here the algorithm

Re: [GENERAL] MD5 for PostgreSQL 7.3.4

2004-11-03 Thread Tk421
uot; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, November 03, 2004 5:49 PM Subject: Re: [GENERAL] MD5 for PostgreSQL 7.3.4 > Tk421 wrote: > > I'm looking for a function that returns a md5 encryption for > > postgreSQL 7.3.4 > > > > I've f

Re: [GENERAL] MD5 for PostgreSQL 7.3.4

2004-11-03 Thread Joe Conway
Tk421 wrote: I'm looking for a function that returns a md5 encryption for postgreSQL 7.3.4 I've found that this function exists on version 7.4, but I have had problems installing it on my Windows XP with Cygwin, so I need to found it for version 7.3 See contrib/pgcrypto HTH, Joe ---

Re: [GENERAL] md5 calls

2004-06-09 Thread scott.marlowe
On Sat, 21 Feb 2004, Simon Windsor wrote: > Hi > > > > I am using the standard debian testing release of postgres(7.3.4) and was > wondering how to produce and md5 string. > > > > I had thought > > > > Select md5('joe'); > > > > Would be sufficient? Doesn't that work? It works f

Re: [GENERAL] md5 function

2003-12-18 Thread Reece Hart
On Wed, 2003-12-17 at 06:30, Jon Earle wrote: Is there a way to, when I add a record to a table, have the md5 hash computed and stored in the same table and then returned to the calling program? I recommend that you write a trigger to compute the md5 and shove that into a column. There are

Re: [GENERAL] md5 function

2003-12-17 Thread Marek Lewczuk
Miso Hlavac wrote: Hello, Sorry for just stupid question, but I need use md5 function in 7.4 When I write: select md5('text'); ERROR: Function md5("unknown") does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecast

Re: [GENERAL] md5 function

2003-12-17 Thread Michael Fuhr
On Wed, Dec 17, 2003 at 09:37:07AM +, Richard Huxton wrote: > On Wednesday 17 December 2003 08:47, Miso Hlavac wrote: > > Hello, > > > > Sorry for just stupid question, but I need use md5 function in 7.4 > > When I write: > > select md5('text'); > > ERROR: Function md5("unknown") does not exis

Re: [GENERAL] md5 function

2003-12-17 Thread Richard Huxton
On Wednesday 17 December 2003 08:47, Miso Hlavac wrote: > Hello, > > Sorry for just stupid question, but I need use md5 function in 7.4 > When I write: > select md5('text'); > ERROR: Function md5("unknown") does not exist > Unable to identify a function that satisfies the given argument >

Re: [GENERAL] md5 function

2003-12-17 Thread Michael Fuhr
On Wed, Dec 17, 2003 at 09:47:01AM +0100, Miso Hlavac wrote: > Sorry for just stupid question, but I need use md5 function in 7.4 > When I write: > select md5('text'); > ERROR: Function md5("unknown") does not exist > Unable to identify a function that satisfies the given argument types >

Re: [GENERAL] MD5 function is not available ?

2003-09-11 Thread Richard Huxton
On Thursday 11 September 2003 09:38, Marek Lewczuk wrote: > Hey, > I've searched for MD5 crypting function in PG, but I did not find it. > Anyone knows how to implement this function in PG ? Is it not in the contrib/pgcrypto directory in the source distro? Or, check the contrib package of your bi