[Modeling-users] 1. Permission denied during SELECT 2. Aggregations
Status: Abandoned
Brought to you by:
sbigaret
From: <luk...@po...> - 2003-11-10 11:07:19
|
Hi 1. I've got some problems under Windows with Modeling and/or PostgreSQL. I = did exactly like it is said in "quick overview" and I used Persons and Adress= es. The verifcation and Python object creation was successful, but when I run script (a bit simplified than in overview): #------------------------------------ from Sample.Person import Person from Sample.Address import Address from Modeling.EditingContext import EditingContext import sys import os try: ec=3DEditingContext() os.environ['MDL_ENABLE_DATABASE_LOGGING']=3D'1'; os.environ['MDL_PREFERRED_PYTHON_POSTGRESQL_ADAPTOR']=3D'pypgsql' # fetch objects in_london=3Dec.fetch('Person') [(p.getLastName(), p.getFirstName()) for p in in_london] except: print 'errors', raise; #------------------------------------ i got this error message: Traceback (most recent call last): File "uzycie.py", line 28, in ? in_london=3Dec.fetch('Person') File "C:\PROGRA~1\Zope2.6.2\bin\Modeling\EditingContext.py", line 1419,= in fetch return self.objectsWithFetchSpecification(fs) File "C:\PROGRA~1\Zope2.6.2\bin\Modeling\EditingContext.py", line 1302,= in objectsWithFetchSpecification objects=3Dself.parentObjectStore().objectsWithFetchSpecification(fs, = ec) File "C:\PROGRA~1\Zope2.6.2\bin\Modeling\ObjectStoreCoordinator.py", li= ne 434, in objectsWithFetchSpecification return store.objectsWithFetchSpecification(aFetchSpecification, anEditingContext) File "C:\PROGRA~1\Zope2.6.2\bin\Modeling\DatabaseContext.py", line 1764= , in objectsWithFetchSpecification anEditingContext) File "C:\PROGRA~1\Zope2.6.2\bin\Modeling\DatabaseChannel.py", line 394,= in selectObjectsWithFetchSpecification entity) File "C:\PROGRA~1\Zope2.6.2\bin\Modeling\DatabaseAdaptors\AbstractDBAPI2Adapto= rLa yer\AbstractDBAPI2AdaptorChannel.py", line 297, in selectAttributes raise GeneralAdaptorException, msg Modeling.Adaptor.GeneralAdaptorException: Couldn't evaluate expression SELECT t0.ID, t0.FIRST_NAME, t0.LAST_NAME FROM PERSON t0. Reason: libpq.OperationalError:ERROR: person: permission denied I think that isn't because incorrect: username/host/database/password because they works in PostgreSQL client PSQL and in pyPgSQL (Python adapter). So what's wrong? I'm a quite advanced databases user and i firs= t saw acces denied on SELECT after successful connection to the database. 2. I also unite with the voice of Ernesto Revilla (Re: Summary objects and Proxy objects, 2003-06-12 16:56) that extension that allows: aggregations (sum,min,max...), having's, group by's is ESSENTIAL. Using more advanced queries, that uses that features, is inpossible now. So I can't use Model= ing in my application because of it and must use the "pure" pgSQL adapter. ******************************** * =A3ukasz =A3akomy * Goodwill Internet Factory * * luk...@gi... ******************************** |