pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables
6+ messages / 2 participants
[nested] [flat]

* ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables
@ 1999-06-25 14:08  Chay Wesley <chay@ci.danville.ky.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Chay Wesley @ 1999-06-25 14:08 UTC (permalink / raw)
  To: pgsql-interfaces

I've recently upgraded both pieces of software (DB, & ODBC), and since then, I can't browse tables in the DB using the ODBC driver.
For example, open Access 97, use 'Get External Data -> Link Tables -> ODBC, etc' and when the tables list comes up, it is completely empty.  This even occurs if I have selected 'Show System Tables' in the ODBC configuration.  I have appended the resultant  psqlodbc.log file to the end of this message.  As a side note, accessing the database via JDBC from within NetBeans (on the workstation) seems to work fine, as does psql on the server.

Other (possibly) relevant info:
    Workstation: NT Workstation 4.0, Service Pack 4
   Server (i386): RedHat Linux 6.0, Postgres 6.5 
 
 
Any ideas/help appreciated.
================================
Chay Wesley  (chay@ci.danville.ky.us)
Director of Financial Information Services
City of Danville, Kentucky
http://www.danville-ky.com
http://ci.danville.ky.us

 
 
 
 
psqlodbc.log :
=================================================================================================
conn=155203152, SQLDriverConnect( in)='DSN=JobShop;', fDriverCompletion=1
DSN info: DSN='JobShop',server='mis2.ci.danville.ky.us',port='5432',dbase='jobshop',user='postgres',passwd='blablabla'
          readonly='1',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0'
          conn_settings=''
          translation_dll='',translation_option=''
Global Options: Version='06.40.0006', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190
                disable_optimizer=1, ksqo=1, unique_index=0, use_declarefetch=0
                text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1
                extra_systable_prefixes='dd_;', conn_settings=''
conn=155203152, query=' '
conn=155203152, query='set DateStyle to 'ISO''
conn=155203152, query='set geqo to 'OFF''
conn=155203152, query='set ksqo to 'ON''
conn=155203152, query='select oid from pg_type where typname='lo''
    [ fetched 0 rows ]
conn=155203152, SQLDriverConnect(out)='DSN=JobShop;DATABASE=jobshop;SERVER=mis2.ci.danville.ky.us;PORT=5432;UID=postgres;PWD=blablabla;READONLY=1;PROTOCOL=6.4;FAKEOIDINDEX=0;SHOWOIDCOLUMN=0;ROWVERSIONING=0;SHOWSYSTEMTABLES=0;CONNSETTINGS='
conn=155203152, query='SELECT Config, nValue FROM MSysConf'
ERROR from backend during send_query: 'ERROR:  msysconf: Table does not exist.'
STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while executing the query'
                 ------------------------------------------------------------
                 hdbc=155203152, stmt=155254848, result=0
                 manual_result=0, prepare=0, internal=0
                 bindings=0, bindings_allocated=0
                 parameters=0, parameters_allocated=0
                 statement_type=0, statement='SELECT Config, nValue FROM MSysConf'
                 stmt_with_params='SELECT Config, nValue FROM MSysConf'
                 data_at_exec=-1, current_exec_param=-1, put_data=0
                 currTuple=-1, current_col=-1, lobj_fd=-1
                 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1
                 cursor_name='SQL_CUR09410040'
                 ----------------QResult Info -------------------------------
CONN ERROR: func=SC_execute, desc='', errnum=110, errmsg='ERROR:  msysconf: Table does not exist.'
            ------------------------------------------------------------
            henv=155197000, conn=155203152, status=1, num_stmts=16
            sock=155197016, stmts=155197064, lobj_type=-999
            ---------------- Socket Info -------------------------------
            socket=352, reverse=0, errornumber=0, errormsg='(null)'
            buffer_in=155209488, buffer_out=155213592
            buffer_filled_in=42, buffer_filled_out=0, buffer_read_in=42
conn=155203152, query='select relname, usename, relhasrules from pg_class, pg_user where relkind = 'r' and relname !~ '^xinv[0-9]+' and int4out(usesysid) = int4out(relowner)order by relname'
    [ fetched 0 rows ]
conn=155203152, SQLDisconnect
 
==============================================
End of pgsqlodbc.log.

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

* Re: [INTERFACES] ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables
@ 1999-06-25 18:36  Byron Nikolaidis <byronn@solipsys.com>
  parent: Chay Wesley <chay@ci.danville.ky.us>
  0 siblings, 2 replies; 6+ messages in thread

From: Byron Nikolaidis @ 1999-06-25 18:36 UTC (permalink / raw)
  To: Chay Wesley <chay@ci.danville.ky.us>; +Cc: pgsql-interfaces



Chay Wesley wrote:

