[Tutor] Truncating a Table
ethics at gmail.com
Fri May 11 18:20:54 CEST 2007
Same result. I think the problem maybe with the extension module. I am going
to look for a
different way of running a truncate.
Thanks to both of you for some excellent advice!
On 5/11/07, Andreas Kostyrka <andreas at kostyrka.org> wrote:
> Try commiting it. Actually that might depend upon the dbserver used, but
> PostgreSQL for example requires commits for everything (including statements
> like CREATE TABLE).
> -- Ursprüngl. Mitteil. --
> Betreff: Re: [Tutor] Truncating a Table
> Von: "Leon Keylin" <ethics at gmail.com>
> Datum: 11.05.2007 16:01
> Yep, works if I do it manually, under the same user.
> On 5/11/07, Tim Golden <mail at timgolden.me.uk> wrote:
> > Leon Keylin wrote:
> > > Thanks Tim for a fast reply.
> > >
> > > The return gives me 0 Rows Truncated message and when I look at the
> > table,
> > > every record is still there.
> > > There are no foreign keys on the table and no errors.
> > >
> > > Andreas asked if I should commit after, should I? I didn't think I
> > > needed to
> > > but I can try that.
> > Commits shouldn't make any difference
> > at all to truncation -- that's the point of
> > it, unless the interface lib is actually
> > holding back from *issuing* the cursor command
> > until you commit. (Though I doubt it).
> > Does it work in Query Analyzer (or any other
> > means you have of issuing the command)? Does
> > truncation work on any other table?
> > TJG
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor