Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n56FO-0001gX-58 for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 13:22:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n56FN-0008Vc-1r for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 13:22:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n56FM-0008VT-Ng for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 13:22:32 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n56FH-0000wJ-Dd for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 13:22:32 +0000 Received: by mail-ed1-x52c.google.com with SMTP id w16so162076808edc.11 for ; Wed, 05 Jan 2022 05:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=hwy2Y9YfI6zcZYnTVyxjVu5AtrUfYa4NsKgU5dm2naA=; b=bCVrbPZB4hIsja7b1kzbtE15uXF0WdBMqms9Yy5M3+LQwUAwaTyFWyRHPOYkvHmFDV PdfbHcCq2GAwJSk3NiuYke5aMtkcP9C6jy15tyNdzcwuSpMDjVUb/WiyMrNSG1gcC06Z 7ufbEOJ1fkWWZNEzIiRqNFOfer2bw/pMowYNFAChKzbCyU2X/8xJKR1V/B4jszhe+kS8 GvkCk5u2LEEQIFpC95uSrx7J0ZqeueJb0+3SF3R0MHxafrrGNqc+3zr+mZh5bSa8ljoh y3cJ2F5Dx8OVOgYCOgu4DGmEOQkbsAV/HF32BncwBPiv0Akls0QQSLp9awCNLv+vVgFb nVCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=hwy2Y9YfI6zcZYnTVyxjVu5AtrUfYa4NsKgU5dm2naA=; b=QqG1iUDicd4WakamRb1cyNweJAASjvZchWp8eSjXtSUgQ1ZNiKV+dCVuMci1jFUXHR rwB2PcPubTrRWh44g39xZwMbIPyJbvyHPaodFf1Y7YQSSK/xqAfKWQiF7tmfY7GsWxkl 39RFvQiyE3glfBnqr2SYnupym7YxFJWxjE/px8za9OOcRJe8y8sKPWV2WT2qYOM/aogJ a+3l7VeDRqw+K4cd+t86tWQP6cuuTS1AcYAwcce5foLtLdKXCFzQ5ghW4t1QTnW8q2it A0vzTXNWYsRyNkenCke6gjHvOnktxQPmsZd31xCE5TTYC1JMKA54dd2Ha8YMGpevJzwx vmAg== X-Gm-Message-State: AOAM530uGnnfeUIc4RROnj4Tlqof3/VtQjQB9zW2AsKyl9J7Cbfp4p7N dyD+S0RMPUfQVBlJIUYPf7DYtlCd/uxnKFozCKKASq7wIGlrww7kyNW/uYuYrBHDT6Q3z2acJKc yhBe3Twb/ye+y2IU8S5reOSrYtQu011sA41+kf/IzHNG3HwiOmkeipo6tiglfP+o1bvuwP2u7xK gQiPyGMPnGQIAc6AYTJ4/5lhAOzDfSQ9VqvwDrkQ+/9bA7Vifck/y3 X-Google-Smtp-Source: ABdhPJxAoZRTajA+1FtT3oagZa/3vUctuwgXLG9szdao9A1cPQxyb75c171vSY21MJYUKskcE2/VnA== X-Received: by 2002:a17:907:d07:: with SMTP id gn7mr43774339ejc.553.1641388944716; Wed, 05 Jan 2022 05:22:24 -0800 (PST) Received: from [10.137.0.18] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id h10sm12124557ejx.115.2022.01.05.05.22.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jan 2022 05:22:24 -0800 (PST) Message-ID: Date: Wed, 5 Jan 2022 14:22:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: Create and access a dictionary type Content-Language: en-US To: Shaozhong SHI , pgsql-general References: From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/5/22 14:17, Shaozhong SHI wrote: > Any examples in Postgres to create a dictionary type to store and access > key value pairs? > I'd say JSONB can be used as an associative array, and e.g. in Python can map to dict data type. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company