Skip site navigation (1) Skip section navigation (2)

pl/pgsql function problem

From: David Mulcahy <eseol(at)mersinet(dot)co(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: pl/pgsql function problem
Date: 2001-09-07 13:09:36
Message-ID: 3B98C710.61807699@mersinet.co.uk (view raw or flat)
Thread:
Lists: pgsql-novice
I am having problems doing what seems to be a very simple thing.  All I
need is to join 2 or more variables (eg char, int, date) and return them
as a single varchar variable.

eg ret := int + char + date; or better still join("+", int,char,date)
return ret;

some additional info.  I have read in the documentation that you can
concat with the || operator.  However because one or more of the
variables may be empty this seems not to work.  If one of the variables
is empty nothing is returned.

Please can anyone help.

Thanks in advance David Mulcahy.

Responses

pgsql-novice by date

Next:From: Andrew McMillanDate: 2001-09-07 23:06:45
Subject: Re: pl/pgsql function problem
Previous:From: Bo LorentsenDate: 2001-09-07 06:15:15
Subject: Re: pl/pgsql recursion/arrays (fwd)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group