Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 0D3921179B44 for ; Wed, 6 Jun 2012 12:27:57 -0300 (ADT) Received: from nm10-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.140]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1ScI9L-0003xY-4O for pgsql-sql@postgresql.org; Wed, 06 Jun 2012 15:27:56 +0000 Received: from [98.138.90.54] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 06 Jun 2012 15:27:41 -0000 Received: from [98.138.88.234] by tm7.bullet.mail.ne1.yahoo.com with NNFMP; 06 Jun 2012 15:27:41 -0000 Received: from [127.0.0.1] by omp1034.mail.ne1.yahoo.com with NNFMP; 06 Jun 2012 15:27:41 -0000 X-Yahoo-Newman-Id: 459635.39609.bm@omp1034.mail.ne1.yahoo.com Received: (qmail 51275 invoked from network); 6 Jun 2012 15:27:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=d/ZZ+sZqM/FYMjhUwU0usfODPLxBQeKLpOTz4s80+fHixzEqyeLxkc/YESlG1zoDJWsvTUOA8JabE0GYZD84aC3vAB6m+J2hMuFdl0BmCbR3qmSk7is8DfN4O7cMZhLqCTmCB/eDYX82UAdzkeif6ri/0uNHByOVMqMNdhTxo7A= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1338996461; bh=chiTpItkO+CNGTzl5zbTedZqpi8a+bSa7PNLOTDHPwY=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=x3N5AVndr67br/QFrts3k25qX9DmjFuGaRiav3xLLvpbKLDA+vhdB4QNFIpc2vBUN26hHCUFtoXD9SooU7Cb0Oq9MdmBZIqoWS94pWrREQFN5cpwP3Uv95oXxmSJ5aLdY86Kil5GWm3324vyoxnTXE+LwE7sLybEuj+NUSYw0YM= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: YP5pzbAVM1mzqnsXDBySZJu3zndKoNRn_6SnKgDt5p1joza AGl41iPnf8qz2rh6F9UXwMys7XF5cwIfyP2GjHH4JoN7nv9sEBE18dAOkUOA CU9qr9.Vpms4SX4D5NuCPLLbaRh7xy1dDUvQjMu_ILo7NoVbHNobBIcpnEuB IHZEujr2Bo_73XP_if2zywkZVyyD2Q98IxBNluBqOUbEJtEx5aePdNNiXn24 3cx9V8XW8gSwNbBJtIFcRt0j_ZDqPpWeHfhKJ5klbLNwBpymLibpI3V40hE0 akl6Pos_UahTqNZeHpsa7kRPnktDSQoRoaPjIXlQl6ae80zj0lZW6pPYM34F JgESlGO4tTmJ.L.3UhYKdwxQ0Sb3G_dg0T8Q.c02SitkoL4o_aanXUQeWp8q CaViaJned7yRE3Wa6aOoMsaqKsddYSnEjIvoBttboDb68GH4Bgvqih7UEDEa GS7DNytzRbm_xxE.u3Epm0cEIcKwmbSm8TCjPfgXQmM9cx6_7hwwfnMZfT10 O2fwKODvJDu5vbNEwGDrqXZZ1Q3W. X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from [192.12.17.102] (polobo@24.93.23.188 with xymcookie) by smtp111-mob.biz.mail.ne1.yahoo.com with SMTP; 06 Jun 2012 08:27:40 -0700 PDT References: <4FCF7255.8070002@jfcomputer.com> In-Reply-To: <4FCF7255.8070002@jfcomputer.com> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <51DDFD64-F1F6-478D-AAE2-4456AACD0601@yahoo.com> Cc: "pgsql-sql@postgresql.org" X-Mailer: iPad Mail (9B206) From: David Johnston Subject: Re: defaults in a function Date: Wed, 6 Jun 2012 11:27:40 -0400 To: "johnf@jfcomputer.com" X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201206/24 X-Sequence-Number: 36678 On Jun 6, 2012, at 11:08, John Fabiani wrote: > Hi, > In python when I create a method/function is set a default value for a pas= sed value if one is not provided. >=20 > def foo(self, event =3D None): >=20 > In the above function if the second value is not passed a value of None is= used as the default. >=20 > Is this possible with plpgsql??? >=20 > Johnf >=20 http://www.postgresql.org/docs/9.0/interactive/sql-createfunction.html ... param_n type DEFAULT value OR ... param_n type =3D value It is SQL DDL syntax and not specific to the language the function is writte= n in. David J.