Forum OpenACS Development: Re: Annoying "from statement missing" Notices

Collapse
Posted by Torben Brosten on
Hi all,

I'm running pg9.0 with some non-core packages and am running into similar errors:

Database operation "0or1row" failed
(exception ERROR, "ERROR: missing FROM-clause entry for table "acs_object_id_seq"
LINE 2: select acs_object_id_seq.nextval

PG9.0 doesn't accept the add_missing_from config flag.

Also, the xarg.net link isn't working.

Where is there an example change?

I'd like to update the non-core packages with similar issues as I run-into them.

cheers,

Torben

Collapse
Posted by Torben Brosten on
I figured it out.

Replace with set var_name [db_nextval acs_object_id]

Thank you for reading..

Collapse
Posted by Gustaf Neumann on
If you want to address the problem from SQL, a typical approach is to use the "nextval" function instead of .nextval pseudo attribute. See for an example e.g.:

http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/acs-tcl/tcl/security-procs-postgresql.xql?r1=1.10&r2=1.11

For some unknown reasons, fisheye is not able to resolve the changeset anymore. For more examples, how to deal with the problem, checkout on github

https://github.com/openacs/openacs-core/commit/b211f20ff219046f975b3fb834ef7c92d05346f6

and look for changes in

postgresql/acs-metadata-create.sql
postgresql/acs-objects-create.sql
etc.

Hope this helps
-gustaf neumann