> I've recently upgraded both pieces of software (DB, & ODBC), and since
> then, I can't browse tables in the DB using the ODBC driver.For
> example, open Access 97, use 'Get External Data -> Link Tables ->
> ODBC, etc' and when the tables list comes up, it is completely empty.
> This even occurs if I have selected 'Show System Tables' in the ODBC
> configuration.  I have appended the resultant  psqlodbc.log file to
> the end of this message.  As a side note, accessing the database via
> JDBC from within NetBeans (on the workstation) seems to work fine, as
> does psql on the server.
>  Other (possibly) relevant info:    Workstation: NT Workstation 4.0,
> Service Pack 4   Server (i386): RedHat Linux 6.0, Postgres 6.5  Any
> ideas/help appreciated.================================
> Chay Wesley  (chay@ci.danville.ky.us)
> Director of Financial Information Services
> City of Danville, Kentucky
> http://www.danville-ky.com
> http://ci.danville.ky.us    psqlodbc.log
> :=================================================================================================conn=155203152,
> SQLDriverConnect( in)='DSN=JobShop;', fDriverCompletion=1
> DSN info:
> DSN='JobShop',server='mis2.ci.danville.ky.us',port='5432',dbase='jobshop',user='postgres',passwd='blablabla'
>
>
> readonly='1',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0'
>
>           conn_settings=''
>           translation_dll='',translation_option=''
> Global Options: Version='06.40.0006', fetch=100, socket=4096,
> unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190
>                 disable_optimizer=1, ksqo=1, unique_index=0,
> use_declarefetch=0
>                 text_as_longvarchar=1, unknowns_as_longvarchar=0,
> bools_as_char=1
>                 extra_systable_prefixes='dd_;', conn_settings=''
> conn=155203152, query=' '
> conn=155203152, query='set DateStyle to 'ISO''
> conn=155203152, query='set geqo to 'OFF''
> conn=155203152, query='set ksqo to 'ON''
> conn=155203152, query='select oid from pg_type where typname='lo''
>     [ fetched 0 rows ]
> conn=155203152,
> SQLDriverConnect(out)='DSN=JobShop;DATABASE=jobshop;SERVER=mis2.ci.danville.ky.us;PORT=5432;UID=postgres;PWD=blablabla;READONLY=1;PROTOCOL=6.4;FAKEOIDINDEX=0;SHOWOIDCOLUMN=0;ROWVERSIONING=0;SHOWSYSTEMTABLES=0;CONNSETTINGS='
>
> conn=155203152, query='SELECT Config, nValue FROM MSysConf'
> ERROR from backend during send_query: 'ERROR:  msysconf: Table does
> not exist.'
> STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error
> while executing the query'
>
> ------------------------------------------------------------
>                  hdbc=155203152, stmt=155254848, result=0
>                  manual_result=0, prepare=0, internal=0
>                  bindings=0, bindings_allocated=0
>                  parameters=0, parameters_allocated=0
>                  statement_type=0, statement='SELECT Config, nValue
> FROM MSysConf'
>                  stmt_with_params='SELECT Config, nValue FROM
> MSysConf'
>                  data_at_exec=-1, current_exec_param=-1, put_data=0
>                  currTuple=-1, current_col=-1, lobj_fd=-1
>                  maxRows=0, rowset_size=1, keyset_size=0,
> cursor_type=0, scroll_concurrency=1
>                  cursor_name='SQL_CUR09410040'
>                  ----------------QResult Info
> -------------------------------
> CONN ERROR: func=SC_execute, desc='', errnum=110, errmsg='ERROR:
> msysconf: Table does not exist.'
>
> ------------------------------------------------------------
>             henv=155197000, conn=155203152, status=1, num_stmts=16
>             sock=155197016, stmts=155197064, lobj_type=-999
>             ---------------- Socket Info
> -------------------------------
>             socket=352, reverse=0, errornumber=0, errormsg='(null)'
>             buffer_in=155209488, buffer_out=155213592
>             buffer_filled_in=42, buffer_filled_out=0,
> buffer_read_in=42
> conn=155203152, query='select relname, usename, relhasrules from
> pg_class, pg_user where relkind = 'r' and relname !~ '^xinv[0-9]+' and
> int4out(usesysid) = int4out(relowner)order by relname'
>     [ fetched 0 rows ]
> conn=155203152,
> SQLDisconnect ==============================================End of
> pgsqlodbc.log.

The log shows that 0 rows are coming back.  Are you sure you have any
tables?
Try running the exact query above in the psql monitor and see what
happens.

Byron

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

* Re: [INTERFACES] ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables
@ 1999-06-25 19:05  Chay Wesley <chay@ci.danville.ky.us>
  parent: Byron Nikolaidis <byronn@solipsys.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Chay Wesley @ 1999-06-25 19:05 UTC (permalink / raw)
  To: pgsql-interfaces

