Created
April 15, 2013 10:23
-
-
Save pschultz/5387172 to your computer and use it in GitHub Desktop.
Postgresql function after ALTER SCHEMA public RENAME to public_copy;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION public.get_locations() | |
RETURNS SETOF public.locations AS | |
$BODY$ | |
DECLARE | |
l_record public.locations; | |
BEGIN | |
FOR l_record IN | |
SELECT * FROM public.locations | |
ORDER BY location_desc | |
LOOP | |
RETURN NEXT l_record; | |
END LOOP; | |
END; | |
$BODY$ | |
LANGUAGE plpgsql VOLATILE SECURITY DEFINER | |
COST 10 | |
ROWS 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION public_copy.get_locations() | |
RETURNS SETOF public_copy.locations AS | |
$BODY$ | |
DECLARE | |
l_record public.locations; | |
BEGIN | |
FOR l_record IN | |
SELECT * FROM public.locations | |
ORDER BY location_desc | |
LOOP | |
RETURN NEXT l_record; | |
END LOOP; | |
END; | |
$BODY$ | |
LANGUAGE plpgsql VOLATILE SECURITY DEFINER | |
COST 10 | |
ROWS 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment