On Tue, Oct 09, 2007 at 05:05:24PM +0300, Paul Irofti wrote:
> On Wed, Oct 03, 2007 at 06:26:48PM +0300, Paul Irofti wrote:
> > This is the postgresql odbc driver for iodbc.  Works fine for amd64 and
> > i386. 
> > 
> > pkg/DESCR:
> > The official PostgreSQL ODBC Driver
> > 
> > 
> > 
> > I've attempted to make this a multipackage for unicode but failed 
> > miserably. 
> > 
> > If anyone is willing to help me make it into a multipackage please 
> > send a patch or guide me through emails, here is what I've put extra
> > inside the Makefile for the MULTI_PACKAGES:
> > 
> > MULTI_PACKAGES=                -main   -unicode
> > COMMENT-main=  The official PostgreSQL ODBC Driver
> > COMMENT-unicode=       The official PostgreSQL ODBC Driver with unicode
> > support
> > PKGNAME-main=  postgresql-odbc-${VERSION}
> > PKGNAME-unicode=       postgresql-odbc-unicode-${VERSION}
> > CONFIGURE_ARGS+=       --with-iodbc --without-unixodbc
> > --enable-pthreads
> > .if !defined(SUBPACKAGE)
> > CONFIGURE_ARGS+=       --disable-unicode
> > .endif
> > 
> > I can build both packages separately, but when I do a `make package' 
> > there is no second configure+compile stage and the -unicode package 
> > errors out.
> 
> It seems that there's no need for two packages, the unicode enabled
> driver can handle plain ascii as well. Here is the new port, tested on
> i386 and amd64 with both unicode and ascii.

I've attached some configs that can be used in order to lighten the test
process, hope this will make submitting this port faster.

There are two database dumps (one using simple ASCII and the other UTF8)
and two config files .odbc*.ini that should be placed in $HOME.

Afterwards running iodbctest and selecting DSN=test or DSN=testw will
drop you off to an sql> cli where further testing may be done.
--
-- PostgreSQL database dump
--

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- PostgreSQL database dump complete
--

[ODBC Data Sources]
test  = postgresql
testw = postgresql

[test]
Driver      = /usr/local/lib/psqlodbcw.so
Description = Test Database
database    = test

[ODBC]
Trace         = 0
TraceAutoStop = 0
TraceFile     = sql.log

[testw]
Driver      = /usr/local/lib/psqlodbcw.so
Description = Test Unicode Database
database    = uni_test
[ODBC Drivers]
postgresql = Installed

[postgresql]
Driver = /usr/local/lib/psqlodbcw.so
Setup  = /usr/local/lib/psqlodbcw.so

[ODBC Connection Pooling]
PerfMon    = 0
Retry Wait = 
--
-- PostgreSQL database dump
--

SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';


SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: users; Type: TABLE; Schema: public; Owner: bulibuta; Tablespace: 
--

CREATE TABLE users (
    id integer NOT NULL,
    address character(120),
    name character(50)
);


ALTER TABLE public.users OWNER TO bulibuta;

--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: bulibuta
--

CREATE SEQUENCE users_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.users_id_seq OWNER TO bulibuta;

--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bulibuta
--

ALTER SEQUENCE users_id_seq OWNED BY users.id;


--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: bulibuta
--

SELECT pg_catalog.setval('users_id_seq', 37, true);


--
-- Name: id; Type: DEFAULT; Schema: public; Owner: bulibuta
--

ALTER TABLE users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);


--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: bulibuta
--


--
-- Name: unique id; Type: CONSTRAINT; Schema: public; Owner: bulibuta; 
Tablespace: 
--

ALTER TABLE ONLY users
    ADD CONSTRAINT "unique id" PRIMARY KEY (id);


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- PostgreSQL database dump complete
--

Reply via email to