[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Sequences and postgres bug found
René Hertell wrote:
> I found now what causes the sequence problem i wrote earlier today..
>
> When specifying a serial column in postgres, ic creates a table called
> ic_test_create. Postgres makes from it sequence called
> ic_test_create_code_seq. This should also be deleted when the test-table
> creation process is sucessful (in the DBI.pm module there is no "drop
> sequence" part at all).
>
> I tried to add this to the DBI.pm (row 289 and 299)
>
> $db->do("drop sequence ic_test_create_code_seq")
>
> to that part that deletes the test-table, but it IC somehow fails to execute
> it.
>
> Could someone help me with insering the "drop sequence" to the DBI.pm so
> that this issue could be fixed.
>
> REgards, René
I think, this is not a good idea, because anything can causes to remove,
to damage or to delete the files in the products directory of the
catalogs and after restarting the IC server, you will lost all the
datas. Another problem is, if you use an external SQL-Server and the
server which has your IC and catalog has a damage or a crash, you will
lost all the datas in your SQL-Server, if you rebuild your catalog and
IC once more in a newest server.
What happens, if one SQL-Server is shared with a lot of different IC and
one of the IC Administrator has a bad day and make a error or wrong work?
I think, it is better to not use any drop commands per default. Maybe it
is very usefull for the development. In that case, maybe it is better to
use a directive like
# for the development
# use the drop command Yes or NO. Default NO!
DropTables Yes
in the catalog.cfg and use
$db->do("drop sequence ic_test_create_code_seq") if
$Vend::Cfg->{DropTables};
Or?
Joachim
--
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de