Re: Verwendung von numerischen Field-Bezeichnern (PL/PGSQL)

From: Ralf Burger <ralf(at)Burger(dot)AG>
To: Tobias Bußmann <e(dot)t(dot)bussmann(at)ing(dot)twinwave(dot)net>
Cc: pgsql-de-allgemein(at)postgresql(dot)org, pgusers(at)postgres(dot)de
Subject: Re: Verwendung von numerischen Field-Bezeichnern (PL/PGSQL)
Date: 2006-12-19 15:19:44
Message-ID: 45880310.2060506@Burger.AG
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-de-allgemein

Hallo Tobias,

ja, so weit hatte ich das am Rande mitbekommen.
Wer kann nun was tun, damit es weitergeht?
Denn die ToDo-List verweist ja auch nur auf Mitte 2006.

Ich frage aus dem Grund, weil ich eine ziemlich haessliche
Funktionssammlung geschrieben habe, die aus mehreren
Records einer Table oder einen Union nur die sich veraendernden
Werte ausfiltern kann. (Was sehr hilfreich bei einer Fehlersuche
oder bei einer Historyauswertung ist)
Aber durch die Beschraenkungen sind zahlreiche Limits vorhanden.
Denn man kann die Funktionen nicht wirklich dynamisieren und
heraus kommt eine haessliche und riesengrosse Konstruktion....

Das wuerde ich gerne optimieren koennen.

Viele Gruesse
Ralf

>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:55:04 Re: Re: Verwendung von numerischen Field-Bezeichnern
Previous Message Tobias Bußmann 2006-12-19 13:42:56 Re: Verwendung von numerischen Field-Bezeichnern (PL/PGSQL) (was: == Wöchentlicher PostgreSQL Newsletter- December 17 2006 ==)