I've got a nodequeue 2-rc about ready to go, and I just realized that I need the database stuff translated to pgsql. Anyone postgres friendly want to take a crack at patching the .install file?

pgsql

I can test on PgSQL 8.x a little later.

Fixes

A few issues, mostly minor. (Note: 'position', 'timestamp', and 'size' are reserved words and may cause other issues, but I was able to install successfully.)

Using PgSQL 8.2.3.

Line 65: Change from integer to serial, removes the need to CREATE SEQUENCE explicitly.

Line 93: There was a trailing comma after the last definition. This causes PgSQL to choke.

    case 'pgsql':
        db_query("CREATE TABLE {nodequeue_queue} (
          qid serial,
          title varchar(255) NOT NULL,
          size integer default '0',
          owner varchar(255) default 'nodequeue',
          show_in_ui integer default '1',
          show_in_tab integer default '1',
          link varchar(255),
          link_remove varchar(255)
        )");

        db_query("CREATE TABLE {nodequeue_roles} (
          qid integer NOT NULL,
          rid integer
        )");
        db_query("CREATE INDEX {nodequeue_roles}_qid_idx ON {nodequeue_roles} (qid)");
        db_query("CREATE INDEX {nodequeue_roles}_rid_idx ON {nodequeue_roles} (rid)");

        db_query("CREATE TABLE {nodequeue_types} (
          qid integer NOT NULL,
          type varchar(255)
        )");
        db_query("CREATE INDEX {nodequeue_types}_qid_idx ON {nodequeue_types} (qid)");

        db_query("CREATE TABLE {nodequeue_nodes} (
          sqid integer NOT NULL,
          qid integer NOT NULL,
          nid integer,
          position integer,
          timestamp integer NOT NULL default '0'
        )");

        db_query("CREATE INDEX {nodequeue_nodes}_sqid_idx ON {nodequeue_nodes} (sqid, position)");
        db_query("CREATE INDEX {nodequeue_nodes}_nid_idx ON {nodequeue_nodes} (nid)");

      $success = TRUE;
      break;

Needs more testing. Trying

Needs more testing. Trying to add a queue, I get this error:

Query failed: ERROR: column "subqueue_title" of relation "nodequeue_queue" does not exist

Scratch that last comment. I

Scratch that last comment.

I assumed (wrongly) that the existing pgsql matched the mysql. Will rewrite and test again.

Everything is just fine with

Everything is just fine with mysql5! Thanks!:)
And, I was waiting for the final release of nodequeue for days now, when will be released.
I am looking forward to that!

Post new comment

The content of this field is kept private and will not be shown publicly.