[GENERAL] Database level read only user

2011-07-18 Thread Hans C. Poo
Hi, Today a client ask me for help to create a read only user for a postgresql 8.2 database, i ended up reading, copying and pasting and finally creating a function i'm sharing with the list: CREATE OR REPLACE FUNCTION db_grant(usuario text, privilegio text) RETURNS INTEGER AS $$ DECLARE db R

Re: [GENERAL] Unexpected protocol character='j' during authentication..

2011-05-20 Thread Hans C. Poo
Eric, The posts in this forum must be done in english. Entiendo que los posts a este foro deben ser en inglés. May be you already did some of the next: - Test if it works connecting with same credentials from the server itself and other machine. - Raise log/debug level on server and examine the

[GENERAL] Perl script to drop duplicated constraints definitions

2011-03-29 Thread Hans C. Poo
Hi, Sorry for the recent post, mistakenly i wrote the subject in spanish... glup. Hi, Sometimes i end up with some duplicated constraints definitions in my database, i've noticed this when i reverse engineer databases, and see many links between two tables. I prepared a perl script that read

[GENERAL] Script perl para eliminar constraints duplicados

2011-03-29 Thread Hans C. Poo
Hi, Sometimes i end up with some duplicated constraints definitions in my database, i've noticed this when i reverse engineer databases, and see many links between two tables. I prepared a perl script that read an schema on standard input, and prints on standard output some drop constraints f