From: Alexey Verkhovsky Date: 2004-10-23T21:04:45+09:00 Subject: Problem with Ruby-Postgres querying database schema This query is supposed to tell me the default value of a particular column: activerecord_unittest=> SELECT column_name, column_default FROM information_schema.columns WHERE table_name = 'defaults' AND column_name = 'char1'; column_name | column_default -------------+---------------- char1 | 'Y'::bpchar (1 row) As you can see above, in Postgres console it does exactly that. However, when I run it in Ruby, it gives me nil: irb> d = @connection.query("SELECT column_name, column_default FROM information_schema.columns WHERE table_name = 'defaults' AND column_name = 'char1'") => [["char1", nil]] Best regards, Alexey Verkhovsky