pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedODBC and configure
6+ messages / 3 participants
[nested] [flat]
* ODBC and configure
@ 2010-07-27 06:48 Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 08:06 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
0 siblings, 1 reply; 6+ messages in thread
From: Ravi Katkar @ 2010-07-27 06:48 UTC (permalink / raw)
To: 'pgsql-general@postgresql.org' <pgsql-general@postgresql.org>; 'pgsql-odbc@postgresql.org' <'pgsql-odbc@postgresql.org'>
Hi List,
I have installed ODBC and configure the same in RHEL 4.4.
Configured the ODBC in the following way:
[ODBC Data Sources]
testPSQL = PostgreSQL Test
[testPSQL]
Driver=/usr/lib/psqlodbc.so
Description=Sample PostgreSQL DSN
DSN=testPSQL
SERVER=xhost+localhost
Username=postgres
Database=rtdb
ReadOnly=No
Servertype=postgres
Port=5432
FetchBufferSize=99
ServerOptions=
ConnectOptions=
Options=
ReadOnlyi=no
Trace=1
TraceFile=/home/postgres/odbc.trace
Debug=1
DebugFile = /home/postgres/odbc.debug
CommLog = 1
[Default]
Driver = /usr/lib/psqlodbc.so
Description = PostgreSQL Data Source
SERVER=localhost
Port=5432
UserName=postgres
Password=postgres
;Socket=4096
;end odbc.ini
[ODBC]
InstallDir = /usr/lib/libiodbc.so
#=============================================================================#
Steps that I followed to test the ODBC is :
1. Downloaded the "odbctest.c" file from website and copied into unix machine
2. Compile and run the file
Problem:
While running odbctest testPSQL earlier it was working fine, but now everytime its giving the below error:
odbctest: cannot connect to X server
Please suggest if there is any solution for this. I tried with SERVER=localhost and xhost+localhost, again Severname=localhost and xhost+localhost nothing is working after re-compiling and running the .c file.
Thanks,
Ravi Katkar
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: ODBC and configure
2010-07-27 06:48 ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
@ 2010-07-27 08:06 ` Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 10:23 ` Re: ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
0 siblings, 1 reply; 6+ messages in thread
From: Craig Ringer @ 2010-07-27 08:06 UTC (permalink / raw)
To: Ravi Katkar <Ravi.Katkar@infor.com>; +Cc: pgsql-odbc
On 27/07/10 14:48, Ravi Katkar wrote:
> 1. Downloaded the "odbctest.c" file from website and copied into unix machine
> 2. Compile and run the file
> Problem:
> While running odbctest testPSQL earlier it was working fine, but now everytime its giving the below error:
> odbctest: cannot connect to X server
This isn't a PostgreSQL problem.
Your 'odbctest.c' (where *did* you get that, anyway? What URL?) appears
to be using a GUI toolkit that requires an X11 graphical environment.
That's what "cannot connect to X server" refers to ; it's nothing to do
with the PostgreSQL server.
If you have an X11 server running on your local machine, connect to the
machine odbctest is on using "ssh -X" to enable ssh X11 forwarding. Then
odbctest should run over the SSH X11 tunnel.
Otherwise, compile odbctest without any GUI requirements. Without some
idea of where you got "odbctest.c" and what it is, I can't really help
you with that.
--
Craig Ringer
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: ODBC and configure
2010-07-27 06:48 ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 08:06 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
@ 2010-07-27 10:23 ` Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 11:08 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
0 siblings, 1 reply; 6+ messages in thread
From: Ravi Katkar @ 2010-07-27 10:23 UTC (permalink / raw)
To: Craig Ringer <craig@postnewspapers.com.au>; +Cc: pgsql-odbc
Odbctest.c downloaded from the below website http://wwwmath.uni-muenster.de/u/beckelu/DB0506/ODBC/
Please refer if I can get the same .c file from other location.
Its not using GUI toolkit .
-----Original Message-----
From: Craig Ringer [mailto:craig@postnewspapers.com.au]
Sent: Tuesday, July 27, 2010 1:37 PM
To: Ravi Katkar
Cc: 'pgsql-odbc@postgresql.org'
Subject: Re: [ODBC] ODBC and configure
On 27/07/10 14:48, Ravi Katkar wrote:
> 1. Downloaded the "odbctest.c" file from website and copied into unix machine
> 2. Compile and run the file
> Problem:
> While running odbctest testPSQL earlier it was working fine, but now everytime its giving the below error:
> odbctest: cannot connect to X server
This isn't a PostgreSQL problem.
Your 'odbctest.c' (where *did* you get that, anyway? What URL?) appears
to be using a GUI toolkit that requires an X11 graphical environment.
That's what "cannot connect to X server" refers to ; it's nothing to do
with the PostgreSQL server.
If you have an X11 server running on your local machine, connect to the
machine odbctest is on using "ssh -X" to enable ssh X11 forwarding. Then
odbctest should run over the SSH X11 tunnel.
Otherwise, compile odbctest without any GUI requirements. Without some
idea of where you got "odbctest.c" and what it is, I can't really help
you with that.
--
Craig Ringer
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: ODBC and configure
2010-07-27 06:48 ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 08:06 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 10:23 ` Re: ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
@ 2010-07-27 11:08 ` Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 14:31 ` Re: ODBC and configure Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: Craig Ringer @ 2010-07-27 11:08 UTC (permalink / raw)
To: Ravi Katkar <Ravi.Katkar@infor.com>; +Cc: pgsql-odbc
On 27/07/10 18:23, Ravi Katkar wrote:
> Odbctest.c downloaded from the below website http://wwwmath.uni-muenster.de/u/beckelu/DB0506/ODBC/
> Its not using GUI toolkit .
Nope, it certainly isn't. But something seems to be trying to talk to
your X server, unless that message is somehow weirdly misleading.
Here, installing unixodbc from debian packages and compiling odbctest as:
gcc -o odbctest odbctest.c -lodbc
it runs fine with DISPLAY unset (ie with no access to an X server).
My next step in your position would be to strace the binary to see what
it's doing, use ldd to examine what it's linking to, or use LD_DEBUG to
trace what libraries it accesses. Though, of course, I'd also know how
I'd compiled it, which you didn't mention.
In any case, though, there's no sign this issue has anything to do with
PostgreSQL. I hope this sets you vaguely on the right track, but I'm not
really into ODBC at the best of times, so I think I might be about done
with my usefulness here.
--
Craig Ringer
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: ODBC and configure
2010-07-27 06:48 ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 08:06 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 10:23 ` Re: ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 11:08 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
@ 2010-07-27 14:31 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-07-28 04:53 ` Re: ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2010-07-27 14:31 UTC (permalink / raw)
To: Craig Ringer <craig@postnewspapers.com.au>; +Cc: Ravi Katkar <Ravi.Katkar@infor.com>; pgsql-odbc
Craig Ringer <craig@postnewspapers.com.au> writes:
> On 27/07/10 18:23, Ravi Katkar wrote:
>> Odbctest.c downloaded from the below website http://wwwmath.uni-muenster.de/u/beckelu/DB0506/ODBC/
>> Its not using GUI toolkit .
> Nope, it certainly isn't. But something seems to be trying to talk to
> your X server, unless that message is somehow weirdly misleading.
There's a program called odbctest in (some releases of) the unixODBC
package. I suspect Ravi is executing that, not his own program.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: ODBC and configure
2010-07-27 06:48 ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 08:06 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 10:23 ` Re: ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 11:08 ` Re: ODBC and configure Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 14:31 ` Re: ODBC and configure Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-07-28 04:53 ` Ravi Katkar <Ravi.Katkar@infor.com>
0 siblings, 0 replies; 6+ messages in thread
From: Ravi Katkar @ 2010-07-28 04:53 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Craig Ringer <craig@postnewspapers.com.au>; +Cc: pgsql-odbc
Hi Tom,
You are right I am executing odbcTest program in unix odbc package.
Regards,
Ravi Katkar
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, July 27, 2010 8:01 PM
To: Craig Ringer
Cc: Ravi Katkar; 'pgsql-odbc@postgresql.org'
Subject: Re: [ODBC] ODBC and configure
Craig Ringer <craig@postnewspapers.com.au> writes:
> On 27/07/10 18:23, Ravi Katkar wrote:
>> Odbctest.c downloaded from the below website http://wwwmath.uni-muenster.de/u/beckelu/DB0506/ODBC/
>> Its not using GUI toolkit .
> Nope, it certainly isn't. But something seems to be trying to talk to
> your X server, unless that message is somehow weirdly misleading.
There's a program called odbctest in (some releases of) the unixODBC
package. I suspect Ravi is executing that, not his own program.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2010-07-28 04:53 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-07-27 06:48 ODBC and configure Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 08:06 ` Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 10:23 ` Ravi Katkar <Ravi.Katkar@infor.com>
2010-07-27 11:08 ` Craig Ringer <craig@postnewspapers.com.au>
2010-07-27 14:31 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-07-28 04:53 ` Ravi Katkar <Ravi.Katkar@infor.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox