1 Reply Latest reply on May 19, 2015 8:06 AM by shawkins

    Postgres User-Defined Functions not available in the teiid VDB

    govindarajs

      Hi,

       

           I assume the VDB is a Progresql, because the VDB has pg_catalog schema, please refer the below image

       

           vdb1.JPG

           The VDB pg_catalog schema does not have any User-Defined Functions, Please refer the below image

       

           vdb2.JPG

           But when I compared with some other postgresql DB, the pg_catalog schema has lot of User-Defined Functions, please refer the below image

       

           vdb3.JPG

           When I was trying to get the next number in sequence to insert values in the VDB table by using this inbuilt function pg_get_serial_sequence(table_name, column_name), It is not available in the pg_catalog schema, but I can see the same function in the some other postgresql DB, please refer the below image

       

           vdb4.png

            Now my question is: Can you please explain why the User-Defined Functions are not available in the VDB pg_catalog schema?


            Due to unavailability of these User Defined Functions in pg_catalog we need to some other workaround to achieve the same functionalities.




      Thanks & Regards

      Govindaraj s.

        • 1. Re: Postgres User-Defined Functions not available in the teiid VDB
          shawkins

          > I assume the VDB is a Progresql, because the VDB has pg_catalog schema, please refer the below image

           

          No, the pg_catalog is for our odbc connectivity that uses the pg protocol and clients - which expect pg system tables to fetch metadata.

           

          > Now my question is: Can you please explain why the User-Defined Functions are not available in the VDB pg_catalog schema?

           

          You must first create add a postgresql source to the vdb.  However not all source functions will be available.  You can however right click on the source and manually add the definition of any source function that you need.