<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - python - psycopg2 - wstawianie % do ilike]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=1904&amp;type=atom"/>
	<updated>2013-11-07T13:55:56Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=1904</id>
		<entry>
			<title type="html"><![CDATA[Odp: python - psycopg2 - wstawianie % do ilike]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4792#p4792"/>
			<content type="html"><![CDATA[Tylko że znalazłeś "interfejs" do sqlite a nie do postgresa :-P
Zapytałem gdzie indziej i mam rozwiązanie:
[url]http://pl.python.org/forum/index.php?topic=4125.0[/url]]]></content>
			<author>
				<name><![CDATA[tomek]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1459</uri>
			</author>
			<updated>2013-11-07T13:55:56Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4792#p4792</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: python - psycopg2 - wstawianie % do ilike]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4791#p4791"/>
			<content type="html"><![CDATA[Nie mam pojęcia o pythonie ale patrząc na dokumentacje [url]http://docs.python.org/release/2.5.2/lib/sqlite3-Cursor-Objects.html[/url] to chyba powinno wyglądać tak:
sql = "select * "\
      "from tabela "\
      "where nazwisko ilike '%' "\
      "and wiek = :wiek"

cursor.execute(sql, {'wiek':23})]]></content>
			<author>
				<name><![CDATA[c_michal]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=627</uri>
			</author>
			<updated>2013-11-07T13:17:21Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4791#p4791</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[python - psycopg2 - wstawianie % do ilike]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4790#p4790"/>
			<content type="html"><![CDATA[Może ktoś będzie umiał pomóc.
psycopg2 - python.

Nie umiem sobie poradzić, dostaję komunikat: 
[quote]<class 'psycopg2.ProgrammingError'>
ProgrammingError("argument formats can't be mixed",)[/quote]
[code]sql = "select * "\
      "from tabela "\
      "where nazwisko ilike '%' "\
      "and wiek = %(wiek)s"

cursor.execute(sql, {'wiek':23}}[/code]]]></content>
			<author>
				<name><![CDATA[tomek]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1459</uri>
			</author>
			<updated>2013-11-07T10:40:10Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4790#p4790</id>
		</entry>
</feed>
