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

--- Comment #11 from Andrew Ruthven <[email protected]> 2012-03-06 21:12:40 UTC 
---
The error in comment #4 was fixed in r111256.

Jeroen, did you test r113147 against PostgreSQL?  It doesn't work for me.  The
error from Pg is:

user=wikiuser,db=wikidb ERROR:  column "smw_tmp_unusedprops" does not exist at
character 59
user=wikiuser,db=wikidb QUERY:  SELECT  EXISTS(SELECT NULL FROM pg_tables WHERE
tablename="smw_tmp_unusedprops" AND schemaname = ANY (current_schemas(true)))


user=wikiuser,db=wikidb CONTEXT:  PL/pgSQL function
"create_smw_tmp_unusedprops" line 1 at IF
user=wikiuser,db=wikidb STATEMENT:  CREATE /*
SMWSQLStore2::getUnusedPropertiesSpecial Andrew */ OR REPLACE FUNCTION
create_smw_tmp_unusedprops() RETURNS void AS $$ BEGIN  IF EXISTS(SELECT NULL
FROM pg_tables WHERE tablename="smw_tmp_unusedprops" AND schemaname = ANY
(current_schemas(true)))  THEN DELETE FROM "smw_tmp_unusedprops";  ELSE  
CREATE TEMPORARY TABLE "smw_tmp_unusedprops" ( title text );  END IF; END; $$
LANGUAGE 'plpgsql'; SELECT create_smw_tmp_unusedprops(); 

This is because single quotes and double quotes have different meanings in
PostgreSQL. In this case smw_tmp_unusedprops needs to have single quotes around
it to refer to be treated as a string, double quotes means it is a column. The
patch as I supplied does the right thing "TM". :)

I'd suggest that the error in comment #5 is an unrelated error.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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