X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 91A909DC9E9 for ; Sun, 29 Jan 2006 11:15:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15027-08 for ; Sun, 29 Jan 2006 11:15:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by postgresql.org (Postfix) with ESMTP id 36F3E9DC9B4 for ; Sun, 29 Jan 2006 11:15:18 -0400 (AST) Received: from lythanhphu ([66.130.233.129]) by VL-MH-MR002.ip.videotron.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0ITV004G811MRG90@VL-MH-MR002.ip.videotron.ca> for pgsql-sql@postgresql.org; Sun, 29 Jan 2006 10:15:22 -0500 (EST) Date: Sun, 29 Jan 2006 15:15:21 -0500 From: Daniel CAUNE Subject: Function with default value? To: pgsql-sql@postgresql.org Message-id: <0ITV004G911MRG90@VL-MH-MR002.ip.videotron.ca> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Content-type: multipart/alternative; boundary="Boundary_(ID_1aw+CbvBP+JeBRy/cNTvIQ)" Thread-index: AcYlELrTBHMhOH+GR4mpQIr7wcibVA== X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.458 required=5 tests=[AWL=-0.550, DATE_IN_FUTURE_03_06=2.007, HTML_MESSAGE=0.001] X-Spam-Score: 1.458 X-Spam-Level: * X-Archive-Number: 200601/205 X-Sequence-Number: 23994 This is a multi-part message in MIME format. --Boundary_(ID_1aw+CbvBP+JeBRy/cNTvIQ) Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Hi, =20 Is it possible to define a function with some default values? =20 CREATE OR REPLACE FUNCTION foo(i IN int, j IN int DEFAULT :=3D 1) =E2=80=A6 =20 Anyway, I didn=E2=80=99t find such a feature described in the PostgreSQL = 8.1 documentation, but sometimes, that doesn=E2=80=99t mean that the = feature doesn=E2=80=99t exist! :-) =20 Thanks, =20 =20 Daniel --Boundary_(ID_1aw+CbvBP+JeBRy/cNTvIQ) Content-type: text/html; charset=utf-8 Content-transfer-encoding: quoted-printable

Hi,

 

Is it possible to define a function with some = default values?

 

CREATE OR REPLACE FUNCTION foo(i IN int, j IN = int DEFAULT :=3D 1)

=E2=80=A6

 

Anyway, I didn=E2=80=99t find such a feature = described in the PostgreSQL 8.1 documentation, but sometimes, that doesn=E2=80=99t mean = that the feature doesn=E2=80=99t exist! J

 

Thanks,

 

 

Daniel

--Boundary_(ID_1aw+CbvBP+JeBRy/cNTvIQ)--