Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWSLN-0003T1-T9 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jan 2018 19:35:26 +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 1eWSLN-0005oz-2Z for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jan 2018 19:35:25 +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_2) (envelope-from ) id 1eWSLM-0005op-Ou for pgsql-hackers@lists.postgresql.org; Tue, 02 Jan 2018 19:35:24 +0000 Received: from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eWSLJ-0005T1-Oa for pgsql-hackers@postgresql.org; Tue, 02 Jan 2018 19:35:23 +0000 Received: by mail-yw0-x243.google.com with SMTP id x199so12231679ywg.5 for ; Tue, 02 Jan 2018 11:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=tJBQSzTD3fkI4ADSNC7Fq1Ca2OxyXltfSBufJuwgNg8=; b=w2PPUMvQAQVFqXiS5shRIHjiBY/q1xf2/FeRsAGTYl4CHi6kbiFNZ8HVgybax8Vwbh JCEilV/U+MqdNOnvtvrZBCrOViS/YAi3pfTqJyMd+39yxHG03SRfVy/ShBhbqIuuaJ8x obeD0baY7gnYm3ufNWk1Ie2GGGH+aweleLYSTmCKWQZtTlZFs10Y1LmQ0gRLT1BjKgyn U2Y8SFR5AzRWJpAZsJzuHNdtOdNNPBhCqnhB8UNPQQXf5mEyZiSs59XOv58k+082EctW 1ryiLqZChsi8ObC2ywp92+Zx6kMl6nAYMDL3LJSJPvzXTfkzhs4Ccoc+6c8Psn4ye/OM Ra/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=tJBQSzTD3fkI4ADSNC7Fq1Ca2OxyXltfSBufJuwgNg8=; b=LAoU6AzWEcfz4re65/9kPG++aFfowEI7xM7yUOgFo19tZNX08xHljhHi80tgtnmo7h Mx5SBuI82fzwYbgngP5uRStH4O0m/E0GPvpMet9/eTYD4sxdyxaskAEle6rA9UK7L2NK QLWtw3D+YFRBkvKo9SmEVcTy7pcR1ecU2yUpxNhEUDmAduXkwgJeBPbYAhCzrsgsM+vL h3EpOqBYqCiNi/IeOdN35Q6qMd4QMqLzuOKYohtWufFYjMgFSF/kJdSh4gd4/sI3ijUM C96/LbFp+lEJSW1MUljD/Ro6sbjnXg7OptqYQK1Bew/F4U+qc2DXoRZc8eOFwr5up/tq +PtQ== X-Gm-Message-State: AKGB3mLede44NgaZBYXy6mTiaXrnyyqFcb6ck3dzzxw1wrY06wPTcmvg ohVXNr7vSoqW2iL0dNfqxwo3DFehJZ70Z6Li6FzvRUb3kqyPUkwvKxDcL/iPSjhj106wYz8HclL o0tYmm+pAf8kKhTJBD2ymiQCmFqTUitSTGvVNSbF3SUGh4HAGqY2zfreV0Zapbcx8hTuNnAFHwz ep5DyiRmLYPOMw X-Google-Smtp-Source: ACJfBosM1Z2AS1joZjcjX73eeSkQytlNgOMru9A+glOfMbs6cNW3cilpRDMXcWsgzZjZl8S62IKzyg== X-Received: by 10.129.165.20 with SMTP id c20mr33281314ywh.484.1514921720623; Tue, 02 Jan 2018 11:35:20 -0800 (PST) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id u10sm4010589ywu.48.2018.01.02.11.35.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 11:35:20 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: [HACKERS] SQL procedures To: Robert Haas Cc: Tom Lane , Peter Eisentraut , pgsql-hackers References: <336f6926-8990-ff2d-4167-276ce417fc32@2ndquadrant.com> <9388.1509474184@sss.pgh.pa.us> <11024.1514911665@sss.pgh.pa.us> <9a7b749f-6df1-0977-1bf2-0669770df7af@2ndQuadrant.com> Message-ID: Date: Tue, 2 Jan 2018 14:35:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 01/02/2018 02:14 PM, Robert Haas wrote: > On Tue, Jan 2, 2018 at 1:57 PM, Andrew Dunstan > wrote: >> Yeah, but these things don't feel like they belong in the same category. >> The fact that we have to ask this question is a symptom of that. > Well, that's got to be asked about any representation we choose - that > question is the motivation for not liking the use of prorettype for > this purpose, so it's only fair to ask whether any alternative has the > same problem. I think there's broad agreement about not liking use of prorettype for this purpose. > >> A >> boolean feels more natural to me here, although I acknowledge it will >> result in a tiny amount of catalog bloat. Tom's point about client-side >> code is also valid. I don't feel very strongly about it, though. > I think the catalog bloat is too minor to care about, but if these > things really are mutually exclusive, it's more natural to have them > use a single flag character rather than a series of Booleans. > Otherwise, it may be unclear to the casual observer (or hacker) that > at most one of the Booleans can be true, possibly leading to user > confusion (or bugs). Fair point. I don't recall if we discussed anything like this when window functions were introduced. > > It's pretty well impossible to introduce new features without > occasionally changing the catalog representation. We had several > people grumble when I replaced relistemp with relpersistence, and we > (rightly, IMHO) told those people to suck it up and deal. I don't > think we should react any differently here. I recognize that it's a > pain, but it's not that much of a pain, and it may even be helpful to > tool authors who actually need to handle procedures differently than > functions, which is probably a lot of them. pgAdmin for example seems > like it will certainly need to care. I agree. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services