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 1n595r-0001T1-Cw for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 16:24:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n595q-0001bU-5Z for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 16:24:54 +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 1n595p-0001bJ-Px for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 16:24:53 +0000 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n595n-0002Lt-Lt for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 16:24:53 +0000 Received: by mail-oi1-x234.google.com with SMTP id s73so65308808oie.5 for ; Wed, 05 Jan 2022 08:24:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=2yNrvMtqAVxGtba5bgD5JEjj/vAYE62Lj7fa34u+X3I=; b=WKI+26RBtahYhBquXY4iGd494pB/H37j0DdeNR3btjMQyAYytT6TQfmVatekhplt9C 96wcUijmOdhikXnh/ftJZY3XvhUiU8ZnhWh0WwWhkJ9/e3wlSUEzjOvtRSG3nA3N/QIS fq/PDYBxuhSANV1OCp1qId1lFscjRWQcPzLLiGR/Czu3oJsBjDYmDkoo3hW2qtmAhuqc umRx0TdnA/HkBkt07VAC4RinHBtJ2W8TgtdEJ2bvPoPWfCaKyo0+YUaHci7dMbg3tz6e bD3NYvkdSvk7MRodjon9ZOj9oll/biN3LS6BQgkfsGhExO1DFU2bbBmSQEvMmmUNL38h MKtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=2yNrvMtqAVxGtba5bgD5JEjj/vAYE62Lj7fa34u+X3I=; b=3z3yElZF6ELO/IlW8wUQWKeDgX8W68xYB53pnq7gaFA9UvAtb7tddo9sHj/UYMRxca it6sMspvbT6tRUexuRdQuBM3pVLrd4xvuF9AZ0sdgfHPHjxbzH+/lrDduE1Z54oH8aA4 crMM6W1ilm1kkkHbcarOa6Ea4E0V/1KdiXZX4H/samLqIJ3x39F33tPr0uKQX6qI8RPJ vbHotm7Fsn2Em19fRzjwkLxrPuVYYIFfWZzZw8MELmOS9/DRNm9gSCsmrAmpdHVNgYRf 49IAiVdcWVY2zZfiz0d22yGnBxs1kaPzRNe8X1vUX+8RsWCuJoHZO9UHXC/EJthytMZl WldA== X-Gm-Message-State: AOAM533ElYbW2zOCyMd7OleO0gQt2Wbby2iROJF+4GMYSECtfoCMpHcu v9pwOfEx58+NZZqZ+4dm+Ta8omRku34= X-Google-Smtp-Source: ABdhPJyNmj8PLuBLy6TCLldbuD7PryEjFyy7f9Igoq9eYS1Y5oIKpqhYNARSWlmKwUp0yFz8c2jcBg== X-Received: by 2002:a54:4803:: with SMTP id j3mr3335338oij.176.1641399889223; Wed, 05 Jan 2022 08:24:49 -0800 (PST) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id x11sm7242630oot.20.2022.01.05.08.24.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jan 2022 08:24:48 -0800 (PST) Subject: Re: Create and access a dictionary type To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Wed, 5 Jan 2022 10:24:47 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: 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: Archived-At: Precedence: bulk On 1/5/22 7:22 AM, Tomas Vondra wrote: > 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. The question confuses me.  Why isn't "create a table with Primary Key" the answer to "Any examples in Postgres to create a dictionary type to store and access key value pairs?" -- Angular momentum makes the world go 'round.