ODBC constructs
Hello,
Can you please let me know any mapping document which maps ODBC constructs
between sybase and postgres.
Also list of ODBC constructs to be used with postgres.
Thanks in advance!
Regards...
Hello,
My objective is to work with postgres from my linux box using C. Am not
sure whether psqlODBC or
libpq<http://www.postgresql.org/docs/9.2/static/libpq.html>should be
used.
I was playing and used libpq successfully but not sure which route to go
and whats the difference.
Also Can you please let me know any mapping document which maps ODBC
constructs between sybase and postgres.
Also list of ODBC constructs to be used with postgres.
Thanks in advance!
Regards...
<http://www.postgresql.org/docs/9.2/static/libpq.html>
p.s. Am not sure if the earlier email was sent..sorry for spam in case it
was.
Hello,
My objective is to work with postgres from my linux box using C. Am not
sure whether psqlODBC or
libpq<http://www.postgresql.org/docs/9.2/static/libpq.html>should be
used.
I was playing and used libpq successfully but not sure which route to go
and whats the difference.
Also Can you please let me know any mapping document which maps ODBC
constructs between sybase and postgres.
Also list of ODBC constructs to be used with postgres.
Thanks in advance!
Regards...
p.s. Am not sure if the earlier email was sent..sorry for spam in case it
was.
On Mon, May 20, 2013 at 5:37 PM, Dev Kumkar <devdas.kumkar@gmail.com> wrote:
Show quoted text
Hello,
My objective is to work with postgres from my linux box using C. Am not
sure whether psqlODBC or libpq<http://www.postgresql.org/docs/9.2/static/libpq.html>should be used.
I was playing and used libpq successfully but not sure which route to go
and whats the difference.Also Can you please let me know any mapping document which maps ODBC
constructs between sybase and postgres.Also list of ODBC constructs to be used with postgres.
Thanks in advance!
Regards...
<http://www.postgresql.org/docs/9.2/static/libpq.html>
p.s. Am not sure if the earlier email was sent..sorry for spam in case it
was.
Sent from my iPad
On 21-May-2013, at 6:15, Dev Kumkar <devdas.kumkar@gmail.com> wrote:
Hello,
My objective is to work with postgres from my linux box using C. Am not sure whether psqlODBC or libpq should be used.
I was playing and used libpq successfully but not sure which route to go and whats the difference.Also Can you please let me know any mapping document which maps ODBC constructs between sybase and postgres.
Also list of ODBC constructs to be used with postgres.
Thanks in advance!
Regards...
p.s. Am not sure if the earlier email was sent..sorry for spam in case it was.
On Mon, May 20, 2013 at 5:37 PM, Dev Kumkar <devdas.kumkar@gmail.com> wrote:
Hello,
My objective is to work with postgres from my linux box using C. Am not sure whether psqlODBC or libpq should be used.
I was playing and used libpq successfully but not sure which route to go and whats the difference.Also Can you please let me know any mapping document which maps ODBC constructs between sybase and postgres.
Also list of ODBC constructs to be used with postgres.
If you are looking for a client to work with with your Postgres database,then you can use psql(for command line),or use PGAdmin (http://www.pgadmin.org/).
If you are looking to connect data from your Sybase database to a Postgres database,you can have a look at the various
Foreign data wrappers Postgres has.
If you wish to work in C,then,I would suggest libpq.I would wait for more replies on this,as I have little knowledge
about psqlODBC.
Regards,
Atri
On Mon, May 20, 2013 at 9:12 PM, Atri Sharma <atri.jiit@gmail.com> wrote:
If you wish to work in C,then,I would suggest libpq.I would wait for more
replies on this,as I have little knowledge
about psqlODBC.
Thanks for the comments. Yes objective is to work in C and found libpq
useful but am not sure about psqlODBC.
It would be really great to get comments from community here regarding
comparison between both of them and also performance perspective. Based on
my reading so far libpq is good from performance perspective.
Regards...
On 5/20/2013 10:11 PM, Dev Kumkar wrote:
On Mon, May 20, 2013 at 9:12 PM, Atri Sharma <atri.jiit@gmail.com
<mailto:atri.jiit@gmail.com>> wrote:If you wish to work in C,then,I would suggest libpq.I would wait
for more replies on this,as I have little knowledge
about psqlODBC.Thanks for the comments. Yes objective is to work in C and found libpq
useful but am not sure about psqlODBC.
It would be really great to get comments from community here regarding
comparison between both of them and also performance perspective.
Based on my reading so far libpq is good from performance perspective.
libpq lets you talk directly to postgres in its native tongue.
ODBC implements a sort of abstraction. IMHO, its like trying to type
with mittens on.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
Sent from my iPad
On 21-May-2013, at 11:24, John R Pierce <pierce@hogranch.com> wrote:
libpq lets you talk directly to postgres in its native tongue.
ODBC implements a sort of abstraction. IMHO, its like trying to type with mittens on.
Also,I see no point in working using ODBC with Postgres if you want to work in C,when libpq is
available.IMHO,it is like adding an extra layer without any purpose,or I may be wrong here.
Also,is it only me,or are we all a bit wary of ODBC? I think JDBC is becoming the standard now(of course,its Java,but as I said, you should use libpq if you want to write native code for Postgres).
Regards,
Atri
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 5/20/2013 11:04 PM, Atri Sharma wrote:
Also,is it only me,or are we all a bit wary of ODBC?
its clumsy. getting software working well with it requires more
work. its promise of portability only holds true if you restrict
yourself to SQL that works the same on different servers, and if you do
that, odds are you'll be optimal on none of them.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 5/21/2013 1:11 AM, Dev Kumkar wrote:
Thanks for the comments. Yes objective is to work in C and found libpq
useful but am not sure about psqlODBC.
It would be really great to get comments from community here regarding
comparison between both of them and also performance perspective. Based
on my reading so far libpq is good from performance perspective.
One advantage of an abstraction layer is that it allows you to switch
the underlying DBMS with few if any changes to your code. ODBC is just
one of many available abstraction layers. So, one thing to consider is
if your application is intended to be at all generic, or if it is
specifically targeted to PostgreSQL. If the former, then you should
consider an abstraction layer; if not, then libpq is fine.
Another determinant for many people is what they already know. If I'm
doing a quick, one-time app and I know ODBC but I don't know libpq, I
might choose to just stick with what I know and use ODBC.
So, really, the first decision you should make is how general you want
your app to be, and how long you expect to use it. Other decisions flow
from there.
--
Guy Rouillier
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 21.05.2013 08:11, Dev Kumkar wrote:
On Mon, May 20, 2013 at 9:12 PM, Atri Sharma<atri.jiit@gmail.com> wrote:
If you wish to work in C,then,I would suggest libpq.I would wait for more
replies on this,as I have little knowledge
about psqlODBC.Thanks for the comments. Yes objective is to work in C and found libpq
useful but am not sure about psqlODBC.
It would be really great to get comments from community here regarding
comparison between both of them and also performance perspective. Based on
my reading so far libpq is good from performance perspective.
libpq is generally-speaking better than psqlodbc. The advantage of ODBC
is that if you have a suitable driver, you can connect to other DBMS' as
well, while libpq will only work with PostgreSQL. Unless you need such
portability, go with libpq.
- Heikki
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Mon, May 20, 2013 at 11:32 PM, Heikki Linnakangas <
hlinnakangas@vmware.com> wrote:
libpq is generally-speaking better than psqlodbc. The advantage of ODBC is
that if you have a suitable driver, you can connect to other DBMS' as well,
while libpq will only work with PostgreSQL. Unless you need such
portability, go with libpq.
Thanks everyone for sharing comments, really useful ones. Yes the
requirement is not connecting to other DBMS but only Postgres and libpq is
the correct way so far from comments here. Regarding libpq performance
wanted to discuss about connection polling like pgpool but I think a
separate post of performance will make sense.
So, coming back to the original question actually I am exploring on both
fronts here - libpq and psqlODBC.
Just one thought here, there is an existing ODBC business logic code which
is talking to sybase database and now same code need to be ported to talk
to postgres, then in this case will the use of psqlODBC quick way?
Otherwise porting of ODBC business logic to libpq constructs needs to be
done.
Regards...
On 5/21/2013 11:58 AM, Dev Kumkar wrote:
Thanks everyone for sharing comments, really useful ones. Yes the
requirement is not connecting to other DBMS but only Postgres and
libpq is the correct way so far from comments here. Regarding libpq
performance wanted to discuss about connection polling like pgpool but
I think a separate post of performance will make sense.
for pooling, check out pgbouncer. IMHO its a better basic pooler than
pg_pool.
So, coming back to the original question actually I am exploring on
both fronts here - libpq and psqlODBC.
Just one thought here, there is an existing ODBC business logic code
which is talking to sybase database and now same code need to be
ported to talk to postgres, then in this case will the use of psqlODBC
quick way? Otherwise porting of ODBC business logic to libpq
constructs needs to be done.
thats the perfect use case for ODBC. you'll probably still need to
rework some of your SQL if you did stuff thats Sybase specific, but
thats a lot less hassle than rewriting all the API calls.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
On Tue, May 21, 2013 at 12:16 PM, John R Pierce <pierce@hogranch.com> wrote:
for pooling, check out pgbouncer. IMHO its a better basic pooler than
pg_pool.
Sure, looks like its more light weight. And I hope, its not related to the
decision between libpq and psqlODBC. And will work with both?
thats the perfect use case for ODBC. you'll probably still need to
rework some of your SQL if you did stuff thats Sybase specific, but thats a
lot less hassle than rewriting all the API calls.
Yeah, hope you got my confusion and inclination now.
Well to work with psqlODBC, will I need to recompile the psqlODBC binary
and any additional stuff to get ODBC working?
http://www.postgresql.org/ftp/odbc/versions/src/ has sources for windows or
am I missing something here?
Regards...
On 5/21/2013 3:32 PM, Dev Kumkar wrote:
Well to work with psqlODBC, will I need to recompile the psqlODBC binary
and any additional stuff to get ODBC working?
No, you don't need to recompile any libraries. You just use them.
--
Guy Rouillier
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Tue, May 21, 2013 at 12:32 PM, Dev Kumkar <devdas.kumkar@gmail.com>wrote:
On Tue, May 21, 2013 at 12:16 PM, John R Pierce <pierce@hogranch.com>wrote:
for pooling, check out pgbouncer. IMHO its a better basic pooler than
pg_pool.
Sure, looks like its more light weight. And I hope, its not related to the
decision between libpq and psqlODBC. And will work with both?thats the perfect use case for ODBC. you'll probably still need to
rework some of your SQL if you did stuff thats Sybase specific, but thats a
lot less hassle than rewriting all the API calls.Yeah, hope you got my confusion and inclination now.
Well to work with psqlODBC, will I need to recompile the psqlODBC binary
and any additional stuff to get ODBC working?
http://www.postgresql.org/ftp/odbc/versions/src/ has sources for windows
or am I missing something here* for linux? If Windows, then I think its
just download and run the distribution. And for linux are those the same
archives listed in link?
*
Regards...
Edited: Added some more text related to installing psqlODBC driver.
On Tue, May 21, 2013 at 12:35 PM, Guy Rouillier <guy.rouillier@gmail.com>wrote:
On 5/21/2013 3:32 PM, Dev Kumkar wrote:
Well to work with psqlODBC, will I need to recompile the psqlODBC binary
and any additional stuff to get ODBC working?No, you don't need to recompile any libraries. You just use them.
Ah I think our emails crossed.
http://www.postgresql.org/ftp/odbc/versions/src/ has sources for windows or
am I missing something here* *for linux? If Windows, then I think its just
download and run the distribution.
But for linux are those the same archives listed in link and then recompile
is the only option?
Regards...
[snip]
Yeah, hope you got my confusion and inclination now.
Well to work with psqlODBC, will I need to recompile the psqlODBC binary and any additional stuff to get ODBC working?
http://www.postgresql.org/ftp/odbc/versions/src/ has sources for windows or am I missing something here?
Regards...
Just install the driver and use it. You don't have to build the driver. It is already built for you. Look here if you need Solaris or BSD:
http://www.postgresql.org/download/
Or go directly here for Mac, Windows or Linux:
http://www.enterprisedb.com/products-services-training/pgdownload#windows
and click on the link that is right for your operating system.
<<
On Tue, May 21, 2013 at 12:45 PM, Dann Corbit <DCorbit@connx.com> wrote:
Just install the driver and use it. You don’t have to build the driver.
It is already built for you. Look here if you need Solaris or BSD:****http://www.postgresql.org/download/****
Or go directly here for Mac, Windows or Linux:****
http://www.enterprisedb.com/products-services-training/pgdownload#windows*
***and click on the link that is right for your operating system.****
<<** **
I already have installed this on Linux from above link some days back but
not able to find library. Can you point me to the same?
Also this link says to compile if its non-windows -
http://psqlodbc.projects.pgfoundry.org/faq.html#1.2 Check 1.3
Can you point me to samples out there?
Regards...