Re: [SQL] How to store a password encripted in a user defined table

2007-03-01 Thread Andrej Ricnik-Bay
On 3/1/07, Eugenio Flores [EMAIL PROTECTED] wrote: Hello, I wonder if somebody knows how to store passwords in a column that is part of a user defined table. Assuming that your passwords are application specific use a sha1 or md5 algorithm (depending on how sensitive your data is) and store

Re: [SQL] How to store a password encripted in a user defined table

2007-03-01 Thread Eugenio Flores
Thanks Andrej. But how can I use such algoritms in postgresql? arey they defined in a function that I can call? Or, do I have to code one of those algorithm to use it in my application? - Mensaje original De: Andrej Ricnik-Bay [EMAIL PROTECTED] Para: Eugenio Flores [EMAIL PROTECTED];

Re: [SQL] How to union table without union statement?

2007-03-01 Thread Shane Ambler
calendarw wrote: Hi, I am using the following query now, but the time is too slow. could anyone can help me? CREATE OR REPLACE VIEW alllogview AS ((( SELECT alarmdtl.tagname, a_alarmtbl.occurtime, a_alarmtbl.restoretime, a_alarmtbl.ack, alarmdtl.alarmtype, alarmdtl.alarmmsg1,

Re: [SQL] How to store a password encripted in a user defined table

2007-03-01 Thread Shane Ambler
Andrej Ricnik-Bay wrote: On 3/1/07, Eugenio Flores [EMAIL PROTECTED] wrote: Hello, I wonder if somebody knows how to store passwords in a column that is part of a user defined table. Assuming that your passwords are application specific use a sha1 or md5 algorithm (depending on how sensitive

Re: [SQL] How to store a password encripted in a user defined table

2007-03-01 Thread John DeSoi
MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to hash passwords. For example: select md5('this is my password'); md5 -- 210d53992dff432ec1b1a9698af9da16 (1 row) On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: Thanks

Re: [SQL] How to store a password encripted in a user definedtable

2007-03-01 Thread Bart Degryse
Maybe a little example - create a table with two columns: username and password (eg. tbl_users) - in a secure environment (thus not over the internet) insert records into the table INSERT INTO tbl_users(username, password) VALUES ('John', md5('johnspassword')) - make a website with a login

Re: [SQL] How to store a password encripted in a user defined table

2007-03-01 Thread Ezequias Rodrigues da Rocha
John, That was what I was looking for for a long time. Now I will change my teller password account to md5. Could someone suggest me how to change all passwords (PLAIN) to md5 ? My real best regards Ezequias 2007/3/1, John DeSoi [EMAIL PROTECTED]: MD5 is built-in to PostgreSQL. It is what

Re: [SQL] How to store a password encripted in a user definedtable

2007-03-01 Thread Bart Degryse
update yourtable set passwordfield = md5(passwordfield) watch out: md5 is irreversable! you can't un_md5 Ezequias Rodrigues da Rocha [EMAIL PROTECTED] 2007-03-01 15:08 John, That was what I was looking for for a long time. Now I will change my teller password account to md5. Could someone

Re: [SQL] How to store a password encripted in a user definedtable

2007-03-01 Thread Ezequias Rodrigues da Rocha
I know it. Thank you so much. Ezequias Grettings from Brazil. 2007/3/1, Bart Degryse [EMAIL PROTECTED]: update yourtable set passwordfield = md5(passwordfield) watch out: md5 is irreversable! you can't un_md5 Ezequias Rodrigues da Rocha [EMAIL PROTECTED] 2007-03-01 15:08 John, That

Re: [SQL] How to store a password encripted in a user definedtable

2007-03-01 Thread Ezequias Rodrigues da Rocha
Just another thing. Why md5 function return a different string from user role of postgresql ? It allways put an md5 string concated with another sequence of string. Why does it occurs ? Ezequias 2007/3/1, Ezequias Rodrigues da Rocha [EMAIL PROTECTED]: I know it. Thank you so much. Ezequias

Re: [SQL] How to store a password encripted in a userdefinedtable

2007-03-01 Thread Bart Degryse
It doesn't do that for me. I've tried it on three different databases (of two different versions) as three different users and the result is always the same (as it should be): select USER, md5('password') current_usermd5 bigdbuser 5f4dcc3b5aa765d61d8327deb882cf99 current_user

Re: [SQL] pg_dump inquiry

2007-03-01 Thread Osvaldo Rosario Kussama
Karthikeyan Sundaram escreveu: Hi, I have to dump only 10 tables out of 100 tables. In the pg_dump utility given by postgres there is an option called -t followed by table name. In that option, if I give more than 1 table, it's not accepting. How can I get the dump in one stroke

Re: [SQL] pg_dump inquiry

2007-03-01 Thread Joe
On Thu, 2007-03-01 at 12:30 -0300, Osvaldo Rosario Kussama wrote: http://www.postgresql.org/docs/8.2/interactive/app-pgdump.html Multiple tables can be selected by writing multiple -t switches. Also, the table parameter is interpreted as a pattern according to the same rules used by psql's

Re: [SQL] How to store a password encripted in a userdefinedtable

2007-03-01 Thread Ezequias Rodrigues da Rocha
I am just passing the database owner password (postgresql autentication) to the statement: Select md5('the password I have in my mind') and compare with the password pgAdmin3 shows me. They are completely different. Ezequias 2007/3/1, Bart Degryse [EMAIL PROTECTED]: It doesn't do that for

Re: [SQL] How to store a password encripted in a userdefinedtable

2007-03-01 Thread Shane Ambler
Ezequias Rodrigues da Rocha wrote: I am just passing the database owner password (postgresql autentication) to the statement: Select md5('the password I have in my mind') and compare with the password pgAdmin3 shows me. They are completely different. Try SELECT 'md5'||md5('the password I

Re: [SQL] How to store a password encripted in a userdefinedtable

2007-03-01 Thread Adrian Klaver
On Thursday 01 March 2007 8:53 am, Ezequias Rodrigues da Rocha wrote: I am just passing the database owner password (postgresql autentication) to the statement: Select md5('the password I have in my mind') and compare with the password pgAdmin3 shows me. They are completely different.

Re: [SQL] How to store a password encripted in a userdefinedtable

2007-03-01 Thread Ezequias Rodrigues da Rocha
Perfect ! That's it. Another information I doesn't have. Great to be part of this list. Thank you Adrian 2007/3/1, Adrian Klaver [EMAIL PROTECTED]: On Thursday 01 March 2007 8:53 am, Ezequias Rodrigues da Rocha wrote: I am just passing the database owner password (postgresql autentication)

Re: [SQL] How to store a password encripted in a user defined table

2007-03-01 Thread Eugenio Flores
Thanks for your anwers. They have been very useful. Thanks again. - Mensaje original De: John DeSoi [EMAIL PROTECTED] Para: Eugenio Flores [EMAIL PROTECTED] CC: Andrej Ricnik-Bay [EMAIL PROTECTED]; PostgreSQL pgsql-sql@postgresql.org Enviado: jueves, 1 de marzo, 2007 5:25:28 Asunto:

Re: [SQL] [ADMIN] pg_dump error

2007-03-01 Thread Tom Lane
Karthikeyan Sundaram [EMAIL PROTECTED] writes: Thanks for your reply. No, I recently installed (fresh installation) from scratch. Well, your pg_dump seems to be finding an older version of libpq.so from somewhere. Check for a pre-existing postgresql package.