Re: Functions have 32 args limt ??? - Mailing list pgsql-general

From Ivar
Subject Re: Functions have 32 args limt ???
Date
Msg-id bil2op$69k$1@sea.gmane.org
Whole thread Raw
In response to Functions have 32 args limt ???  ("Ivar" <ivar@lumisoft.ee>)
Responses Re: Functions have 32 args limt ???  (Dennis Gearon <gearond@fireserve.net>)
List pgsql-general
It all depends what soft are you doing.

There is for example material card function.
It it designed so bad that it has more than 32 ars.
Why must split this function if behind UI I use it as single function for
adding updateing material ???

CREATE OR REPLACE FUNCTION
wpr_M_I_MaterialCard_Doc(int,varchar,varchar,varchar,varchar,boolean,boolean
,boolean,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar,var
char,varchar,varchar,varchar,numeric,varchar,numeric,numeric,numeric,numeric
,numeric,numeric,boolean,boolean,boolean,varchar,varchar,varchar,numeric)
 RETURNS void AS '
DECLARE


 @DocAction         ALIAS FOR $1;
                                -- 1 - Load Document
                                -- 2 - Update Header
                                -- 3 - New Document
                                -- 4 - Document Delete
 @SessionID         ALIAS FOR $2;  -- Session ID
 @LockID            ALIAS FOR $3;  -- Lock ID
 @Lang              ALIAS FOR $4;  -- Language
 @DocID             ALIAS FOR $5;  -- Material Parameter ID
 @AltG              ALIAS FOR $6;  -- 1 kui valitakse Funtsionaalse
Grupeeringu alusel
 @NoData            ALIAS FOR $7;  -- 1, Kui eii vC�ljastata andmeid
 @ProductUpd        ALIAS FOR $8;  -- 1, Kui avatakse korrigeerimiseks
tootekirjelduse alt

 @StocCode          ALIAS FOR $9;  -- Ladu
 @MainGroupCode     ALIAS FOR $10;  -- PeaGrupp
 @SubGroupCode      ALIAS FOR $11;  -- AlaGrupp
 @ExtraGroupCode    ALIAS FOR $12;  -- TC�iendav Grupp
 @AltMainGroupCode  ALIAS FOR $13;  -- Funtsionnalne PeaGrupp
 @AltSubGroupCode   ALIAS FOR $14;  -- Funtsionnalne AlaGrupp
 @AltExtraGroupCode ALIAS FOR $15;  -- Funtsionnalne TC�iendav Grupp
 @MatCode           ALIAS FOR $16;  -- Kood
 @Suffix            ALIAS FOR $17;  -- Positsioon
 @BarCode           ALIAS FOR $18;  -- Triipkood
 @MatName           ALIAS FOR $19;  -- Nimetus
 @MeasureUnit       ALIAS FOR $20;  -- MŨŨtC�hik
 @InPackage         ALIAS FOR $21;  -- C�hikut Pakis
 @CurrencyCode      ALIAS FOR $22;  -- Valuuta
 @EtalonPrice       ALIAS FOR $23;  -- EtalonHind
 @Discount          ALIAS FOR $24;  -- Soodustus
 @NullPrice         ALIAS FOR $25;  -- NullHind
 @NullPrice_VAT     ALIAS FOR $26;  -- NullHind KM-ga
 @CostPlusPercent   ALIAS FOR $27;  -- Juurdehindlus %
 @VATPercent        ALIAS FOR $28;  -- KC�ibemaksu %
 @NotInPriceList    ALIAS FOR $29;  -- 1, Kui ei kuulu hinnakirja
 @Closed            ALIAS FOR $30;  -- 1, Kui on Suletud
 @Product           ALIAS FOR $31;  -- 1, Kui on Toode
 @Warranty          ALIAS FOR $32;  -- Garantii tekst
 @Info              ALIAS FOR $33;  -- Info
 @MatDebit          ALIAS FOR $34;  -- Materjali Konto
 @KASTIS            ALIAS FOR $35;  --,@KASTIS   numeric(18,3) =NULL   --
C�hikut Kastis (Konteineris)
BEGIN

"Dennis Gearon" <gearond@fireserve.net> wrote in message
news:3F4E0C5F.40804@fireserve.net...
> Ivar wrote:
>
> >I don't see why default is so small.
> >
> >"Joe Conway" <mail@joeconway.com> wrote in message
> >news:3F4D8DE0.1060307@joeconway.com...
> >
> >
> >>Ivar wrote:
> >>
> >>
> >>>For my supprise I found that functions have 32 parameter limit.
> >>>
> >>>Where to find more info about this limitation or similar limitations ?
> >>>
> >>>I need at least 50, 100 would be ok.
> >>>
> >>>
> >>See INDEX_MAX_KEYS defined in src/include/pg_config.h.in
> >>(pg_config_manual.h in postgres 7.4). Change to 64 or whatever and
> >>recompile. But note that you'll need to dump, initdb, and reload your
> >>data. Also note that there are performance and disk usage tradeoffs --
> >>search the mailing list archives from August 2002 for some test results
> >>and discussion.
> >>
> >>Joe
> >>
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 9: the planner will ignore your desire to choose an index scan if
your
> >>      joining column's datatypes do not match
> >>
> >>
> >>
> >
> >
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 4: Don't 'kill -9' the postmaster
> >
> >
> >
> 32 is small? I've never designed a function with more than 12-18, at teh
> MOST, arguments.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>



pgsql-general by date:

Previous
From: Alex
Date:
Subject: Date Time Function / Age
Next
From: J.Henning@t-online.de
Date:
Subject: Re: Database recovery after fs crash