Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50368 - psqlodbc driver for Postgresql
Summary: psqlodbc driver for Postgresql
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PgSQL Bugs
URL: http://gborg.postgresql.org/project/p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-07 08:58 UTC by Michele Alzetta
Modified: 2012-11-28 21:09 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for psqlodbc-08.00.0101 (psqlodbc-08.00.0101.ebuild,1.51 KB, text/plain)
2005-03-23 04:11 UTC, Serhij S. Stasyuk
Details
psqlodbc-08.00.0101.ebuild (psqlodbc-08.00.0101.ebuild,1.04 KB, text/plain)
2005-03-23 08:07 UTC, MATSUU Takuto (RETIRED)
Details
psqlodbc-08.02.0002.ebuild (psqlodbc-08.02.0002.ebuild,1.04 KB, text/plain)
2006-06-12 19:42 UTC, Goran Mekić
Details
Updated HOMEPAGE, LICENSE, and version bump (psqlodbc-08.02.0500.ebuild,1.02 KB, text/plain)
2008-04-29 20:46 UTC, Charles Stewart
Details
Updated psqlODBC ebuild (psqlodbc-08.04.0200.ebuild,1004 bytes, text/plain)
2010-06-01 04:01 UTC, Aaron W. Swenson
Details
Fixed version dependencies (psqlodbc-08.04.0200.ebuild,1009 bytes, text/plain)
2010-07-02 07:51 UTC, Guillaume BINET
Details
Build log error with unixODBC 2.3 (build.log,78.77 KB, text/plain)
2010-09-08 10:41 UTC, Kilburn Abrahams
Details
8.04.200 with patch for recent unixodbc (psqlodbc-08.04.0200.ebuild,1.04 KB, text/plain)
2010-10-11 14:59 UTC, Thomas J. Moore
Details
Postgresql 9 (psqlodbc-09.00.0100.ebuild,1.03 KB, text/plain)
2010-10-13 18:24 UTC, Timo Lindemann
Details
09.00.0100 build failure (build_output.log,71.47 KB, text/plain)
2010-12-16 15:56 UTC, Aaron Burnett
Details
psqlodbc-09.00.0200.ebuild (psqlodbc-09.00.0200.ebuild,863 bytes, text/plain)
2011-04-16 23:15 UTC, Aaron W. Swenson
Details
psqlodbc-09.00.0310.ebuild (psqlodbc-09.00.0310.ebuild,887 bytes, text/plain)
2011-11-13 20:39 UTC, Aaron W. Swenson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Alzetta 2004-05-07 08:58:35 UTC
The official ODBC driver for PostgreSQL ....

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Serhij S. Stasyuk 2005-03-23 04:11:26 UTC
Created attachment 54221 [details]
ebuild for psqlodbc-08.00.0101

Maybe it would be useful to create src_config section to this ebuild
Comment 2 MATSUU Takuto (RETIRED) gentoo-dev 2005-03-23 08:07:22 UTC
Created attachment 54248 [details]
psqlodbc-08.00.0101.ebuild
Comment 3 MATSUU Takuto (RETIRED) gentoo-dev 2005-03-23 14:17:35 UTC
I don't know what apps need psqlodbc on unix.
Comment 4 Serhij S. Stasyuk 2005-03-24 02:59:29 UTC
ODBC is the only one way to connect DBDesigner (dev-db/dbdesigner) to PostgreSQL db :(

But I can't setup ODBC DSN for PostgreSQL neither with unixODBC, nor with iodbc :(

If anybody sets this up, please write some kind of a guide
Comment 5 Damon Smith 2005-04-04 20:59:39 UTC
why does this install as /usr/lib/psqlodbc.* instead of libpsqlodbc.* ?  I need it to compile an app called Storage Resource Broker (SRB) and it's trying to compile with -lpsqlodbc.

Also, does anyone know if unixODBC and iodbc are mutually exclusive?  How do they relate to each other?
Comment 6 Daniel Plaza 2005-09-21 03:50:45 UTC
  Version 08.00.0102 is available. Renaming the ebuild to
psqlodb-08.00.0102.ebuild works for me.
Comment 7 david somers 2006-01-09 08:36:34 UTC
New version available.

Rename the ebuild to psqlodbc-08.01.0102.ebuild.

Also, in the ebuild change HOMEPAGE to "http://pgfoundry.org/projects/psqlodbc/"
Comment 8 david somers 2006-01-20 09:38:53 UTC
(In reply to comment #5)
> Also, does anyone know if unixODBC and iodbc are mutually exclusive?

Yes, they are mutually exclusive. 





Comment 9 david somers 2006-02-06 11:11:33 UTC
Another new build available.

Simply rename the ebuild to dev-db/psqlodbc-08.01.0200.ebuild
Also, in the ebuild ensure that HOMEPAGE is set to
"http://pgfoundry.org/projects/psqlodbc/"
Comment 10 Goran Mekić 2006-06-12 19:42:52 UTC
Created attachment 89015 [details]
psqlodbc-08.02.0002.ebuild

Just changed the version of .ebuild. There is a lot of testing left to do!!!
Comment 11 david somers 2006-06-13 02:33:13 UTC
(In reply to comment #10)
> Just changed the version of .ebuild. There is a lot of testing left to do!!!

If only the version number of the ebuild changes, there is no need to upload a new ebuild... just tell people it needs to be renamed (c.f. comment #6, comment #7, comment #9).
Comment 12 Giampaolo Tomassoni 2007-06-03 13:35:45 UTC
Dears,

how's going with this package?

I would urge to put this in the "main branch", since even openldap needs it in order to use postgresql as a backend.
Comment 13 Charles Stewart 2008-04-18 16:35:24 UTC
*Ping*

Any word on this making it into the main portage branch?  This is the official PostgreSQL ODBC driver, and the one included with unixODBC is no longer maintained due to this fact.
Comment 14 Charles Stewart 2008-04-29 20:46:55 UTC
Created attachment 151366 [details]
Updated HOMEPAGE, LICENSE, and version bump

Version bump to latest.
Updated HOMEPAGE to "http://pgfoundry.org/projects/psqlodbc/"
Updated LICENSE to "LGPL-2"
Comment 15 Tolga Dalman 2009-04-08 08:28:05 UTC
This thread seems to have ceased, but I cannot find the Postgres ODBC driver. Any progress here, or have I missed something ?
Comment 16 Paramonov Valeriy 2010-04-06 18:05:59 UTC
(In reply to comment #15)
> This thread seems to have ceased, but I cannot find the Postgres ODBC driver.
> Any progress here, or have I missed something ?
> 

+1
Where is psqlodbc ebuild? How to force "wine->unixODBC->psqlodbc->PostgreSQL" connection to work?

Please HELP!
Comment 17 Longpoke 2010-05-26 13:15:26 UTC
Tested and working on amd64 with basic SELECT, INSERT, and UPDATE statements with the following packages:
dev-db/psqlodbc-08.02.0500
dev-db/postgresql-8.1.11
Comment 18 Aaron W. Swenson gentoo-dev 2010-05-28 10:31:53 UTC
(In reply to comment #17)
> Tested and working on amd64 with basic SELECT, INSERT, and UPDATE statements
> with the following packages:
> dev-db/psqlodbc-08.02.0500
> dev-db/postgresql-8.1.11
> 

Please upgrade to dev-db/postgresql-server and comment back on functionality with, at the very least, the 8.4.4 ebuild.
Comment 19 Aaron W. Swenson gentoo-dev 2010-06-01 04:01:49 UTC
Created attachment 233751 [details]
Updated psqlODBC ebuild

I've updated the ebuild to reflect the latest options and to adhere to EAPI3.

Builds fine on my machine, but still needed the myconf flow control because --without-iodbc behaved as if --with-iodbc had been set.
Comment 20 Guillaume BINET 2010-07-02 07:51:45 UTC
Created attachment 237221 [details]
Fixed version dependencies

Fixed version dependencies on postgresql-base and on unixODBC
Comment 21 Brett Edgar 2010-07-29 16:44:01 UTC
(In reply to comment #20)
> Created an attachment (id=237221) [details]
> Fixed version dependencies
> 
> Fixed version dependencies on postgresql-base and on unixODBC
> 

The ebuild has a dependency on <dev-db/unixODBC-2.3.0, but there is no available version of unixODBC < 2.3.0 in Portage.
Comment 22 Aaron W. Swenson gentoo-dev 2010-07-29 20:08:51 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > Created an attachment (id=237221) [details] [details]
> > Fixed version dependencies
> > 
> > Fixed version dependencies on postgresql-base and on unixODBC
> > 
> 
> The ebuild has a dependency on <dev-db/unixODBC-2.3.0, but there is no
> available version of unixODBC < 2.3.0 in Portage.
> 

Furthermore, the documentation doesn't indicate that unixODBC must be less than 2.3.0.
Comment 23 Kilburn Abrahams 2010-09-07 04:51:20 UTC
misc.h:133: note: expected 'const char *' but argument is of type 'SQLCHAR *'
odbcapi.c:1606: warning: pointer targets in assignment differ in signedness
make[1]: *** [odbcapi.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/dev-db/psqlodbc-08.04.0200/work/psqlodbc-08.04.0200'
make: *** [all] Error 2
 * ERROR: dev-db/psqlodbc-08.04.0200 failed:
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 141:  Called _eapi2_src_compile
 *     ebuild.sh, line 646:  Called die
 * The specific snippet of code:
 *              emake || die "emake failed"
 *
 * If you need support, post the output of 'emerge --info =dev-db/psqlodbc-08.04.0200',
 * the complete build log and the output of 'emerge -pqv =dev-db/psqlodbc-08.04.0200'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/dev-db/psqlodbc-08.04.0200/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/psqlodbc-08.04.0200/temp/environment'.
 * S: '/var/tmp/portage/dev-db/psqlodbc-08.04.0200/work/psqlodbc-08.04.0200'

>>> Failed to emerge dev-db/psqlodbc-08.04.0200, Log file:
Comment 24 Kilburn Abrahams 2010-09-07 05:15:36 UTC
This is with amd64, gcc 4.3 and >=unixODBC-2.3

make[1]: *** [odbcapi.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/dev-db/psqlodbc-08.04.0200/work/psqlodbc-08.04.0200'
make: *** [all] Error 2
 * ERROR: dev-db/psqlodbc-08.04.0200 failed:
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 141:  Called _eapi2_src_compile
 *     ebuild.sh, line 646:  Called die
 * The specific snippet of code:
 *              emake || die "emake failed"
 *
 * If you need support, post the output of 'emerge --info =dev-db/psqlodbc-08.04.0200',
 * the complete build log and the output of 'emerge -pqv =dev-db/psqlodbc-08.04.0200'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/dev-db/psqlodbc-08.04.0200/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/psqlodbc-08.04.0200/temp/environment'.
 * S: '/var/tmp/portage/dev-db/psqlodbc-08.04.0200/work/psqlodbc-08.04.0200'

>>> Failed to emerge dev-db/psqlodbc-08.04.0200, Log file:

Any ideas!
Comment 25 Aaron W. Swenson gentoo-dev 2010-09-07 21:43:05 UTC
(In reply to comment #24)
>  * If you need support, post the output of 'emerge --info
> =dev-db/psqlodbc-08.04.0200',
>  * the complete build log and the output of 'emerge -pqv
> =dev-db/psqlodbc-08.04.0200'.
Those lines are instructions, not suggestions. We'll have a better idea how to help you if you provide the contents of that file and those outputs.
Comment 26 Kilburn Abrahams 2010-09-08 10:41:42 UTC
Created attachment 246441 [details]
Build log error with unixODBC 2.3
Comment 27 Kilburn Abrahams 2010-09-08 10:43:00 UTC
See build.log attachement

emerge --info =dev-db/psqlodbc-08.04.0200
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.35-gentoo-r5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.35-gentoo-r5-x86_64-AMD_Sempron-tm-_Processor_3200+-with-gentoo-1.12.13
Timestamp of tree: Wed, 08 Sep 2010 05:15:03 +0000
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/freeswitch /usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 logrotate mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl postgres pppd python readline reflection samba session sse sse2 sse3 ssl sysfs tcpd unicode xml xml2 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" FREESWITCH_MODULES="lua sofia g729 lcr freetdm spandsp syslog valet_parking voicemail xml_cdr dialplan_xml console cdr_csv" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

emerge -pqv =dev-db/psqlodbc-08.04.0200
[ebuild  N    ] dev-db/psqlodbc-08.04.0200  USE="ssl unicode -doc -iodbc -threads"
Comment 28 Kilburn Abrahams 2010-09-16 12:52:03 UTC
Bump. Any ideas why the compile is failing
Comment 29 Aaron W. Swenson gentoo-dev 2010-09-17 01:28:56 UTC
(In reply to comment #28)
> Bump. Any ideas why the compile is failing
> 

What does 'eselect postgresql show-all' say?
Comment 30 Kilburn Abrahams 2010-09-17 01:30:55 UTC
eselect postgresql show-all
Utilities:  8.4
Service:    8.4
Comment 31 Aaron W. Swenson gentoo-dev 2010-09-25 14:04:57 UTC
Well, it certainly isn't compiling cleanly on my system, but it does finish.

In fact, I get all of the same warnings.
Comment 32 Kilburn Abrahams 2010-09-25 21:26:56 UTC
Was that on a 64 bit platform. I had to add ~amd64. 32bit builds fine with same errors but not 64bit.
Comment 33 Aaron W. Swenson gentoo-dev 2010-09-26 01:06:37 UTC
I only have access to 32 bit systems.
Comment 34 Thomas J. Moore 2010-10-11 14:59:56 UTC
Created attachment 250233 [details]
8.04.200 with patch for recent unixodbc

This fixes a 64-bit build error with post-2.2 unixODBC (old version not available any more, so no version check).  Built with unixODBC and iodbc on amd64 (and with multilib support added, 32-bit, so it does not break anything).
Comment 35 Guillaume BINET 2010-10-11 21:31:11 UTC
(In reply to comment #34)
> This fixes a 64-bit build error with post-2.2 unixODBC 

Indeed ! well done it finally fixes the problem that led me to put the dependency on the old one.

BTW I think you forgot to remove it from your ebuild, it should be : 

DEPEND="dev-db/postgresql-base:8.4
                iodbc? ( dev-db/libiodbc )
                !iodbc? ( dev-db/unixODBC )
                ssl? ( dev-libs/openssl )"

If I am not mistaken.
Thanks again.
Comment 36 Timo Lindemann 2010-10-13 18:24:37 UTC
Created attachment 250473 [details]
Postgresql 9

This ebuild works for me (builds the postgresql-odbc driver for unixodbc 2.3 and postgres 9. 

maybe someone else can put it to use, too. Doesn't do version checking though.
Comment 37 Aaron Burnett 2010-12-16 15:56:43 UTC
Created attachment 257330 [details]
09.00.0100 build failure
Comment 38 Aaron Burnett 2010-12-16 15:57:52 UTC
Comment on attachment 257330 [details]
09.00.0100 build failure

The newest ebuild failed to build for me.  I attached a portion of the build failure.
Comment 39 Aaron W. Swenson gentoo-dev 2011-04-16 23:15:14 UTC
Created attachment 270231 [details]
psqlodbc-09.00.0200.ebuild

Latest release. I just need to find some software to test this against now.
Comment 40 Giampaolo Tomassoni 2011-04-17 09:24:34 UTC
(In reply to comment #39)
> I just need to find some software to test this against now.

What about net-nds/openldap ?

If I'm recalling right, turning on the odbc use flag in openldap, it should allow using postgresql as a ldap backend via openodbc.
Comment 41 Aaron W. Swenson gentoo-dev 2011-11-13 20:39:58 UTC
Created attachment 292433 [details]
psqlodbc-09.00.0310.ebuild

Updated.

If this works well enough I'll commit it to the tree.
Comment 42 Mark Wright gentoo-dev 2012-11-15 11:45:10 UTC
(In reply to comment #41)
Works for me on ~amd64
Comment 43 Aaron W. Swenson gentoo-dev 2012-11-28 21:09:15 UTC
*psqlodbc-09.01.0200 (28 Nov 2012)

  28 Nov 2012; <titan@gentoo.org> +psqlodbc-09.01.0200.ebuild, +metadata.xml:
  New ebuild for psqlodbc. Written by me with help from folks on bug 50368.