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 1hS5nq-0003ON-A6 for pgsql-general@arkaria.postgresql.org; Sat, 18 May 2019 20:19:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hS5no-0001Am-Ko for pgsql-general@arkaria.postgresql.org; Sat, 18 May 2019 20:19:32 +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 1hS5no-0001Ae-91 for pgsql-general@lists.postgresql.org; Sat, 18 May 2019 20:19:32 +0000 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hS5nl-0002Wh-Kl for pgsql-general@lists.postgresql.org; Sat, 18 May 2019 20:19:31 +0000 Received: by mail-ot1-x32f.google.com with SMTP id 66so9766591otq.0 for ; Sat, 18 May 2019 13:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=m6aOhbdy26VhtVLuym8n5xmi5U9jPFfa//zgeqfhn3s=; b=T+6F9oOX/ivQ9v7K0fmzBcOHRJr6JWcZPSfz53xwbaGhQcQvL/t+d3Vwr2bN35/MMI YCaH0foNGjHYWumAZohfGCEiBVfPLADEduSnYOxxTQQ5hgYyBQDOqZOaLqx20X82p1O3 JDgSS+fSV/EvdNtohUS7tUaXZFeJwxM8k+ffrh/Or7trbLOSnUWJCzMQrRhu3hcaStzR nTuGW8FX/fGqS0Z0ef3zEL/wGGtCHsvjqGxC/4ZIQt2irnNcMlHFAz5IFMk7zApGmFrI ZXNefKLDCTgjOW0nC4ra/KOH2yhvdwOsNtpQzs3FJpkg4+gGAsuwL+K3OX0mYJfTgsqa eTiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=m6aOhbdy26VhtVLuym8n5xmi5U9jPFfa//zgeqfhn3s=; b=rhBNZwDIQ/U9P4w/IaWVRrVX9HK1Ey61F3q3lLhQjWvRloNOQ4P6dEx0+qUGZaPT/3 CZmrG8QRhlhzB26a62aDblNkV0/oBRDsByPF3oXku751Gx+E24toHlKSjHj9DUo9t63K ZLwPOkM+nlKkFtGTl3EGWqexWQeAa+GVdibunBmhoMXeeaN+9H8m962ihqqcDGBdHau9 R7jXe7AH/y0+jUP63dTJ6kkgXyP3lzd3z8JTo4es4rvAwe5nhsqE/fWFPr0lbggHRUn5 FWA9sKc/qQW7VVMfCvCaKALRaTJBrJ7oWKRIVdh9NrADtP012HR1FVgUE6LDeY2pgQBP vYUA== X-Gm-Message-State: APjAAAWvUnMUJZiGDnU5aVGNlo6F0xc8FTlu7kj3Z8eX5xJMGWhubhLR tKOLBs8K5Lo6aClhNabkGBICphxdOys= X-Google-Smtp-Source: APXvYqzcxxfBJIkUVfGiptWT7MSCUmnrWHjXbF8/PV9lwkXxC/32VF7QQNZPWbmtyhVU5tglf0T83A== X-Received: by 2002:a9d:4b17:: with SMTP id q23mr5004068otf.130.1558210765745; Sat, 18 May 2019 13:19:25 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id x72sm868528oif.50.2019.05.18.13.19.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 May 2019 13:19:24 -0700 (PDT) Subject: Re: bigint out of range To: pgsql-general@lists.postgresql.org References: <20190518093519.2kd6hyw37wcx6qwc@hjp.at> <20190518192703.ml6duizgdyfyetva@hjp.at> From: Ron Message-ID: Date: Sat, 18 May 2019 15:19:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190518192703.ml6duizgdyfyetva@hjp.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/18/19 2:27 PM, Peter J. Holzer wrote: > On 2019-05-18 10:49:53 -0700, David G. Johnston wrote: >> On Saturday, May 18, 2019, Peter J. Holzer wrote: >> >> On 2019-05-16 08:48:51 -0700, David G. Johnston wrote: >> > On Thu, May 16, 2019 at 8:31 AM Daulat Ram >> wrote: >> > >> > >> >     url_hash        | bigint                  |           | not null | >> > >> > >> > Change the type of url_hash; make it text instead of bigint. >> >> Or numeric(38, 0). I think it isn't coincidence that he tries to store >> a 38-digit number in it. >> >> >> You don’t perform math on a hash > That's not generally true. Hashes are used for further computation for > example in hash tables or in cryptography. How is it "using math" to use a hash key in a hash lookup table? -- Angular momentum makes the world go 'round.