Re: Cannot access views
От | Chris Andrews |
---|---|
Тема | Re: Cannot access views |
Дата | |
Msg-id | Pine.LNX.4.21.0106202231450.12451-100000@rhododendron.symes.netsw.co.uk обсуждение исходный текст |
Ответ на | Re: Cannot access views (Joern Muehlencord <jomu@uni-paderborn.de>) |
Список | pgsql-odbc |
On Wed, 20 Jun 2001, Joern Muehlencord wrote: > Hello Cedar, > > > hmm.. I still don't completely understand. Let's say, for example, you > > have a test table "testtable" and view "testview". If I understand, from > > psql you can select * from both and it works, but going into Word > > testtable works but testview does not. Correct? > Yes - that is the problem. Using psql I can do everything I want to - what > ever I use (view or table). Using Word I can only access the table. > testview was createte by something like that: > create view testview as select * from testtable where id in (select adressid > from lists where listid = '1') > lists is a "n:m-resolve-Table" (creating n lists with m datasets from > testtable) I found a problem using Word 97 (and MSQuery) and Postgres: if the query string put together by MSQuery is longer than 255 characters, it will add a carriage return every 256 characters... this appears to be a generic Word problem - I found vague references to it in the MS tech web site, and a potential fix in Office 2000 SP1. The symptoms were that MSQuery would complain "can't open the datasource" - or some similar useless error. The errors from postgres were of the form 'error in SQL syntax' followed by some truncated-looking SQL. Typically the error would be mismatched quotes. I watched the network during queries and noted the extra line breaks. Ironically, my workaround is to define a view which only returns the fields I want so I can say 'SELECT * FROM my_view;', which is shorter than 255 chars, and seems to work ok. I'd be surprised if this is what you're seeing, but it's worth a mention. Chris.
В списке pgsql-odbc по дате отправления: