Learning PostgreSql: polymorphism

Posted by Alexander Kuznetsov on SQL Blog See other posts from SQL Blog or by Alexander Kuznetsov
Published on Tue, 05 Nov 2013 21:17:00 GMT Indexed on 2013/11/06 4:07 UTC
Read the original article Hit count: 541

Filed under:
|
Functions in PL/PgSql are polymorphic, which is very different from T-SQL. Demonstrating polymorphism For example, the second CREATE FUNCTION in the following script does not replace the first function - it creates a second one: CREATE OR REPLACE FUNCTION public .GetQuoteOfTheDay ( someNumber INTEGER ) RETURNS VARCHAR AS $body$ BEGIN RETURN 'Say my name.' ; END ; $body$ LANGUAGE plpgsql ; CREATE OR REPLACE FUNCTION public .GetQuoteOfTheDay ( someNumber REAL ) RETURNS VARCHAR AS $body$ BEGIN RETURN...(read more)

© SQL Blog or respective owner

Related posts about Agile-learning

Related posts about postgresql