Re: pl/pgsql - Mailing list pgsql-general

From Joel Burton
Subject Re: pl/pgsql
Date
Msg-id Pine.LNX.4.21.0104230950230.23833-100000@olympus.scw.org
Whole thread Raw
In response to pl/pgsql  ("Juan" <jcorta@tribctas.gba.gov.ar>)
List pgsql-general
On Mon, 23 Apr 2001, Juan wrote:

> does anyone know where i found documentation about pl/pgsql ?

Documentation is in the Developer's Manual, at www.postgresql.org.

> i have a variable typed date and i need to get day month and year, how can i
> do that?
> e.g:
>
> function test(date)
>   day = day($1);
>   month = month ($1);
>   year = year($1);

You don't need pl/pgsql for this. There are features built-in to
PG for these:

http://postgresql.readysetnet.com/devel-corner/docs/user/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT


--
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington


pgsql-general by date:

Previous
From: "Lark"
Date:
Subject: Can store binary data?
Next
From: Nils Zonneveld
Date:
Subject: Re: install pgSQL 7.1