[teiid-issues] [JBoss JIRA] Commented: (TEIID-1460) Have teiid emulate a native postgresql database connection

Steven Lawrance (JIRA) jira-events at lists.jboss.org
Fri Mar 18 03:02:45 EDT 2011


    [ https://issues.jboss.org/browse/TEIID-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588808#comment-12588808 ] 

Steven Lawrance commented on TEIID-1460:
----------------------------------------

I did get further with pyodbc and the official postgresql ODBC driver.  With ~/.odbc.ini containing all the connection info (and set to connect via stunnel), I can connect and execute a query.  The funny thing is, I have to run it twice to get the results:

>>> import pyodbc
>>> conn = pyodbc.connect("DSN=PostgreSQL")
>>> cursor = conn.cursor()
>>> query = ...
>>> cursor.execute(query)
<pyodbc.Cursor object at 0x1988210>
>>> rows = cursor.fetchall()
>>> rows
[('BEGIN', )]
>>> cursor.execute(query)
<pyodbc.Cursor object at 0x1988270>
>>> rows = cursor.fetchall()
>>> rows
[actual, sensible results here]

I can see in wireshark the results are being returned the first time but that other table is returned before it.  Perhaps it's meant to indicate the query has started executing but it's just that the client library doesn't understand it...

> Have teiid emulate a native postgresql database connection
> ----------------------------------------------------------
>
>                 Key: TEIID-1460
>                 URL: https://issues.jboss.org/browse/TEIID-1460
>             Project: Teiid
>          Issue Type: Feature Request
>          Components: Server
>    Affects Versions: 7.3
>         Environment: All environments
>            Reporter: Graeme Gillies
>            Assignee: Steven Hawkins
>            Priority: Minor
>
> Currently we are using postgresql-odbc, and unixODBC to connect to teiid via the emulated postgresql ODBC connection on port 35432. Unfortunately, this is cumbersome to use, requires fiddling with setting up ODBC, and is difficult for integration into non-java languages (that have to use the ODBC connection).
> What we would like is for teiid to emulate a postgresql database such that we can point typical postgresql tools (such as psql) to port 35432 (or some other port) and they will "work". That would also allow us to use each languages native/preferred method of connecting to a postgresql database to connect to teiid. E.g. DBD::Postgres for perl, ruby-pg for ruby, pg/pgdb in python, etc.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list