pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Hengky Lie <hengkyliwandouw@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Need help with CASE statement in Function
Date: Wed, 3 Oct 2007 10:07:25 -0700 (PDT)
Message-ID: <282657.3138.qm@web31808.mail.mud.yahoo.com> (raw)
In-Reply-To: <000d01c805dc$9e8db450$1d00a8c0@hengky>

--- Hengky Lie <hengkyliwandouw@gmail.com> wrote:
> My Question is : How to make argument 4 optional ? When IS NULL the function
> will show all transaction between date $1 and $2 and product ID=$3 

Could you simply overload your function by having two functions?  One with arguement 4 and one
without?

Regards,
Richard Broersma Jr.



view thread (3+ messages)

Message-ID: <282657.3138.qm@web31808.mail.mud.yahoo.com>
Permalink:  ../282657.3138.qm@web31808.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/282657.3138.qm@web31808.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rabroersma@yahoo.com, hengkyliwandouw@gmail.com
  Subject: Re: Need help with CASE statement in Function
  In-Reply-To: <282657.3138.qm@web31808.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox