Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGa8j-0008PG-4L for pgsql-sql@arkaria.postgresql.org; Fri, 02 Jun 2017 00:08:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dGa8i-0005T4-I5 for pgsql-sql@arkaria.postgresql.org; Fri, 02 Jun 2017 00:08:28 +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 1dGa7j-0003iq-In for pgsql-sql@postgresql.org; Fri, 02 Jun 2017 00:07:28 +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.84_2) (envelope-from ) id 1dGa7f-0001yG-Fj for pgsql-sql@postgresql.org; Fri, 02 Jun 2017 00:07:27 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0618F20CBE; Thu, 1 Jun 2017 20:07:22 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Thu, 01 Jun 2017 20:07:22 -0400 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:x-sasl-enc; s=fm1; bh=ACca09z1oClY4Tr9kV y0lELQRIPJQPydNHzjdhrZBQM=; b=Oh7M+02Prx/LrNshkj4Odgyt1CcJ/GFLX2 L4RfSbCs9+AsPWbWSTH46dBzGkTNp4+335BMVmjHHYMlkKcDlVEPzp/D+hhZPVpp czrtLop19Tkif87cUcUkyx3M1Xr4Vi7IQPzxLjz0LnrY3rVgXOpxBR0WLkt7cAU8 skIF9+TT0WZzgaHuvrHBFZXGX+Z3bwbO56Nmin5YghylmRdhPQXDUp1Cq+09YciQ EIYS/wNcq6DyYnOek/7ioUBBVZ0n/ZZVaLcDgiRbVkBMDJjReUIqzfxwTaE6zHEB 11iWMjW+WosyOq+JSmJqWVZ4mCu8JFgIhISEvv99NYmt6Uj7Uf8A== 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:x-sasl-enc; s= fm1; bh=ACca09z1oClY4Tr9kVy0lELQRIPJQPydNHzjdhrZBQM=; b=riPxuUC3 IpVbAZG5tpUa5h5zz3NWEmZTUcfhZ8UfyWxRdMuy0Gx5pk6Le5k644+jli4OwoLr piZnefmiy2dD4wB1Am6bAEHD2BCtbPvDFegbTU81OegqGgelgPMj4GelvHN0SL0E yd7zb5SdQi4M/zgrv8E8s+pYEnlLZ+YI0CAckWwjTJ11LTxIMRPhKeHp/bbyHZsS R774jcBFeox0tkhsxcCWJSFMMKCVPfHJXAZAvIs8Skx8aNrZltIAstkG65XeJIT8 0fjT51Oz79rxA/+N4IciQ2Hs9NTThErtdM08jiuUovTX8C9pKNu4zdOToJxEMmhT W3ybfQOZNjXwoA== X-ME-Sender: X-Sasl-enc: 97zq7Pk2bspgnexHAw1LguiDp7o6WaL5Sc0yLoen4ITm 1496362041 Received: from [192.168.1.2] (75-172-126-41.tukw.qwest.net [75.172.126.41]) by mail.messagingengine.com (Postfix) with ESMTPA id 7F898240F6; Thu, 1 Jun 2017 20:07:21 -0400 (EDT) Subject: Re: YNT: Re: Can the result sets produced in SQL procedures be left open for the use of the calling program? To: gulsumramazanoglu , pgsql-sql@postgresql.org References: From: Adrian Klaver Message-ID: <8d64d537-82c6-3675-8694-f73f8aadfa52@aklaver.com> Date: Thu, 1 Jun 2017 17:07:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 06/01/2017 03:51 PM, gulsumramazanoglu wrote: > Adrian thank you for your prompt reply and enlightening info.. though i > need to read the sql document thorougly, but for now i just looked at > the CREATE FUNCTION command and its compatibility note at the end, and > saw that there is an iso standard (and also a cross-platform) > compatibility issue.. actually it seems none of the databases provide > full compatibility for this command (and for more) i think.. is there > any other way of writing sql scripts (say functions, procedures..) which > will provide compatibility with iso standards and other db.s? I want to > write backend stuff in functions and also stick to the standards.. Short answer: No Long answer: Full cross compatibility is a myth for anything but an extremely simple use case and very few applications stay at this stage. If you want to keep logic in the database you will end up writing to that database's implementation of the standard and how it creates/use functions. This is one of the reasons 3-tier architecture was developed: https://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture So a middle layer between the UI and the database where business logic resides. Even that falls down when you start making use of database specific features. In that case the logic layer grows an adaption layer to deal with various databases. Your best bet is to pick a database you really want to use and build against that. Then if you want to use other databases, convert what is needed. From the posts that hit the various pgsql* lists that will be time consuming. There are tools that can help, for example moving from Oracle and MySQL to Postgres: http://ora2pg.darold.net/ It still needs a good deal of oversight on the part of the developer. > > Maybe i should ask more specifically: say for instance i want to send > some input data to the function and wait for a result set depending on > those parameters (inputs).. may i code such a function in a compatible > way with iso standards and make it cross-platform as well? > Maybe a too naive question, but still i want to ask.. See above. > > Thanks again.. > > Samsung cihazımdan gönderildi > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql