Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elHaX-0006Gj-GL for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 17:08:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elHaV-0004tH-MJ for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 17:08:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1elHaV-0004t5-Eh for pgsql-general@lists.postgresql.org; Mon, 12 Feb 2018 17:08:19 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elHaS-0003Tp-Bm for pgsql-general@postgresql.org; Mon, 12 Feb 2018 17:08:18 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id AC9B020DD4; Mon, 12 Feb 2018 12:08:14 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Mon, 12 Feb 2018 12:08:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=nQfP9Ef+oWlCv5hc3rHDNXmFZCei7 YTXyUYiUAnKtgQ=; b=ijQ8AygH1Tk/dETURraBUZsaoH89o5vVSrVLWeIc+INE5 g0SpkE/8qVyr9THJgA5qkfvAZX1RNBp6k+nPDZWyNP5/Je19jIVm3RN1sWu0nOD4 JVOK8cBQnU36avP+fWv/AgHEx2cpPfsyywsRNu9/OkUlpoASaLzLiSB/rtBuPcqb g0XqKcncY5dQmT45SRpSv2SD3MtedjHK+1tKmXeuP/1g899069fARHlkIOBl8FAG gPJSWRTy8icM4he8eV8dwa1QbiEz6M4X/zBlsWpPOENo3lB+3CaXqDW4c6Eb47GT OeggMmvSQDQjn33IRKqXRYTWhoSLZNNF2HjZyosCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=nQfP9E f+oWlCv5hc3rHDNXmFZCei7YTXyUYiUAnKtgQ=; b=YXxTvTFsOXMJYOpc7qD3zb j63HMdfOXbUOllj8dUd14tRQ9Gs1yI+fM2y4vKXb2DNV5Am1n9fceoN23pCm5b/u JXTx2tR0oL/CEO8FO+SqMKBR9nMSNXIQLcPGFZyIQfVG2tJyPBoXn34xs33xtB8W ompVAqRCrTEmNME4i3UYLK5m4joBW9QQ4fHWhfwmOvsGqfoxKGG9IsXtlqIHt5KB czD2Jb8oXpBAp/eJ1PdQWWzPzmrLaKkgUI59AsHeAO9a2XA6P9tC0IKUNCkI89ok R+EqLsgsOwHFwd31l4TLjttorVMrAoNh3sr9vui6B3We4G4fbQYenaXX1vTFAirA == X-ME-Sender: Received: from [192.168.1.3] (71-212-36-41.tukw.qwest.net [71.212.36.41]) by mail.messagingengine.com (Postfix) with ESMTPA id 27B1E240DB; Mon, 12 Feb 2018 12:08:14 -0500 (EST) Subject: Re: execute block like Firebird does To: PegoraroF10 , pgsql-general@postgresql.org References: <1518328644815-0.post@n3.nabble.com> <9fa5f7c2-b6ca-ccfd-fded-284359f973c4@gelassene-pferde.biz> <1518443301602-0.post@n3.nabble.com> <1518454625970-0.post@n3.nabble.com> From: Adrian Klaver Message-ID: <45ecb017-06af-ed3c-dfdc-be32ce0df924@aklaver.com> Date: Mon, 12 Feb 2018 09:08:13 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1518454625970-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 02/12/2018 08:57 AM, PegoraroF10 wrote: > I know I need to think a different approach of what execute blocks does on > Firebird. > What I was trying to was just let them the way they were wrote, because > their results are correct and with more time replace them to a new way. That may not be necessary. As someone mentioned upstream you maybe able to replace the EXECUTE BLOCK with CREATE OR REPLACE FUNCTION and then do some clean up/additions to the enclosed code. To be more certain about this we would need to see a complete example of one of EXECUTE BLOCKs. If that is possible for security reasons, then a made example that does the same thing. > > But, if that way cannot be used, I´ll probably write some hundred of > functions right now and use them, because this way works for sure. And then, > with more time to spend, I´ll replace them one by one. Why? Once you create the functions and they do the task what is the purpose of replicating them and more to the point how would you? > > > > > > -- > Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html > > -- Adrian Klaver adrian.klaver@aklaver.com