🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.python
Article #28476

Re: psycopg2, bigint w tabeli

#28476
From: grick207
Date: Wed, 21 Aug 2013 19:46
45 lines
2280 bytes
W dniu wtorek, 20 sierpnia 2013 20:38:07 UTC+2 użytkownik hubert depesz lubaczewski napisał:
> On 2013-08-20, curious <grick2@gail.cm> wrote:
> 
> > Witam,
> 
> > Wykonując operacje bazodanowe natknąłem się na problem, którego nie
> 
> > potrafię przeskoczyć. Z jednej tabeli pobieram interesujące mnie
> 
> > rekordy, gdzie kolumna 'obiekt' jest typu bigint. Następnie chcę
> 
> > usunąć z innej tabeli te rekordy, które nie zawierają się w pierwszej
> 
> > kwerendzie. Zapytanie sql wygląda następująco :
> 
> > "DELETE FROM tab WHERE obiekt NOT IN %s" %(tuple(zbior),)"
> 
> 
> 
> Nie tak, tylko:
> 
> 
> 
> "DELETE FROM tab WHERE obiekt NOT IN %s", (tuple(zbior),)"
> 
> 
> 
> I powinno zadziałać.
> 
> 
> 
> depesz
> 
> 
> 
> -- 
> 
> The best thing about modern society is how easy it is to avoid contact with it.
> 
>                                                              http://depesz.com/

I oto właśnie chodziło ! Wielkie dzięki.
Pozdrawiam.

Curious.
Technical Details
Message-ID: <5a0906af-eb91-43e1-95b7-2500c171820e@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!pt2no21570460pbb.0!news-out.google.com!z6ni9262pbu.0!nntp.google.com!fx3no3913641qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <e1ed7712-1f9a-4bb5-bd1c-ad272c34456e@googlegroups.com> <flpcea-kta.ln1@depesz.com>

Show Full Headers
Complete Article Headers
X-Received: by 10.67.2.41 with SMTP id bl9mr3918803pad.16.1377114409009;        Wed, 21 Aug 2013 12:46:49 -0700 (PDT)
X-Received: by 10.182.28.129 with SMTP id b1mr6667obh.37.1377114408692; Wed, 21 Aug 2013 12:46:48 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!pt2no21570460pbb.0!news-out.google.com!z6ni9262pbu.0!nntp.google.com!fx3no3913641qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: pl.comp.lang.python
Date: Wed, 21 Aug 2013 12:46:48 -0700 (PDT)
In-Reply-To: <flpcea-kta.ln1@depesz.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.22.130.31; posting-account=026H_goAAADwuLe_1Q78MwFDnIswr6T7
NNTP-Posting-Host: 83.22.130.31
References: <e1ed7712-1f9a-4bb5-bd1c-ad272c34456e@googlegroups.com> <flpcea-kta.ln1@depesz.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5a0906af-eb91-43e1-95b7-2500c171820e@googlegroups.com>
Subject: Re: psycopg2, bigint w tabeli
From: grick207@gmail.com
Injection-Date: Wed, 21 Aug 2013 19:46:48 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit