New Problem w/PostgreSQL

[prev] [thread] [next] [Date index for 2005/02/09]

From: Justin Tocci
Subject: New Problem w/PostgreSQL
Date: 02:36 on 09 Feb 2005
I can't seem to get ->delete nor ->delete_all to work. The code is 
really simple, and I can't get it to work for my TABLE, so the problem 
isn't that it is a VIEW.

----------------
#!/usr/bin/perl -wT

use strict;
use My::Xuser;
my $class = "My::Xuser";
#DBI->trace( 1 );
$class->search(login_name => "testing")->delete_all();
----------------

I lifted the code on line, it seems hard to mess up since it is so 
short. I get no error from the command line but i check the database 
and the record is still there. The trace seems to show a rollback. This 
is probably really obvious guys, please don't bite.

TROFF
www:~/Perl jtocci$ ./delete-t
www:~/Perl jtocci$


TRON
www:~/Perl jtocci$ ./delete-t    DBI 1.47-ithread default trace level 
set to 0x0/1 (pid 29077)
     -> DBI->connect_cached(dbi:Pg:dbname=backend, Admin, ****)
     -> DBI->install_driver(Pg) for darwin perl=5.008001 pid=29077 
ruid=503 euid=503
        install_driver: DBD::Pg version 1.32 loaded from 
/Library/Perl/5.8.1/darwin-thread-multi-2level/DBD/Pg.pm
     <- install_driver= DBI::dr=HASH(0x8589c0)
pg_db_login
     <- connect_cached('dbname=removed' 'removed' ...)= 
DBI::db=HASH(0x8c5cd8) at DBI.pm line 596
dbd_db_STORE
     <- STORE('RootClass' 'DBIx::ContextualFetch')= 1 at DBI.pm line 629
        _set_isa([DBIx::ContextualFetch])
        DBIx::ContextualFetch::db::ISA skipped (already set to DBI::db)
        DBIx::ContextualFetch::st::ISA skipped (already set to DBI::st)
dbd_db_STORE
     <- STORE('RaiseError' 1)= 1 at DBI.pm line 643
dbd_db_STORE
     <- STORE('PrintError' 0)= 1 at DBI.pm line 643
dbd_db_STORE
     <- STORE('AutoCommit' 0)= 1 at DBI.pm line 643
dbd_db_STORE
  T  <- STORE('Taint' 1)= 1 at DBI.pm line 646
dbd_db_FETCH
  T  <- FETCH('Taint')= 1 at DBI.pm line 646
dbd_db_STORE
  T  <- STORE('FetchHashKeyName' 'NAME_lc')= 1 at DBI.pm line 646
  T  <> FETCH('FetchHashKeyName')= 'NAME_lc' ('FetchHashKeyName' from 
cache) at DBI.pm line 646
dbd_db_STORE
  T  <- STORE('ShowErrorStatement' 1)= 1 at DBI.pm line 646
dbd_db_FETCH
  T  <- FETCH('ShowErrorStatement')= 1 at DBI.pm line 646
dbd_db_STORE
  T  <- STORE('ChopBlanks' 1)= 1 at DBI.pm line 646
dbd_db_FETCH
  T  <- FETCH('ChopBlanks')= 1 at DBI.pm line 646
dbd_db_STORE
  T  <- STORE('dbi_connect_method' 'connect_cached')= 1 at DBI.pm line 
646
  T  <> FETCH('dbi_connect_method')= 'connect_cached' 
('dbi_connect_method' from cache) at DBI.pm line 646
dbd_db_STORE
  T  <- STORE('Username' 'removed')= 1 at DBI.pm line 646
  T  <> FETCH('Username')= 'removed' ('Username' from cache) at DBI.pm 
line 646
     <- connect= DBIx::ContextualFetch::db=HASH(0x8c5cd8)
dbd_db_STORE
  T  <- STORE('dbi_connect_closure' CODE(0x8b1160))= 1 at DBI.pm line 666
dbd_db_FETCH
dbd_db_STORE
dbd_st_prepare: statement = >SELECT xuser_id
FROM   xuser
WHERE  login_name = ?
<
  T  <- prepare_cached('SELECT xuser_id
FROM   xuser
WHERE  login_name = ?
')= ( DBIx::ContextualFetch::st=HASH(0x8c6a94) ) [1 items] at DBI.pm 
line 391
dbd_st_FETCH
  T  <- FETCH('Active')= '' at DBI.pm line 1124
dbd_st_FETCH
  T  <- FETCH('Taint')= 1 at ContextualFetch.pm line 49
dbd_st_STORE
     <- STORE('Taint' 0)= 1 at ContextualFetch.pm line 50
dbd_bind_ph
dbd_st_execute
     <- execute('testing')= 1 at ContextualFetch.pm line 51
dbd_st_STORE
  T  <- STORE('Taint' 1)= 1 at ContextualFetch.pm line 52
dbd_st_FETCH
dbd_st_FETCH
  T  <- FETCH('NAME_lc')= [ 'xuser_id' ] at DBI.pm line 1125
dbd_st_FETCH
  T  <- bind_columns(SCALAR(0x8ca738))= 1 at DBI.pm line 1125
dbd_st_fetch
  T  <- fetchrow_arrayref= [ '424646' ] row1 at ContextualFetch.pm line 
59
dbd_st_fetch
  T  <- fetchrow_arrayref= undef row1 at ContextualFetch.pm line 59
dbd_db_FETCH
  T  <- FETCH('Active')= 1 at DBI.pm line 316
dbd_db_ping
  T  <- ping= 1 at DBI.pm line 316
dbd_db_FETCH
dbd_st_prepare: statement = >DELETE
FROM   xuser
WHERE  xuser_id=?
<
  T  <- prepare_cached('DELETE
FROM   xuser
WHERE  xuser_id=?
')= DBIx::ContextualFetch::st=HASH(0x8ca8a0) at DBI.pm line 391
dbd_st_FETCH
  T  <- FETCH('Taint')= 1 at ContextualFetch.pm line 49
dbd_st_STORE
     <- STORE('Taint' 0)= 1 at ContextualFetch.pm line 50
dbd_bind_ph
dbd_st_execute
     <- execute('424646')= '1' at ContextualFetch.pm line 51
dbd_st_STORE
  T  <- STORE('Taint' 1)= 1 at ContextualFetch.pm line 52
dbd_discon_all
     <- disconnect_all= '' at DBI.pm line 675
dbd_st_destroy
!T  <- DESTROY(DBIx::ContextualFetch::st=HASH(8ca8a0))= undef during 
global destruction
dbd_st_destroy
!T  <- DESTROY(DBIx::ContextualFetch::st=HASH(8c6a94))= undef during 
global destruction
dbd_db_rollback
dbd_db_disconnect
dbd_db_destroy
!T  <- DESTROY(DBIx::ContextualFetch::db=HASH(8c5cd8))= undef during 
global destruction
!   <- DESTROY(DBI::dr=HASH(8589c0))= undef during global destruction
www:~/Perl jtocci$


justin tocci
fort wayne, in

New Problem w/PostgreSQL
Justin Tocci 02:36 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Perrin Harkins 03:30 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Justin Tocci 05:10 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Perrin Harkins 05:24 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Justin Tocci 05:34 on 09 Feb 2005

Generated at 17:31 on 15 Feb 2005 by mariachi v0.52