Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hyN0s-0007Lu-EQ for pgsql-general@arkaria.postgresql.org; Thu, 15 Aug 2019 21:10:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hyN0p-00018P-HR for pgsql-general@arkaria.postgresql.org; Thu, 15 Aug 2019 21:10:23 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hyN0n-00011f-Hh for pgsql-general@lists.postgresql.org; Thu, 15 Aug 2019 21:10:23 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hyN0f-0000z2-DB for pgsql-general@postgresql.org; Thu, 15 Aug 2019 21:10:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7973D22195; Thu, 15 Aug 2019 17:09:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 15 Aug 2019 17:09:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=k r7k2gDRC6BTflyojvVfsmGfLNHjzXj3bbaZWA2toaY=; b=PPXc0B+tYJil+031s f9MtYlXjlJq/5JTeEYz5eazxdvo2orApTx3+Iew+BMCz6QAlx6Df50titkZsRsei hJhnkqkQ4CuRQSrNTMm6omliv8F47gVfYm/HgU+nsAhPn2C9uhCbGvR4T2Ppo5pe CIjXujQSlBNckYFHekQlSvPWPswLhGWsH2Lv6SXz6YatgAnMGsf7k0/77Rdl3EDa bXinVp7tBlhz5Fu67Gqhvjl0pf85EqKlrPi9GSGkTbgSGmI4fBzTTnkGOfgrtTZ5 Uoz8ijdXWP6kZuD9zXUuzlrWEzbc9YaNkr2Y5tTDWgz+vcWgSBg55bc6O0rEMXYC CnzPg== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=kr7k2gDRC6BTflyojvVfsmGfLNHjzXj3bbaZWA2to aY=; b=MqEWDL03XSwvRXE0EIpoRYlCvSgvVwbl+ZYKD+8ugBu/icL1Cp9iXEc1b PpGRByN+yYjBjJQ/xC4uXucRt5z2Cj0yCVT2KFq8947UK2rxCs4v0evLFv/imGOM TgNo0PKf72UUytgsYqoVll2u5EjXZK3e3cchOiy3emCTNdfjlbW+0Vd/VmjwavLD E6uOdo85DnTEXty+Pi07VY8bIzDVy5C8JfvsbrSk4SeaXbyK1jUTcxoZ+zpYiSk6 UW8EkH5QUh/zttZjXwQxMnyfS6w1rUO2gKHk8pSqIvbiUbHVL2j964CWoAv4p72+ GuZFgKI/Pc29ODGztuJxDjTGx4zkw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudefuddgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ejredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucfkphepudejvddrheekrdelhedrle einecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhl rghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from ranger.suse (unknown [172.58.95.96]) by mail.messagingengine.com (Postfix) with ESMTPA id 6F76D380087; Thu, 15 Aug 2019 17:09:49 -0400 (EDT) Subject: Re: Variable constants ? To: stan , pgsql-general@postgresql.org References: <20190815205657.GA2593@panix.com> From: Adrian Klaver Message-ID: Date: Thu, 15 Aug 2019 14:09:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190815205657.GA2593@panix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 8/15/19 1:56 PM, stan wrote: > I need to put a few bossiness constants, such as a labor rate multiplier in an > application. I am adverse to hard coding these things. The best plan i have > come up with so far is to store them in a table, which would have only 1 > row, and a column for each needed constant. > > Anyone have a better way to do this? Another way(better in eye of beholder) a conf file that can be written to. > > Failing a better way is there some way I can limit this table to only allow > one row to exist? Yes add the row and REVOKE INSERT afterwards. Then you have a single row that can be updated/deleted(though you could revoke that also). > > -- Adrian Klaver adrian.klaver@aklaver.com