Re: pg_stat_reset round 3

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_stat_reset round 3
Date: 2002-08-06 06:02:06
Message-ID: 200208060602.g76626f12672@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Interesting that all callable function must return a type. I did:

test=> select proname from pg_proc where prorettype = 0;

and none of the functions with 0 prorettype can be called from psql. I
guess boolean is the best we can do. I guess because it is a function
it has to return something.

---------------------------------------------------------------------------

Christopher Kings-Lynne wrote:
> OK, I've attached a new patch where the function is marked volatile. I
> tested and you cannot have the function returning void, so I left it
> returning boolean.
>
> Chris
>
> > -----Original Message-----
> > From: pgsql-patches-owner(at)postgresql(dot)org
> > [mailto:pgsql-patches-owner(at)postgresql(dot)org]On Behalf Of Christopher
> > Kings-Lynne
> > Sent: Monday, 5 August 2002 4:00 PM
> > To: Neil Conway
> > Cc: Patches
> > Subject: Re: [PATCHES] pg_stat_reset round 2
> >
> >
> > > It should be marked volatile (rather than stable), as it has
> > > side-effects.
> >
> > OK, I'll fix it.
> >
> > > Wouldn't PG_RETURN_VOID() be more appropriate than returning true?
> >
> > I was under the impression that functions used in SELECTs cannot use
> > PG_RETURN_VOID()...
> >
> > Chris
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-08-06 06:02:16 Re: pg_stat_reset round 3
Previous Message Tatsuo Ishii 2002-08-06 05:55:04 SQL99 CONVERT() function