The Open Source Swiss Army Knife

/sql_servers/postgresql/pg_plpgsql/
/sql_servers/postgresql/pg_plpgsql/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /sql_servers   /postgresql   /pg_plpgsql 
Permalink: a_a.sql
Title: add
article options : please login   |  raw source view  

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
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top