[Tutor] insert in postgresql
Jorge Godoy
godoy at metalab.unc.edu
Wed Oct 1 22:34:47 EDT 2003
"ajstec" <ajstec at bol.com.br> writes:
> Oi, :-) só 31 graus
Bem mais quente que em Curitiba.
> I tried diverse formats but ...
>
> db.query("insert into curso values (default,%s,%s)"%(a,b))
> Traceback (most recent call last):
> File "<pyshell#58>", line 1, in ?
> db.query("insert into curso values
> (default,%s,%s)"%(a,b))
> _pg.error: ERROR: Attribute "cat" not found
>
See that you have a '^M' char there. You've probably pressed ENTER in
the middle of the string. To use newlines you have to use triple
quotes (either single or double quotes).
An example was provided in a previous message.
> Você é brasileiro ?
Yes, I'm Brazilian. :-) Living in the South, though. :-)
--
Godoy. <godoy at metalab.unc.edu>
More information about the Tutor
mailing list