Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAEj3-0003fb-7v for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Nov 2017 12:36:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eAEj2-0001ex-Ki for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Nov 2017 12:36:00 +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 1eAEj1-0001dy-G0 for pgsql-hackers@postgresql.org; Thu, 02 Nov 2017 12:35:59 +0000 Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eAEiy-0006jV-9f for pgsql-hackers@postgresql.org; Thu, 02 Nov 2017 12:35:58 +0000 Received: by mail-oi0-x235.google.com with SMTP id v9so8478600oif.13 for ; Thu, 02 Nov 2017 05:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MAlvxCrnE6qDwJqxRdCDyDJ1K0XrQpmHI7qzAEoc8Qg=; b=VBf8+pungTA10gvKpckznWVAHxdaXSOIA+usC8UXL5BNLk6XK31P/sooWnEiB4+5G9 lzgE6enAw2lDe/v8qGpCk5fYMhnTOYt/fcf5LwYu0l+TqUPkw1JYGdavSA/PBsKcjndL 2mDh0nEYwLkHkZceE5h88UFKxbweOy6tTBCSRLIs1HOovNmhlSl045pWYjTH7PPrjMkg Rw7156AIM+njnzcqYF4x3Aye0MXFifOfqB/CWz5RYD5FIfevTkbzOvqY4sLMOkSmU4wx xRA1PpSVdhGJcwpHdLM8ojanZ+2RTBA79AC4t85HrrRrsRyk0Fm5SaUxNtMAWlz+CwDO 3T7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MAlvxCrnE6qDwJqxRdCDyDJ1K0XrQpmHI7qzAEoc8Qg=; b=O7K2VPgGQ/CxsgUPEButzt9p/KYJicY3H8I1/T/mMJoouXfraz0P1B9OWefDMY31f6 TiADpFpg8sLEe4n8fGIuLGZhCY923h1KrYy059snZZ5c9nkoZphAi+SME3PTERhu/TSi st7heDLU3z8mAtDABMeideyfNBjnrchkdXbNZku+tPrKc+7xY7bNvUtTcmJA3RZowxc7 rXfjdCEXUsrwETAYhQWfaRhC4Vh5KrV6BPafwFvQwQNBtXW59mvl757etigtAlbvKE3g 9BGstt0gvzSlvxNCNzPmSZbrHwkxvrWshrDWlmPK5L0naNjefy2F2VBjuwuXhmJ2mxJI PUrA== X-Gm-Message-State: AJaThX5oFbFfRGugbanxES3YKA0Bhhvk1QLCzepjs88Jv2H/a0pKCqe7 pEQn7Enf1Cc9JygKu+ZA7B+VEz4y+K88ZjLya60= X-Google-Smtp-Source: ABhQp+RVb1jdjsjLTF5e4q1PN3oK2kCNNvVuIAtDY7zeubUMROJ8MfRB6BD9QztA83dX8fhU7B7FNOvvGWCERw+rTiQ= X-Received: by 10.157.48.130 with SMTP id s2mr1904676otc.418.1509626155679; Thu, 02 Nov 2017 05:35:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.144.195 with HTTP; Thu, 2 Nov 2017 05:35:54 -0700 (PDT) In-Reply-To: References: From: Robert Haas Date: Thu, 2 Nov 2017 18:05:54 +0530 Message-ID: Subject: Re: proposal: schema variables To: Pavel Stehule Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Thu, Oct 26, 2017 at 12:51 PM, Pavel Stehule wrote: > The variables can be modified by SQL command SET (this is taken from > standard, and it natural) > > SET varname = expression; Overloading SET to handle both variables and GUCs seems likely to create problems, possibly including security problems. For example, maybe a security-definer function could leave behind variables to trick the calling code into failing to set GUCs that it intended to set. Or maybe creating a variable at the wrong time will just break things randomly. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers