pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: johnf@jfcomputer.com <johnf@jfcomputer.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: defaults in a function
Date: Wed, 6 Jun 2012 11:27:40 -0400
Message-ID: <51DDFD64-F1F6-478D-AAE2-4456AACD0601@yahoo.com> (raw)
In-Reply-To: <4FCF7255.8070002@jfcomputer.com>
References: <4FCF7255.8070002@jfcomputer.com>

On Jun 6, 2012, at 11:08, John Fabiani <johnf@jfcomputer.com> wrote:

> Hi,
> In python when I create a method/function is set a default value for a passed value if one is not provided.
> 
> def foo(self, event = None):
> 
> In the above function if the second value is not passed a value of None is used as the default.
> 
> Is this possible with plpgsql???
> 
> Johnf
> 

http://www.postgresql.org/docs/9.0/interactive/sql-createfunction.html

... param_n type DEFAULT value
OR
... param_n type = value

It is SQL DDL syntax and not specific to the language the function is written in.

David J.





view thread (2+ messages)

Message-ID: <51DDFD64-F1F6-478D-AAE2-4456AACD0601@yahoo.com>
Permalink:  ../51DDFD64-F1F6-478D-AAE2-4456AACD0601@yahoo.com/
Also on:    postgresql.org/message-id/51DDFD64-F1F6-478D-AAE2-4456AACD0601@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: polobo@yahoo.com, johnf@jfcomputer.com
  Subject: Re: defaults in a function
  In-Reply-To: <51DDFD64-F1F6-478D-AAE2-4456AACD0601@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