|
|||||
| | |||||
SET search_path = public;
CREATE or replace FUNCTION a_b (text) RETURNS text AS '
DECLARE
-- Declare aliases for function arguments.
location_in ALIAS FOR $1;
username text;
password text;
BEGIN
-- This SELECT INTO statement retrieves the ISBN number of the row in
-- the editions table that had both the book ID number and edition number
-- that were provided as function arguments.
SELECT into username 1 FROM public;
-- Check to see if the ISBN number retrieved is NULL. This will
-- happen if there is not an existing book with both the ID number
-- and edition number specified in the function arguments. If the
-- ISBN is null, the function returns a value of -1 and ends.
return username;
END;
' LANGUAGE 'plpgsql';
| Leave a Reply |