Re: plpgsql functions organisation

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Yves Dorfsman <yves(at)zioup(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: plpgsql functions organisation
Date: 2015-05-02 19:32:41
Message-ID: 55452659.2030007@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/02/2015 09:53 AM, Yves Dorfsman wrote:
>
> I find my plpgsql functions becomes unreadable very quickly. I want to break
> them up in smaller functions.
>
> What is the best way to organised them?
> Is there any way to define functions inside functions?
> When I list functions in psql, I can see them all at the same level, is there
> any way to organise them in packages like with python and other languages, so
> the smaller functions are hidden away in a package/directory?

The only thing I can think of is to use SCHEMAs;

http://www.postgresql.org/docs/9.4/interactive/sql-createschema.html

>
>
> Thanks.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yves Dorfsman 2015-05-02 19:34:29 Re: plpgsql functions organisation
Previous Message Daniel Verite 2015-05-02 17:57:17 Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?