Author: poeml Date: Thu Jan 2 01:44:14 2014 New Revision: 8306 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8306&view=rev Log: sql schema: remove obsolete quotes around language names on function declarations ('plpgsql' -> plpgsql; 'SQL' -> SQL) PostgreSQL 9.2 errors out on them. Modified: trunk/sql/migrations/schema-postgresql-upgrade-2.6-2.7.sql trunk/sql/schema-postgresql.sql Modified: trunk/sql/migrations/schema-postgresql-upgrade-2.6-2.7.sql URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/sql/migrations/schema-postgresql-upgrade-2.6-2.7.sql?rev=8306&r1=8305&r2=8306&view=diff ============================================================================== --- trunk/sql/migrations/schema-postgresql-upgrade-2.6-2.7.sql (original) +++ trunk/sql/migrations/schema-postgresql-upgrade-2.6-2.7.sql Thu Jan 2 01:44:14 2014 _at_@ -24,7 +24,7 @@ return 1; END IF; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; -- remove a mirror from the list of mirrors where a file was seen _at_@ -53,7 +53,7 @@ RETURN 1; END IF; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; -- check whether a given mirror is known to have a file (id) _at_@ -67,7 +67,7 @@ END IF; RETURN false; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; -- check whether a given mirror is known to have a file (name) CREATE OR REPLACE FUNCTION mirr_hasfile_byname(arg_serverid integer, arg_path text) RETURNS boolean AS $$ _at_@ -80,7 +80,7 @@ END IF; RETURN false; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION mirr_add_bypath(arg_serverid integer, arg_path text) RETURNS integer AS $$ _at_@ -114,13 +114,13 @@ SELECT into fileid mirr_add_bypath(arg_serverid, arg_path); RETURN fileid; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION mirr_get_name(integer) RETURNS text AS ' SELECT identifier FROM server WHERE id=$1 -' LANGUAGE 'SQL'; +' LANGUAGE SQL; CREATE OR REPLACE FUNCTION mirr_get_name(ids smallint[]) RETURNS text[] AS $$ _at_@ -133,7 +133,7 @@ ); RETURN names; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; -- now, fill the new database by scanning Modified: trunk/sql/schema-postgresql.sql URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/sql/schema-postgresql.sql?rev=8306&r1=8305&r2=8306&view=diff ============================================================================== --- trunk/sql/schema-postgresql.sql (original) +++ trunk/sql/schema-postgresql.sql Thu Jan 2 01:44:14 2014 _at_@ -160,7 +160,7 @@ return 1; END IF; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; -- remove a mirror from the list of mirrors where a file was seen _at_@ -189,7 +189,7 @@ RETURN 1; END IF; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; -- check whether a given mirror is known to have a file (id) _at_@ -203,7 +203,7 @@ END IF; RETURN false; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; -- check whether a given mirror is known to have a file (name) CREATE OR REPLACE FUNCTION mirr_hasfile_byname(arg_serverid integer, arg_path text) RETURNS boolean AS $$ _at_@ -216,7 +216,7 @@ END IF; RETURN false; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION mirr_add_bypath(arg_serverid integer, arg_path text) RETURNS integer AS $$ _at_@ -250,13 +250,13 @@ SELECT into fileid mirr_add_bypath(arg_serverid, arg_path); RETURN fileid; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION mirr_get_name(integer) RETURNS text AS ' SELECT identifier FROM server WHERE id=$1 -' LANGUAGE 'SQL'; +' LANGUAGE SQL; CREATE OR REPLACE FUNCTION mirr_get_name(ids smallint[]) RETURNS text[] AS $$ _at_@ -269,16 +269,16 @@ ); RETURN names; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION mirr_get_nfiles(integer) RETURNS bigint AS ' SELECT count(*) FROM filearr WHERE $1 = ANY(mirrors) -' LANGUAGE 'SQL'; +' LANGUAGE SQL; CREATE OR REPLACE FUNCTION mirr_get_nfiles(text) RETURNS bigint AS ' SELECT count(*) FROM filearr WHERE (SELECT id from server where identifier = $1) = ANY(mirrors) -' LANGUAGE 'SQL'; +' LANGUAGE SQL; -- -------------------------------------------------------- _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Thu Jan 02 2014 - 00:44:18 GMT
This archive was generated by hypermail 2.3.0 : Thu Jan 02 2014 - 00:47:06 GMT