[GENERAL] update data in different database

2004-10-27 Thread Henriksen, Jonas F
Hi, is it possible to write a trigger, using pl/pgSQL, that updates tables in a different database than the one the trigger is called from? If it is, what is the syntax for calling the other database? My to databases are on the same server. Regards Jonas:)) ---(end o

[GENERAL] about permissions...

2004-10-13 Thread Henriksen, Jonas F
Hi, how come, if you create a user with no permissions at all, having been granted nothing, he can still log into any database, list available tables, create new here, and then delete them again. Seems odd...: medusa:~% createuser odd Shall the new user be allowed to create databases? (y/n) n

Re: [GENERAL] checksum

2004-10-01 Thread Henriksen, Jonas F
Hi, not sure I quite understand, but could you not just concatenate all the fields and test on that? like: select test1, test2, test3 from testtable where test1 || test2 || test3 = 'whateveryouwanttotest' you might have to do some typecasting/conversion on data types other than strings... r

[GENERAL] How to debug pl/pgSQL -script?

2004-10-01 Thread Henriksen, Jonas F
Hi, I'm writing some simple triggers and functions for a postgres database, and I'm wondering how to go about to debug a pl/pgSQL-script. Is there a way to echo variable-content to screen, or to file? Or is there other, more advanced ways of debugging such scripts? regards Jonas:)) -