The Postgresql SQL script should be something like this:
CREATE TABLE "public"."g2_node" (
"nid" BIGINT DEFAULT 0::bigint NOT NULL,
"period" VARCHAR(50),
"complement" TEXT,
"origin" TEXT,
CONSTRAINT "g2_node_pkey" PRIMARY KEY("nid")
) WITH OIDS;
CREATE TABLE "public"."g2_referer" (
"nid" BIGINT DEFAULT 0::bigint NOT NULL,
"referer" VARCHAR(128) DEFAULT ''::character varying NOT NULL,
"incoming" BIGINT DEFAULT 0::bigint NOT NULL,
CONSTRAINT "g2_referer_pkey" PRIMARY KEY("nid", "referer")
) WITH OIDS;
The SQL queries needs some correction, for example
$sq = "SELECT status, count(distinct n.nid) cnt FROM {node} n ";
should be
$sq = "SELECT status, count(distinct n.nid) AS cnt FROM {node} n ";
Comments
Comment #1
fgmHi. Thanks for your suggestion.
As I don't have a PGSQL system available, I suggest you roll up a patch, test it (or ideally have someone else test it), and it will be added to the next version.
Comment #2
Lebowski commentedHello,
Sorry but i don't have skills to make a patch.
This is my third day with Drupal. :)
Comment #3
fgmOK: I suggest you come back to it later when you know Drupal better. I'm marking it postponed until that day, since I don't support PGSQL myself at the moment.
Comment #4
fgmThis should be easier in D6 thanks to the new schema API
Comment #5
fgmD6 branch now exists
Comment #6
fgmThanks to the Schema API abstraction, it should at least install / uninstall properly now.
Time to give it a spin for anyone with G2 on Postresql.
Comment #7
(not verified) commented