celati Laurent wrote:
> I coded this following python script via psycopg;
>
> web_service_test.py
> <http://python.6.x6.nabble.com/file/n5062113/web_service_test.py>
>
> 1/ When i execute it, the result is 'bad resquest'. Could you tell me why?
No, but you
On 2014-06-25 22:58, celati Laurent wrote:
Hello,
I coded this following python script via psycopg;
web_service_test.py
<http://python.6.x6.nabble.com/file/n5062113/web_service_test.py>
1/ When i execute it, the result is 'bad resquest'. Could you tell me why?
2/ Could yo
Hello,
I coded this following python script via psycopg;
web_service_test.py
<http://python.6.x6.nabble.com/file/n5062113/web_service_test.py>
1/ When i execute it, the result is 'bad resquest'. Could you tell me why?
2/ Could you tell me how to protect this script fro
Hello,
I coded this following python script via psycopg;
web_service_test.py
<http://python.6.x6.nabble.com/file/n5062113/web_service_test.py>
1/ When i execute it, the result is 'bad resquest'. Could you tell me why?
2/ Could you tell me how to protect this script from SQL i
On Sun, 2009-03-29 at 11:35 +0100, taliesin wrote:
> Hi,
>
> I'm probably being very dense so apologies in advance, but I can't find
> any decent documentation for the psycopg module for PostgreSQL interfacing.
>
> Google and Yahoo don't seem to return much for
Diez B. Roggisch wrote:
> taliesin schrieb:
>> Hi,
>>
>> I'm probably being very dense so apologies in advance, but I can't find
>> any decent documentation for the psycopg module for PostgreSQL
>> interfacing.
>>
>> Google and Yahoo don'
taliesin schrieb:
Hi,
I'm probably being very dense so apologies in advance, but I can't find
any decent documentation for the psycopg module for PostgreSQL interfacing.
Google and Yahoo don't seem to return much for any of the queries I gave
them and what's listed as the
Hi,
I'm probably being very dense so apologies in advance, but I can't find
any decent documentation for the psycopg module for PostgreSQL interfacing.
Google and Yahoo don't seem to return much for any of the queries I gave
them and what's listed as the homepage for p
On Wed, Dec 12, 2007 at 09:08:44AM -0500, Calvin Spealman wrote regarding Re:
psycopg:
>
>Don't do that, for a number of reasons. String concatenation is really
>never a good idea and formatting your own query strings is exactly what
>leads to things like sql inje
Don't do that, for a number of reasons. String concatenation is
really never a good idea and formatting your own query strings is
exactly what leads to things like sql injection. Let the db library
handle it for you:
cur.execute('insert into seq(id,sequence) values(3, %s)', (content,))
Not
hi all,
while executing this cur.execute('insert into seq(id,sequence)
values(3,'+content+')')
i'm getting an error psycopg2.ProgrammingError: syntax error at or near
"prophage"
LINE 1: insert into seq(id,sequence) values(3,Tum2 prophage complete...
--
http://mail.python.org/mailman/listinfo/pyth
ment I don't even have a clue how they
> differ and on what reason, why does PostgreSQL seem to favour pygresql
> and Pythoneers psycopg?
>
> Thanks in advance.
Well, my info can be a little out of date, since I researched this
problem more than a year ago.
AFAIK, psycopg still lacks
ing the pg api.
>
> But I was intrigued by this problem and started googling and by that
> time I've noticed that python projects like Django seem to favor the
> psycopg module.
>
> So I installed that one (the 1.1 version, since Django uses that too)
> and it looked like it
nd by that
time I've noticed that python projects like Django seem to favor the
psycopg module.
So I installed that one (the 1.1 version, since Django uses that too)
and it looked like it has the same problem of creating a user after a
database, I'm sure that there is a user erro
Hi all,i have python 2.4.3 and 2.5 versions installed default python interpreter being 2.5have compiled psycopg2 with python2.4.3 setup.py.install , it installs in site-setup of 2.4.3 but when i login as a normal user and get into interctive python prompt of
2.4.3 , and " import tz " fails to im
Frank Millan:
> Perhaps if you explain what you are trying to do, I may be able to
> suggest something.
I am looking for an adaptation/type cast mechanism and looking at the
sources I think I have
found it in doc/examples/usercast.py. I am doing some experiment now
...
Michele Simionato
--
h
ombine(dat,dt.time(0)) # convert to datetime
>
> This is exactly the type checking I would like to avoid :-/
>
> Michele Simionato
psycopg returns a datetime.datetime object from a TIMESTAMP column, and
a datetime.date object from a DATE column. You should not have to do
a
Frank Millman:
> import datetime as dt
> def DbToDate(dat):
>if isinstance(dat,dt.datetime):
>return dat # already in datetime format
>if isinstance(dat,dt.date):
>return dt.datetime.combine(dat,dt.time(0)) # convert to datetime
This is exactly the type checking I would
Michele Simionato wrote:
> Look at this example:
>
> >>> import psycopg
> >>> psycopg.__version__
> '1.1.19'
> >>> import datetime
> >>> today = datetime.datetime.today()
> >>> co = psycopg.connect('')
>
Look at this example:
>>> import psycopg
>>> psycopg.__version__
'1.1.19'
>>> import datetime
>>> today = datetime.datetime.today()
>>> co = psycopg.connect('')
>>> cu = co.cursor()
>>> cu.execute('CRE
Ben Hutchings wrote:
> Steve Holden <[EMAIL PROTECTED]> wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>>I am trying to discover the schema of a PostgreSQL database
>>>programatically at runtime.
>>>
>>>I'm using psycopg (I assume that&
Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>> I am trying to discover the schema of a PostgreSQL database
>> programatically at runtime.
>>
>> I'm using psycopg (I assume that's still the best library). Is there a
>> wa
[EMAIL PROTECTED] wrote:
> I am trying to discover the schema of a PostgreSQL database
> programatically at runtime.
>
> I'm using psycopg (I assume that's still the best library). Is there a
> way to query the schema other than opening a system pipe like "psql -d
&
I am trying to discover the schema of a PostgreSQL database
programatically at runtime.
I'm using psycopg (I assume that's still the best library). Is there a
way to query the schema other than opening a system pipe like "psql -d
'\d'", "psql -d '\d table
Hi
I am getting "ImportError: No module named psycopg" i downloaded
windows binary from http://stickpeople.com/projects/python/win-psycopg/
It is intalled in python24\lib\site-packages\psycopg2\
please help!
Thanks
YS
--
http://mail.python.org/mailman/listinfo/python-list
Glauco wrote:
> [...]
> Gerhard thank you very much, this example explain me some idea, but
> anyway don't resolve the core question.
> In you example when dateVal is a None or textVal is none.
> argument x must be DateTime, not None.
> so i must manipulate for the empty string or None cases
No,
"""
> insert into mytable(myint, mytext, mydate)
> values (%s, %s, %s)
> """, (intval, textVal, dateVal))
>
> The execute(many) method has an optional second parameter, which is a
> tuple of values for your parametrized query.
>
> There are
ecute(many) method has an optional second parameter, which is a
tuple of values for your parametrized query.
There are different styles to parametrize queries among the various
DB-API modules. psycopg uses the pyformat one, where you just use %s as
placeholders.
It will happily quote all Pyth
(myint, mytext, maydate)
values
(%s,%s,%s);""" % (myvalue1, myvalue2, myvalue3)
without all time check for none, empty string and so on...
I've seen API of psycopg and s
Thanks for the reply. I figured it out, the problem was with my
postgresql configuration. the following seemed to do the trick.
localall
md5
host all 0.0.0.0 0.0.0.0 md5
--
http://mail.python.org/mailman/listinfo/python-list
I did, the pg_hba conf is a big tricky to me. I've tried the following
things.. the commented out lines I also tried.
#localall ident
sameuser
localall md5
host all 127.0.0.1 255
On 2005-03-12, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello, I'm new to both PostgreSQL and psycopg and I'm trying to connect
> to my database running on localhost. I have postgres setup to do md5
> authentication and this works when using a db admin tool on my
Hello, I'm new to both PostgreSQL and psycopg and I'm trying to connect
to my database running on localhost. I have postgres setup to do md5
authentication and this works when using a db admin tool on my local
network. For some reason, psycopg fails with IDENT authentication.
>>
Eino Mäkitalo wrote:
I had Visual C++ 6.0, so I compiled those
libpq.dll and psycopg.pyd.
if there are anyone to play with
Windows, Python 2.3 and Postgre-8.0.0-beta4 for windows like me.
You cat get those from: http://eino.net/html/python.html
Original psycopg source code is available in:
http
I had Visual C++ 6.0, so I compiled those
libpq.dll and psycopg.pyd.
if there are anyone to play with
Windows, Python 2.3 and Postgre-8.0.0-beta4 for windows like me.
You cat get those from: http://eino.net/html/python.html
Original psycopg source code is available in:
http://initd.org/projects
35 matches
Mail list logo