Thread: Re: PostgreSQL / ODBC / Ms-SQL 2000
> -----Original Message----- > From: pgsql-odbc-owner@postgresql.org > [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Dave Page > Sent: 27 September 2005 21:11 > To: Thomas Knoop > Cc: pgsql-odbc@postgresql.org > Subject: Re: [ODBC] PostgreSQL / ODBC / Ms-SQL 2000 > > > > When I look at the properties of the linked server in Ms-SQL > > I can see that > > the catalog column is empty. I think MS-SQL expects a > > (default?) value here, > > and thats why we cannot proceed creating a view. > > If SQL is expecting a value here even though the driver reports that > catalogs are not supported by the database then it's broken. > I'll see if > I can find some time to try to work out whats going on in the week. I > can't promise anything though. According the SQL docs, the correct syntax is something like: SELECT * FROM MYLINKEDSERVER..[public].mytable; However I can't get this to work. This does seem fairly common though, with other users complaining of the same issues with Oracle. The commonly suggested solution is to use: SELECT * FROM OPENQUERY(MYLINKEDSERVER, 'SELECT * FROM public.mytable') Which works perfectly afaict, apart from a minor issue with columns of type 'name', for which I've just committed a fix to CVS. Regards, Dave
Hi Dave, First let me thank you for your input! > > When I look at the properties of the linked server in Ms-SQL I can > > see that the catalog column is empty. I think MS-SQL expects a > > (default?) value here, > > and thats why we cannot proceed creating a view. > > If SQL is expecting a value here even though the driver reports that > catalogs are not supported by the database then it's broken. > I'll see if > I can find some time to try to work out whats going on in the week. I > can't promise anything though. > According the SQL docs, the correct syntax is something like: > SELECT * FROM MYLINKEDSERVER..[public].mytable; > However I can't get this to work. This does seem fairly common though, > with other users complaining of the same issues with Oracle. The commonly > suggested solution is to use: > SELECT * FROM OPENQUERY(MYLINKEDSERVER, 'SELECT * FROM public.mytable') > Which works perfectly afaict, apart from a minor issue with columns of > type 'name', for which I've just committed a fix to CVS. As far I can see this tries to open the table complete, and fails in my case cause i have a ADSL connection and it tries to fetch all the records.... This looks to me as a very slow workaround. Regards, Thomas.