If I do a 'Select * from pg_class;', I get 58 rows returned, 2 of which are names of tables that I expect to see from the ODBC end.
However, if I do a 'Select * from pg_user;', I get 0 rows returned.

How do entries make it into pg_user?  I previously ran 'createuser' from the command line, and have also 'granted' permissions on the tables.

Chay Wesley


  ----- Original Message ----- 
  From: Byron Nikolaidis 
  To: Chay Wesley 
  Cc: pgsql-interfaces@postgreSQL.org 
  Sent: Friday, June 25, 1999 2:36 PM
  Subject: Re: [INTERFACES] ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables




  The log shows that 0 rows are coming back.  Are you sure you have any tables? 
  Try running the exact query above in the psql monitor and see what happens. 

  Byron 

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

* Re: [INTERFACES] ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables
@ 1999-06-25 19:32  Chay Wesley <chay@ci.danville.ky.us>
  parent: Byron Nikolaidis <byronn@solipsys.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Chay Wesley @ 1999-06-25 19:32 UTC (permalink / raw)
  To: pgsql-interfaces

Upon further investigation:

If, in the following query that is being passed to Postgresql from the ODBC driver, the table named 'pg_user' were to be replaced the table named 'pg_shadow', then the query would work, returning 72 rows.

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


Where to go from here.....??

Perhaps I'm overlooking an ODBC configuration problem.


Chay Wesley

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

* Re: [INTERFACES] ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables
@ 1999-06-25 19:33  Byron Nikolaidis <byronn@solipsys.com>
  parent: Chay Wesley <chay@ci.danville.ky.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Byron Nikolaidis @ 1999-06-25 19:33 UTC (permalink / raw)
  To: Chay Wesley <chay@ci.danville.ky.us>; +Cc: pgsql-interfaces



Chay Wesley wrote:

> If I do a 'Select * from pg_class;', I get 58 rows returned, 2 of
> which are names of tables that I expect to see from the ODBC
> end.However, if I do a 'Select * from pg_user;', I get 0 rows
> returned. How do entries make it into pg_user?  I previously ran
> 'createuser' from the command line, and have also 'granted'
> permissions on the tables. Chay Wesley

Don't do a select * from pg_class.... Do the exact entire query that you
see in the logfile  (select relname, usename .... where relkind ....)
and see what you get.

Also, if you do a "\d" in the monitor, what do you get?

Byron

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

* Re: [INTERFACES] ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables
@ 1999-06-25 19:44  Chay Wesley <chay@ci.danville.ky.us>
  parent: Byron Nikolaidis <byronn@solipsys.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Chay Wesley @ 1999-06-25 19:44 UTC (permalink / raw)
  To: Byron Nikolaidis <byronn@solipsys.com>; +Cc: pgsql-interfaces

  jobshop=> 

  jobshop=> select relname, usename, relhasrules from pg_class, pg_user where relk
  ind = 'r' and relname !~ '^xinv[0-9]+' and int4out(usesysid) = int4out(relowner)
  order by relname;
  relname|usename|relhasrules
  -------+-------+-----------
  (0 rows)

  jobshop=>

  jobshop=> \d
  Couldn't find any tables, sequences or indices!
  jobshop=>

  jobshop=> \d joblistings   <- The name of one of my tables.

  Table    = joblistings
  +----------------------------------+----------------------------------+-------+
  |              Field               |              Type                | Length|
  +----------------------------------+----------------------------------+-------+
  | listingid                        | int4 not null default nextval('j |     4 |
  | officeid                         | int4                             |     4 |
  | posteddate                       | date                             |     4 |
  | enabled                          | bool                             |     1 |
  | description                      | text                             |   var |
  | numpositions                     | int2                             |     2 |
  | locationdescription              | text                             |   var |
  | extrahtml                        | text                             |   var |
  +----------------------------------+----------------------------------+-------+
  Index:    joblistings_listingid_key

  jobshop=> 





  Don't do a select * from pg_class.... Do the exact entire query that you see in the logfile  (select relname, usename .... where relkind ....) and see what you get. 

  Also, if you do a "\d" in the monitor, what do you get? 

  Byron 

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


end of thread, other threads:[~1999-06-25 19:44 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-25 14:08 ODBC 6.4 + PostgreSQL 6.5 = Can't browse tables Chay Wesley <chay@ci.danville.ky.us>
1999-06-25 18:36 ` Byron Nikolaidis <byronn@solipsys.com>
1999-06-25 19:05   ` Chay Wesley <chay@ci.danville.ky.us>
1999-06-25 19:33     ` Byron Nikolaidis <byronn@solipsys.com>
1999-06-25 19:44       ` Chay Wesley <chay@ci.danville.ky.us>
1999-06-25 19:32   ` Chay Wesley <chay@ci.danville.ky.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