[unixODBC-support] postgresql prepare statment doesn't support creating tables

support at vip-consult.co.uk support at vip-consult.co.uk
Sun Nov 22 19:10:23 GMT 2015


is there any progress with this bug ?

I want to use it with freeswitch which doesn’t support the  isql –e switch

Kind Regards Chris    Happy with our service ? 
      Join us and leave feedback 
     

        
      08455 271771    01202 232240 
      Company Registration No. 8434950  


From: Nick Gorham 
Sent: Monday, October 26, 2015 8:24 PM
To: support at vip-consult.co.uk ; unixodbc-support at mailman.unixodbc.org 
Cc: nick at unixodbc.org 
Subject: Re: BUG: postgresql prepare statment doesn't support creating tables

On 26/10/15 18:13, support at vip-consult.co.uk wrote:

  Hi all could you please comment on this bug report ?


  Kind Regards Chris    Happy with our service ? 
        Join us and leave feedback 
       

          
        08455 271771    01202 232240 
        Company Registration No. 8434950  


  From: support at vip-consult.co.uk 
  Sent: Thursday, October 22, 2015 5:39 PM
  To: unixodbc-support at mailman.unixodbc.org 
  Subject: BUG: postgresql prepare statment doesn't support creating tables

  hi all 

  the postgresqk  unixdbc driver doesn’t seem to work with table create statments on Debian Jessie
  on isql trying to execute 
  CREATE TABLE a (c integer)
  ERROR:  syntax error at or near "create" at character 29

  I have looked at the logs and it seems that is uses PREPARE create table   statments which as far as I know  is not supported in postgresql
  ERROR:  syntax error at or near "create" at character 29
  STATEMENT:  PREPARE "_PLAN0x25ca9e0" as create table aaa (aa integer);;EXECUTE "_PLAN0x25ca9e0"

  is there any way to disable prepare statements or  a better way fix this bug ?

  Debian jessie 
  unixODBC 2.3.4
  postgresql 9.3 (also tried latest)


  [freeswitch]
  Driver        = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
  Description=Connection to LDAP/POSTGRESQL
  Servername=localhost 
  Port=5432   
  Protocol=6.4
  FetchBufferSize=99
  Username=fs 
  Password=xxxxx
  Database=fs 
  ReadOnly=no
  Debug=1
  CommLog=1

Try 

isql -e freeswitch

To call SQLExecDirect instead of SQLPrepare/SQLExecute

Though thats just a workround, the bug is in the driver, so I would ask the driver writers as to the solution.

-- 
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20151122/5618a853/attachment.html>


More information about the unixODBC-support mailing list