Wallace Roberts Consulting <[email protected]> hat am 5. November 2010 um
23:08 geschrieben:
> DBD::Pg::db do failed: ERROR: syntax error at end of input
> LINE 9: WHERE id =
> ^ at SL/GL.pm line 178.
>
Did you read this on Dieter's FAQ page
(http://sql-ledger.com/cgi-bin/nav.pl?page=misc/faq.html&title=FAQ)?
"PostgreSQL 8.x PostgreSQL added a restriction in v8.x that a sequence cannot be
dropped after if it is referenced by a table. However backups created with
SQL-Ledger v2.6.13 and earlier have a DROP SEQUENCE step in the backup which
will fail. To fix this edit the backup before restoring on a 8.x system.
This typically looks like this:
DROP SEQUENCE id ;
CREATE SEQUENCE id START 10579;
--
DROP SEQUENCE invoiceid ;
CREATE SEQUENCE invoiceid START 11096;
--
DROP SEQUENCE orderitemsid ;
CREATE SEQUENCE orderitemsid START 178;
--
DROP SEQUENCE jcitemsid ;
CREATE SEQUENCE jcitemsid START 53;
Change it to:
SELECT SETVAL('id', 10579);
SELECT SETVAL('invoiceid', 11096);
SELECT SETVAL('orderitemsid', 178);
SELECT SETVAL('jcitemsid', 53);
"
Regards
Rolf_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger