Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aViI0-0002cY-T4 for pgsql-general@arkaria.postgresql.org; Tue, 16 Feb 2016 16:15:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aViI0-0003tQ-Ek for pgsql-general@arkaria.postgresql.org; Tue, 16 Feb 2016 16:15:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aViHz-0003tC-OL for pgsql-general@postgresql.org; Tue, 16 Feb 2016 16:15:47 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aViHw-0003oB-74 for pgsql-general@postgresql.org; Tue, 16 Feb 2016 16:15:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20140207; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date; bh=sOcz2vLpRsyad4Gj3iDHc7hbfYr4aEUKO2BA3B6yB94=; b=dPxMcti9GTx6z1LHbgooQ570rX 8JJxQjT0rE1OfT1vYgeGdcECEzXKUGp5/B0KiTg0oX2/el1Co5XIVzAk+71n/1JGwChktqKkkCwZn yq7QNdLOyCVqo4xAp82QMvD9z; Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.86) (envelope-from ) id 1aViHr-0001pD-Jl; Tue, 16 Feb 2016 17:15:39 +0100 Date: Tue, 16 Feb 2016 17:15:39 +0100 From: hubert depesz lubaczewski To: pgsql-general@postgresql.org Cc: Suresh Raja Subject: Re: [SQL] refer function name by a variable in the function body Message-ID: <20160216161539.GB5441@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On Tue, Feb 16, 2016 at 09:41:18AM -0600, Suresh Raja wrote: > I use the function name in the body of pgsql code of the same function. Is > the function name set to any variable that i can easily reference. Now I'm > hard coding the function name in the code. > In the above Raise info i use select user to get the login role, similarly > can i use a variable for function name which is automatically set by the > system. There is no such variable, unfortunately. Also, please don't cross-post to multiple lists - replied only to -general, as the question is not about sql language. Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general