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?
Posted by Ken Rickard (not verified) on Mon Sep 3, 2007 7:12 am.
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)");
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 existScratch that last comment. I
Scratch that last comment.
I assumed (wrongly) that the existing pgsql matched the mysql. Will rewrite and test again.
Post new comment