Output function

From: Uro Gruber <uros(at)sir-mag(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Output function
Date: 2000-12-28 16:21:49
Message-ID: 4517402813.20001228172149@sir-mag.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

This is some function.

CREATE FUNCTION my_func(text) RETURNS text AS '
DECLARE
name TEXT;
lastname TEXT;
BEGIN
name := ''Uros'';
lastname := ''Gruber'';
RETURN ime;
END;
' LANGUAGE 'plpgsql';

Output is like this

my_func
--------
Uros
(1 row)

What i want to do is output like this

name | lastname
------------+------------------
uros | gruber
(1 row)

How can i write this function to return both values?

--
Thanks, Uros

Browse pgsql-general by date

  From Date Subject
Next Message Marc Rassbach 2000-12-28 16:39:27 MD5 use in PL/Perl
Previous Message Adam Rossi 2000-12-28 16:13:31 Re: How I can join between the other database's tables?