https://bugzilla.wikimedia.org/show_bug.cgi?id=51441

       Web browser: ---
            Bug ID: 51441
           Summary: VoteNY not working with Postgresql.
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: VoteNY
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

VoteNY not working with Postgresql.
The vote.sql I have convert to pgsql, now it looks like

-- Postgres Version
-- author: basti

-- set Schemata
SET search_path = mediawiki;

CREATE TABLE vote (
  -- Internal ID to identify between different vote tags on different pages
  vote_id SERIAL NOT NULL PRIMARY KEY,
  -- Username (if any) of the person who voted
  username varchar(255) NOT NULL default '0',
  -- User ID of the person who voted
  vote_user_id integer NOT NULL default '0',
  -- ID of the page where the vote tag is in
  vote_page_id integer NOT NULL default '0',
  -- Value of the vote (ranging from 1 to 5)
  vote_value char(1) NOT NULL default '',
  -- Timestamp when the vote was cast
  vote_date timestamp without time zone NOT NULL,
  -- IP address of the user who voted
  vote_ip varchar(45) NOT NULL default ''
) /*$wgDBTableOptions*/;

CREATE INDEX vote_page_id_index ON vote (vote_page_id);
CREATE INDEX valueidx ON vote (vote_value);
CREATE INDEX usernameidx ON vote (username);
CREATE INDEX vote_date ON vote (vote_date);

Next I try to create a BlogPost by calling Spezial:CreateBlogPost but this
returns

SELECT vote_value FROM "Vote" WHERE vote_page_id = '0' AND username = 'Admin'
LIMIT 1 

The " are too mutch, you can found the code in VoteClass.php line 182 ff.

Then I run 
SET search_path=mediawiki;
SELECT vote_value FROM Vote WHERE vote_page_id = '0' AND username = 'Admin'
LIMIT 1 

in PgAdmin all works fine.

"SET search_path" is normally done by includes/db/DatabasePostgres.php

How can I fix this?
Regards,
Basti

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to