[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Start of perl setup and drop db scripts



On Mon, Mar 26, 2012 at 01:13:19PM -0500, Chris Bennett wrote:
> 
> DBD::Pg::db pg_putcopyend failed: ERROR:  duplicate key value violates
> unique constraint "language_pkey"
> DETAIL:  Key (code)=(pl) already exists.
> CONTEXT:  COPY language, line 1: "pl|Polish" at dirt.pl line 207.
> Not getting all languages into language table
> 
> Fixed with :
> my $cmd="SELECT code FROM language;";
> my @languages;
> undef my $vetor;
> my $sth = $dbh->prepare($cmd);
> 	$sth->execute;
> 	while ($vetor = $sth->fetchrow) {
> 		push @languages, $vetor;
> 		}
> 		$sth->finish;
> 
> ######################################################
> 
> no tsearch2 in LedgerSMB::Database->create for 9.1+ or in
> sql/Pg-database.sql

I see that prepare-company-database.sh also has these 2 problems

Chris Bennett