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

Re: defaults in a function

From: David Johnston <polobo(at)yahoo(dot)com>
To: "johnf(at)jfcomputer(dot)com" <johnf(at)jfcomputer(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: defaults in a function
Date: 2012-06-06 15:27:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Jun 6, 2012, at 11:08, John Fabiani <johnf(at)jfcomputer(dot)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

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

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

David J.

In response to

pgsql-sql by date

Next:From: John FabianiDate: 2012-06-07 23:17:34
Subject: using ordinal_position
Previous:From: John FabianiDate: 2012-06-06 15:08:05
Subject: defaults in a function

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