When trying to create a Views Panes, this error is displayed

warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "panels_views_pvid_seq" does not exist in F:\webs\empresas\includes\database.pgsql.inc on line 125.
.....
.....

Comments

mrlovecraft’s picture

Partly solved by executing this sql sentences at postgresql:

CREATE SEQUENCE panels_views_pvid_seq;
ALTER TABLE panels_views ALTER COLUMN pvid SET DEFAULT nextval('panels_views_pvid_seq');

And changing the sequence owner: (somenthing like this)
ALTER SEQUENCE panels_views_pvid_seq OWNED BY prueba;

Two other warnings appeared:


    * warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "offset" LINE 1: ..., view_type, use_pager, pager_id, nodes_per_page, offset, li... ^ in F:\webs\empresas\includes\database.pgsql.inc on line 125.
    * user warning: query: INSERT INTO panels_views (pvid, view, name, description, title, category, category_weight, view_type, use_pager, pager_id, nodes_per_page, offset, link_to_view, more_link, feed_icons, url_override, url, url_from_panel, contexts, allow_type, allow_nodes_per_page, allow_offset, allow_use_pager, allow_link_to_view, allow_more_link, allow_feed_icons, allow_url_override, allow_url_from_panel) VALUES (1, 'comentarios_de_usuario_por_nodo', 'comentarios_de_usuario_por_nodo', 'Display recent comments block', 'Comentarios recientes', 'Views', -1, 'embed', 0, 0, 10, 0, 0, 0, 0, 0, '', 0, 'a:0:{}', 0, 0, 0, 0, 0, 0, 0, 0, 0) in F:\webs\empresas\includes\database.pgsql.inc on line 144.
mrlovecraft’s picture

The second problem can be solved modifying 'panels_views.module' at line 1109

Change this:
'offset' => array(
to this:
'"offset"' => array(

So, from my point of view, these two issues are solved. Only need to be added to the source code.

sdboyer’s picture

Status: Active » Postponed (maintainer needs more info)

First, http://drupal.org/patch please.

More importantly, though, what version are you using? To the best of my knowledge, this was fixed across these commits:

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/panels/pane...

That means you shouldn't be encountering the issue, unless you're using beta3 or earlier for some reason.

sun’s picture

Status: Postponed (maintainer needs more info) » Fixed

Yes, this has been fixed already.

Gijs’s picture

Strangely, these bugs are still alive. I downloaded 5.x-2.0-beta5 earlier this week and at least this bit of code

'offset' = array(
has not been corrected into
'"offset"' = array(

I get both errors mrlovecraft is reporting on a Debian testing system using postgresql 8.3.3-1 and the latest drupal 5

smk-ka’s picture

Title: Sequence "panels_views_pvid_seq" not created when using Postgresql 8.2.6 » PostgreSQL errors
Status: Fixed » Active

Confirming this bug still exists. The complete error message has never been posted:

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "panels_views_pvid_seq" does not exist in H:\unleashedmind\test\drupal5\includes\database.pgsql.inc on line 125.
    * user warning: query: SELECT nextval('panels_views_pvid_seq') in H:\unleashedmind\test\drupal5\includes\database.pgsql.inc on line 144.
    * warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "offset" LINE 1: ..., view_type, use_pager, pager_id, nodes_per_page, offset, li... ^ in H:\unleashedmind\test\drupal5\includes\database.pgsql.inc on line 125.
    * user warning: query: INSERT INTO panels_views (view, name, description, title, category, category_weight, view_type, use_pager, pager_id, nodes_per_page, offset, link_to_view, more_link, more_text, feed_icons, url_override, url, url_from_panel, contexts, allow_nodes_per_page, allow_offset, allow_use_pager, allow_link_to_view, allow_more_link, allow_more_text, allow_feed_icons, allow_url_override, allow_url_from_panel, pvid) VALUES ('comments_recent', 'comments_recent', 'Display recent comments block', 'Recent comments', 'Views', -1, 'block', 0, 0, 10, 0, 0, 0, '', 0, 0, '', 0, 'a:0:{}', 0, 0, 0, 0, 1, 0, 0, 0, 0, 0) in H:\unleashedmind\test\drupal5\includes\database.pgsql.inc on line 144.

The two issues are:
1. The PostgreSQL part of Drupal differs from the MySQL part in that it does not use the sequence table, but relies on SERIAL columns (the Postgres equivalent to auto_increment). This requires some work on Panels' poorman schema code -or- a nasty hack to execute the CREATE SEQUENCE code mrlovecraft posted in #1.

2. We're currently escaping the column name 'offset' during installation but not in the actual queries.

sdboyer’s picture

Assigned: Unassigned » sdboyer

Oh..bloody hell. OK, I'll get to fixing this as soon as I can for RC1.

esmerel’s picture

Status: Active » Closed (won't fix)

No changes to be made to 2.x code