Re: [HACKERS] update_pg_pwd

Поиск
Список
Период
Сортировка
От wieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] update_pg_pwd
Дата
Msg-id m11xTo1-0003kGC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] update_pg_pwd  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Ответы Re: [HACKERS] update_pg_pwd  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] update_pg_pwd  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:

> On Mon, 13 Dec 1999, Jan Wieck wrote:
>
> I'm not sure I'm following you, but why would a function that doesn't have
> a useful return value return one?

    AFTER  ROW  triggers  indeed  have  no  useful  return value,
    because it is ignored for now. But  IMHO  they  still  should
    follow the trigger programming guidelines.

    That means, the declaration should read

        HeapTuple funcname(void);

    Then they should contain

        TriggerData *trigdata;
        ...
        trigdata = CurrentTriggerData;
        CurrentTriggerData = NULL;

    and if they do not want to manipulate the actual action, just
    to get informed that it happened, return

        trigdata->tg_trigtuple;

    I'll make these changes to update_pg_pwd(), now that  I  know
    for sure what it is.

    One last point though. The comment says it's using lower case
    name now to be callable from SQL, what it  isn't  because  of
    it's Opaque return type in pg_proc.

        pgsql=> select update_pg_pwd();
        ERROR:  typeidTypeRelid: Invalid type - oid = 0

    Is  that  a  wanted  (needed)  capability  or should I better
    change the comment to reflect it's real nature?


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Datatype MONEY
Следующее
От: Karel Zak - Zakkr
Дата:
Сообщение: Re: [HACKERS] Datatype MONEY