pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem with ODBC in current CVS?
4+ messages / 2 participants
[nested] [flat]

* Problem with ODBC in current CVS?
@ 2000-08-28 21:17 Bruce Stephens <bruce@cenderis.demon.co.uk>
  2000-08-28 21:55 ` Re: Problem with ODBC in current CVS? Bruce Stephens <bruce@cenderis.demon.co.uk>
  2000-08-28 23:36 ` Re: Problem with ODBC in current CVS? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: Bruce Stephens @ 2000-08-28 21:17 UTC (permalink / raw)
  To: pgsql-interfaces

I've been trying to get StarOffice 5.2 working with PostgreSQL grabbed
directly from CVS, and have been having no end of problems (I'm sure I
had this working with StarOffice 5.1 months ago, but I don't remember
how, alas).  (It probably doesn't help that I don't really understand
what ODBC is doing.)

Anyway, using the iodbc driver manager and libpsqlodbc, I seem to be
getting close.  StarOffice connects but shows no tables.  From the
libpsqlodbc log file, it appears to be trying this:

select relname,usename,relhasrules from pg_class,pg_user 
        where relkind = 'r' and relname !~ '^pg_|^dd_' and
        relname !~ '^xinv[0-9]+' and
        int4out(usesysid) = int4out(relowner)order by relname

which returns no rows when I try it by hand.  These int4out's look
iffy to me.  Aren't usesysid and relowner int2?  Why does it need to
do any conversion anyway?  Why not just usesysid=relowner?  What am I
missing?



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem with ODBC in current CVS?
  2000-08-28 21:17 Problem with ODBC in current CVS? Bruce Stephens <bruce@cenderis.demon.co.uk>
@ 2000-08-28 21:55 ` Bruce Stephens <bruce@cenderis.demon.co.uk>
  2000-08-29 00:59   ` Re: Problem with ODBC in current CVS? Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Bruce Stephens @ 2000-08-28 21:55 UTC (permalink / raw)
  To: pgsql-interfaces

Bruce Stephens <bruce@cenderis.demon.co.uk> writes:

[...]

> select relname,usename,relhasrules from pg_class,pg_user 
>         where relkind = 'r' and relname !~ '^pg_|^dd_' and
>         relname !~ '^xinv[0-9]+' and
>         int4out(usesysid) = int4out(relowner)order by relname
> 
> which returns no rows when I try it by hand.  These int4out's look
> iffy to me.  Aren't usesysid and relowner int2?  Why does it need to
> do any conversion anyway?  Why not just usesysid=relowner?  What am I
> missing?

Hmm.  If I remove the int4out calls from src/interfaces/odbc/info.c,
then things work.  Is this the right thing to do, or have I got
something broken elsewhere which I should fix?

(The regressions pass, BTW, and I'm using a pretty generic box: Debian
unstable, i386, gcc-2.95.2.)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem with ODBC in current CVS?
  2000-08-28 21:17 Problem with ODBC in current CVS? Bruce Stephens <bruce@cenderis.demon.co.uk>
  2000-08-28 21:55 ` Re: Problem with ODBC in current CVS? Bruce Stephens <bruce@cenderis.demon.co.uk>
@ 2000-08-29 00:59   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2000-08-29 00:59 UTC (permalink / raw)
  To: Bruce Stephens <bruce@cenderis.demon.co.uk>; +Cc: pgsql-interfaces

Bruce Stephens <bruce@cenderis.demon.co.uk> writes:
> Hmm.  If I remove the int4out calls from src/interfaces/odbc/info.c,
> then things work.

I thought so.  Fix applied to CVS...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem with ODBC in current CVS?
  2000-08-28 21:17 Problem with ODBC in current CVS? Bruce Stephens <bruce@cenderis.demon.co.uk>
@ 2000-08-28 23:36 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2000-08-28 23:36 UTC (permalink / raw)
  To: Bruce Stephens <bruce@cenderis.demon.co.uk>; +Cc: pgsql-interfaces

Bruce Stephens <bruce@cenderis.demon.co.uk> writes:
> select relname,usename,relhasrules from pg_class,pg_user 
>         where relkind = 'r' and relname !~ '^pg_|^dd_' and
>         relname !~ '^xinv[0-9]+' and
>         int4out(usesysid) = int4out(relowner)order by relname

> which returns no rows when I try it by hand.  These int4out's look
> iffy to me.

They're pretty bogus all right.  I think usesysid=relowner should
work fine.  Try making the appropriate change in
src/interfaces/odbc/info.c and let us know how it goes...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2000-08-29 00:59 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-08-28 21:17 Problem with ODBC in current CVS? Bruce Stephens <bruce@cenderis.demon.co.uk>
2000-08-28 21:55 ` Bruce Stephens <bruce@cenderis.demon.co.uk>
2000-08-29 00:59   ` Tom Lane <tgl@sss.pgh.pa.us>
2000-08-28 23:36 ` Tom Lane <tgl@sss.pgh.pa.us>

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