[unixODBC-support] problem running unixODBC with postsql

Karl Wang krl.wang at yahoo.com
Wed Jul 26 09:31:34 BST 2006


Hi, 
My environment is :
cpu: Intel(R) Celeron(R) CPU 2.00GHz
OS: SUSE 10
uname -a -> 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux
glibc 2.3.5
postgresql 7.4.9 (from source)
postodbc 8.00.102 (from source)
unixODBC 2.2.8( from source)
odbc.ini is shown below. 
globus-rls-lrc-postgres.sql is shown below. 

I built my database with following commands:


% createuser -P gt4 -W
% createdb -O gt4  -U gt4  -W lrc1000
% psql -W -U gt4  -d lrc1000  -f globus-rls-lrc-postgres.sql

when I run the command to check the database:
%isql lrc1000 gt4 globus

it output:
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

SQL> show tables;
[ISQL]ERROR: Could not SQLExecute 
( the server side output ERROR:  unrecognized configuration parameter "tables")

SQL> help tables;
+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------+------------+------------+-------+-------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+-----
---------+-----------------+------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------+
| TABLE_QUALIFIER                                                                                                                 | TABLE_OWNER                                                                                                       | TABLE_NAME                                                                           | COLUMN_NAME                                               | DATA_TYPE| TYPE_NAME                              | PRECISION  | LENGTH     | SCALE | RADIX | NULLABLE| REMARKS                       | COLUMN_DEF | SQL_DATA_TYPE| SQL_DATETIME_SUB| CHAR_OCTET_LENGTH| ORDINAL_POSITION| IS_NULLABLE                                              | DISPLAY_SIZE| FIELD_TYPE |
+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------+------------+------------+-------+-------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+-----
---------+-----------------+------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------+
+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------+------------+------------+-------+-------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+-----
---------+-----------------+------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------+
SQLRowCount returns -1


Anyone have advices?
Thanks, 
Karl



----------------------------------
the odbc.ini is shown as follows:
[ODBC Data Sources]
lrc1000=lrc database
rli1000=rli database


[lrc1000]
Description=LRC database
DSN=lrc1000
Servertype=postgres
Servername=localhost
Database=lrc1000
ReadOnly=no
Driver=/usr/local/psqlodbc-08.00.0102/lib/psqlodbc.so
Port=5432


[rli1000]
Description=RLI database
DSN=rli1000
Servertype=postgres
Servername=localhost
Database=rli1000
ReadOnly=no
Driver=/usr/local/psqlodbc-08.00.0102/lib/psqlodbc.so
Port=5432


[Default]
Driver=/usr/local/psqlodbc-08.00.0102/lib/psqlodbc.so
Port=5432

-----------------------------------

globus-rls-lrc-postgres.sql is shown as follows:

create table t_lfn (
  id serial primary key,
  name varchar(250) not null,
  ref int default 0 not null
);
create unique index t_lfn_name on t_lfn(name);

create table t_pfn (
  id serial primary key,
  name varchar(250) not null,
  ref int default 0 not null
);
create unique index t_pfn_name on t_pfn(name);

create table t_map (
  lfn_id int not null references t_lfn(id),
  pfn_id int not null references t_pfn(id)
);
alter table t_map add constraint pk_map primary key(lfn_id, pfn_id);
create index t_map_pfn_id on t_map(pfn_id);

create table t_rli (
  id serial primary key,
  flags int default 0 not null,
  name varchar(250) not null
);
create unique index t_rli_name on t_rli(name);

create table t_rlipartition (
  rli_id int not null references t_rli(id),
  pattern varchar(250) not null
);
alter table t_rlipartition add constraint pk_rlipartition primary key(rli_id, pattern);
create index t_rlipartition_pattern on t_rlipartition(pattern);

create table t_attribute (
  id serial primary key,
  name varchar(250) not null,
  objtype int not null,
  type int not null
);



 			
---------------------------------
See the all-new, redesigned Yahoo.com.  Check it out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20060726/a320cfc4/attachment.html>


More information about the unixODBC-support mailing list