Hi Christian,
Christian Holm Christensen <cholm_at_nbi.dk> writes:
> On Sat, 2006-07-15 at 12:14 -0230, Roger Mason wrote:
>> Hello,
>>
>> Does anyone have an example of how to connect to a PostgreSQL
>> database from root?
>>
>> I have seen the examples in the tutorials but they are for MySQL and
>> Oracle.
>
> The SQL database interface of ROOT uses the plug-in architecture.
> Hence, if you have the appropriate plug-in and setting in your rootrc
> file, all you need to do is
I'm not sure what you mean here. Could you expand?
> TSQLServer* dbms = TSQLServer::Connect("<dbms>://<host>[:port][/<database>]");
>
> In your case, using PostgreSQL you need to specify `pgsql' for `<dbms>', that is
>
> TSQLServer* dbms = TSQLServer::Connect("pgsql://127.0.0.1/test");
>
Notwithstanding my comment above, this works. I thought I'd tried pgsql://... before posting.
Thanks,
Roger Received on Tue Jul 18 2006 - 14:16:38 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET