From: Dalibor Sramek Date: 2002-10-30T22:23:43+09:00 Subject: PostgreSQL debug tty Warning: this is likely to be more about PostgreSQL than about Ruby. In the ruby-postgres library there is a method for opening connection like this: connect(pghost, pgport, pgoptions, pgtty, dbname, login, passwd) The fourth parameter (pgtty) is supposed to determine the "tty or file" where debug messages from the PostgreSQL backend should be sent. I was trying to set the parameter to various values (ttys as wel as files) but the messages are still written to the terminal I am running ruby from. (FreeBSD 4.2, Ruby 1.6.7, ruby-postgres 0.7.0) Does anybody know how to redirect the tty? And more general problem: If I suppose that the tty can be successfuly redirected to a file: what is the best way to capture the output in the Ruby script (on Unix - I mean: can this be done without using "common" tmp file)? Thanks for any suggestions Dalibor Sramek -- Dalibor Sramek "In the eyes of cats, all things belong to cats." dali@insula.cz