Re: Verwendung von numerischen Field-Bezeichnern (PL/PGSQL) (was: == Wöchentlicher PostgreSQL Newsletter- December 17 2006 ==)

From: Tobias Bußmann <e(dot)t(dot)bussmann(at)ing(dot)twinwave(dot)net>
To: <pgsql-de-allgemein(at)postgresql(dot)org>, <pgusers(at)postgres(dot)de>
Subject: Re: Verwendung von numerischen Field-Bezeichnern (PL/PGSQL) (was: == Wöchentlicher PostgreSQL Newsletter- December 17 2006 ==)
Date: 2006-12-19 13:42:56
Message-ID: 290501c72373$a09eee90$0164a8c0@LaptopTB
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-de-allgemein

Hallo Ralf,
habe auch keine wiklich aktuellen Infos, aber anbei ein Auszug einer Mail
von mir zu diesem Thema, die den Stand gegen Ende Juli 2006 wiederspiegelt.
Wäre wirklich schön von dieser Front mal von updates zu hören...

Tobias Bußmann <t(dot)bussmann(at)gmx(dot)net> wrote:
> Just to give you a short impression of what the patch is for and what
> has happened to it:
>
> The patch made it possible to analyze the internal structure of the
> currently a bit half-hearted implemented datatype 'RECORD' as it is
> used for example in trigger procedures in PL/pgSQL. You could get the
> count and names of the fields, their datatypes etc. With this it is -
> amongst others - possible to to write generic trigger procedures
> which e.g. loop through all the fields of a NEW-record to set all
> empty VarChars to NULL and trim them otherwise. Such a generic
> trigger procedure could be bound to all tables which need such a
> behavior. Currently without such a functionality you have to write
> individual trigger procedures for every single table enumerating the
> individual field names (or you could use an other Procedural Language
> for that task)
>
> The Patch was developed from Titus von Boxberg and discussed in July
> 05 at the pgsql-patches list [1]. It was accepted and put to the
> patches_hold for inclusion in 8.2. This was the time I posted the
> request to the backports project. In May / June 06 the patch was
> adopted and applied to the current HEAD cvs [2]. After this it was
> rejected and reverted by Tom Lane because of it (supposed) bad
> quality [3]. The author later investigated and wrote a posting
> stating that the patch is already running fine in different
> environments and has a good quality [4]. Currently we have it as a
> entry in the ToDo list [5].
[...]
> [1] http://archives.postgresql.org/pgsql-patches/2005-07/msg00603.php
> [2] http://archives.postgresql.org/pgsql-patches/2006-05/msg00295.php
> [3] http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php
> [4] http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php
> [5] http://www.postgresql.org/docs/faqs.TODO.html (in the middle of
> the page at SQL Commands - Server-Side Languages - PL/pgSQL)

Gruß
Tobias

Ralf Burger <ralf(at)Burger(dot)AG> wrote:
> Hallo zusammen,
>
> weiss zufaellig jemand hier, was aus dem Plan geworden ist,
> Felder innerhalb eines Records (PL/PGSQL) auch numerisch
> anzusprechen?
> Damit also sowas wie das hier moeglich wird:
>
> foo=rec.(1)||rec.(2);
> oder
> bar=rec.(f);
> f=f+1;
> bar=bar||rec.(f);
>
> Es gab da mal einen Patch, der dann wohl nach langen
> Diskussionen wieder in der Versenkung verschwand.
>
> Hat jemand Infos ?
>
> Viele Gruesse
> Ralf

In response to

Responses

Browse pgsql-de-allgemein by date

  From Date Subject
Next Message Ralf Burger 2006-12-19 15:19:44 Re: Verwendung von numerischen Field-Bezeichnern (PL/PGSQL)
Previous Message Ralf Burger 2006-12-19 11:11:35 Verwendung von numerischen Field-Bezeichnern (PL/PGSQL)