pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Jie Liang <jliang@ipinc.com>
To: Andreas Tille <tillea@rki.de>
Cc: PostgreSQL SQL <pgsql-sql@hub.org>
Subject: Re: Re: Order by in stored functions
Date: Tue, 05 Sep 2000 10:53:22 -0700
Message-ID: <39B53311.5979F4C5@ipinc.com> (raw)
References: <Pine.LNX.4.21.0009050823500.3065-100000@wr-linux02.rki.de>
Hi,
My experience is when you involoved that you have to use some CONTROL
LANGUAGE
such as LOOP, IF ... ELSE ... or value transfer (use variables), then using
function, otherwise
using view, temp table...
In Postgres, function is another way to store procedure.
Andreas Tille wrote:
> On Mon, 4 Sep 2000, Tom Lane wrote:
>
> > This is a bug that has already been fixed in current sources: the check
> > that makes sure your select produces only one varchar column is
> > mistakenly counting the hidden IdSort column that's needed to sort by.
> Is there any patch against 7.0.2 sources which might help me (or the
> Debian package maintainer out?
>
> > I don't know of any good workaround in 7.0, short of patching the
> > erroneous code. Have you thought about using a view, rather than a
> > function returning set?
> I could try that.
>
> Is there any general advise for more or less beginners like me regarding
> when to use views and when to use functions?
>
> Kind regards
>
> Andreas.
--
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang@ipinc.com
www.ipinc.com
view thread (4+ messages)
Message-ID: <39B53311.5979F4C5@ipinc.com> Permalink: ../39B53311.5979F4C5@ipinc.com/ Also on: postgresql.org/message-id/39B53311.5979F4C5@ipinc.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-sql@postgresql.org Cc: jliang@ipinc.com, tillea@rki.de, pgsql-sql@hub.org Subject: Re: Order by in stored functions In-Reply-To: <39B53311.5979F4C5@ipinc.com> References: <Pine.LNX.4.21.0009050823500.3065-100000@wr-linux02.rki.de> <39B53311.5979F4C5@ipinc.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox