2 Replies Latest reply on Dec 13, 2017 2:25 PM by Marco Ardito

    About postgres server emulation, without ODBC?

    Marco Ardito Master

      I've just found this manual reference section about node.js

      Node.js Integration · Teiid Documentation

       

      which states:

      "Prerequisites

          Have Node.js installed. The npm pagckage pg is also required. Use "

          Your Teiid installation should already be setup for ODBC access. This allows the optional support of Node.js for PostGIS/PostgreSQL to be used."

       

      which, in a setup example below is used as "const { Client } = require('pg')"

       

      Now, I understand this as: "to allow node.js to access teiid, use the native postgres protocol in node.js to access the odbc server emulation in teiid server"

       

      My question is: is this true and supported, and also for other similar environments?

      Eg: a php/python/other web framework which has no true "odbc" support, but has postgred drivers could use the same way to access teiid?

       

      Nowadays true odbc support is difficult to find except on microsoft windows office applications and such, because those kind of programs often have no other way to access remote data than odbc.

      (libreoffice has much more ways, and also can use jdbc)

       

      I am currently using an intermediate unixodbc setup on my linux web server, which is talking to teiid through odbc (which my current web framework currently supports, but much worse than direct drivers such postgres or mysql, and it's becoming even worse...), but if I could use the web framework's specific postgres driver I could have much more support, tools, security, and also I could be able to use other frameworks which don't support odbc at all, or anymore, but they do support postgres...

       

      I've read ODBC Support · Teiid Documentation  and I know that teiid's postgres (odbc) server emulation is somewhat limited if compared with a true "direct" postgres server, but I could keep the same functionality I hope I can expect through odbc, just skipping the odbc protocol because of it limited support, which is becoming even more difficult in the future... see https://forum.codeigniter.com/thread-66140.html  for example... otherwise we could need to switch to a java web application framework but this implies a more difficult process, for many reasons, in the short term, at least.

       

      Any suggestion or word of wisdom, is very welcome.

       

      Thanks,

      Marco

        • 1. Re: About postgres server emulation, without ODBC?
          Steven Hawkins Master

          > My question is: is this true and supported, and also for other similar environments?

           

          The eventual goal is to support most commonly used pg clients.  This is possible as the pg emulation provides support for most of the pg protocol, but each client has different metadata queries and other assumptions that may require additional logic.  When an issue has been encountered with other clients we've addressed it as well.

           

          > Any suggestion or word of wisdom, is very welcome.

           

          Please do attempt to by-pass the ODBC client.  We can assess any issues you may then encounter.

          • 2. Re: About postgres server emulation, without ODBC?
            Marco Ardito Master

            shawkins  ha scritto:

            Please do attempt to by-pass the ODBC client.  We can assess any issues you may then encounter.

            ...why didn't I dared to try this before...?

             

            Thanks, I tried and some basic test are giving good results! Suddenly I feel more confident about my projects...

            I'll test this more, but it seems I was just too shy...

             

            Marco