Article 6EAPJ PostgreSQL ISQL (unixodbc) create/drop table error

PostgreSQL ISQL (unixodbc) create/drop table error

by
psaradha86
from LinuxQuestions.org on (#6EAPJ)
While using ISQL in linux for POSTGRES, I am able to make a connection to the database and execute select/update/insert/delete statements on tables.

But I am unable to execute create/drop/grant statements. I am getting error as below,

1.CREATE

SQL> create table shop (item1 integer);
[S1000]ERROR: syntax error at or near "create" at character 29;
Error while executing the query
[ISQL]ERROR: Could not SQLExecute
SQL> create table shop (item1 int);
[S1000]ERROR: syntax error at or near "create" at character 29;
Error while executing the query
[ISQL]ERROR: Could not SQLExecute
2.DROP

SQL> drop table persons2;
[S1000]ERROR: syntax error at or near "drop" at character 29;
Error while executing the query
[ISQL]ERROR: Could not SQLExecute
3.SELECT

SQL> select * from persons2;

| personid | pname
+------------+----------------------------------------------------------
------------+
| 1 | test1
| 2 | test2
| 3 | test3
| 4 | test4
SQLRowCount returns 4
4 rows fetched
Grant does not work as well. Is this a permission issue? Please find my permissions below

SQL> SELECT rolname, rolsuper, rolcreaterole FROM pg_roles WHERE rolname
= 'me';
+-----------+---------+--------------+
| rolname | rolsuper| rolcreaterole|
+-----------+---------+--------------+
| me | 1 | 0 |
+-----------+---------+--------------+
Also I am unable to find any documents for ISQL to check how to find the roles, permissions of a user etc.

I am able to execute all the above statements using PSQL in linux though.

psqltest=# create table shop(item1 int);

CREATE TABLE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments