[mod_python] newbie question regarding postgresql

Johnny Morano johnny.morano at vlaanderen.be
Fri Apr 19 14:43:24 EST 2002


thanx for the reply(s/y/ies/)!
but the problem is something redhat-ish... the same code works perfect on 
debian, but refuses to run on redhat... libraries, dependencies, way too much 
policies ;-)



On Friday 19 April 2002 14:37, you wrote:
> My best guess as to why PostgreSQL isn't working from your web server is
> that you haven't given the webserver credentials to use the database.
> Create a user with the same name as the user that apache runs as
> (nobody, www, www-data) and then try it.
>
> This isn't an answer to your problem.. but Python has a feature such
> that if you do this:
>
> (""" my really really """
>   """ long string that gets split up """"
>   """ over a bunch of lines """
>   """ ............"""")
>
> then it turns out as one string with no \n's, without the runtime cost
> of using +=.  This is because python just concatenates adjacent strings
> if they aren't separated by anything.. i.e. ("""blah""" 'blah' "blah")
> is 'blahblahblah'.
>
> -bob
>
> On Friday, April 19, 2002, at 05:17 AM, Johnny Morano wrote:
> > so mean like this?:
> >
> > curs.execute(""" SELECT relname as tablename \
> >                           , pg_get_userbyid(relowner) AS tableowner \
> >                           , relhasindex as hasindexes \
> >                           , relhasrules as hasrules \
> >                           , reltriggers as hastriggers \
> >
> > doesn't work either. my web server gives me an internal error and the
> > error
> > message is that Dispatch doesn't return anything
> >
> > On Friday 19 April 2002 10:53, you wrote:
> >> Try to put backslashes inside the SQL-string, like this (see
> >>
> >> end of each line):
> >>>         curs.execute(""" SELECT relname as tablename
> >>>                          , pg_get_userbyid(relowner) AS tableowner
> >>>                          , relhasindex as hasindexes
> >>
> >> etc.
> >>
> >> --------------------------------------------------
> >> http://www.mailbox.hu - Mert levelezni kell...
> >>
> >> _______________________________________________
> >> Mod_python mailing list
> >> Mod_python at modpython.org
> >> http://www.modpython.org/mailman/listinfo/mod_python
> >
> > --
> > Johnny Morano - Linux Consultant
> > ___________________________________________________
> >  Ministerie Vlaamse Gemeenschap                    |
> >  Koning Albert II-laan, 7 (610) 1210 Brussel       |
> >  tel: 02/5531319 mail: johnny.morano at vlaanderen.be |
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://www.modpython.org/mailman/listinfo/mod_python

-- 
Johnny Morano - Linux Consultant
___________________________________________________ 
 Ministerie Vlaamse Gemeenschap                    |
 Koning Albert II-laan, 7 (610) 1210 Brussel       |
 tel: 02/5531319 mail: johnny.morano at vlaanderen.be |



More information about the Mod_python mailing list