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 1pmLoT-0003VB-L5 for pgsql-general@arkaria.postgresql.org; Tue, 11 Apr 2023 21:46:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmLoS-0005IG-I1 for pgsql-general@arkaria.postgresql.org; Tue, 11 Apr 2023 21:46:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmLoS-0005I4-7c for pgsql-general@lists.postgresql.org; Tue, 11 Apr 2023 21:46:04 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pmLoQ-0008Vg-AX for pgsql-general@lists.postgresql.org; Tue, 11 Apr 2023 21:46:03 +0000 Received: by mail-pj1-x1034.google.com with SMTP id q15-20020a17090a2dcf00b0023efab0e3bfso12459179pjm.3 for ; Tue, 11 Apr 2023 14:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681249561; x=1683841561; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BQ+T34+8ebqeVQ22PbKMV29HvDLfFayMAQDPH7uTTLc=; b=Z1Sk5spu8z+MPe1YAE/svDuE7Wjg6d9dc/tET/sxu3Sf5xvHhmxIbfjEuQnl0vwEBo egh96FRCLQexju0gNLVp8VFd0VmYLSEjHCT+zbFs4Iy6GpkA/Ooh7l2qU76DT2LeBhtx GQqwZexpdac2OtX+O8+UZNjgM83l4OksgR9XZdHvlPhkxD5GiZRgtvXackG5wDXfEA35 IZAJSa4+IdUJw+aL6M01meJz5cJgZRHoI6Y6gVGqvtAloB4x0zpBg8ikr93xi5u7jpWa SYaxsBaCtsFG5Af3qXJ8/6Rzw9TJXCaYEWMfhdmDOMZ7SKBbnVst11AviWpBiV1NB+Rv SS/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681249561; x=1683841561; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BQ+T34+8ebqeVQ22PbKMV29HvDLfFayMAQDPH7uTTLc=; b=D/ToPJYImREPl2BluLugxFgbXcffUCB6oQZMvD3J1vEJC4l1g4OjSCL90jIvQipnus uu2TvYoyPptRtIupvUlcxVdKWyJwyYdjFWBUAT4cua2r/CBpTtZGFIHbDybXv8YIqh5z vwgwT4519slBcmjQBQDCvmwE4ZWWAp/J50TG5V3Lw/qqycIEFEZqtLSCV7eZVAKeT4Rd U26/3yNfN0hemKmW6cfkCizNEYfuaf44N1SC8Bxd8hNh8y7FrvEVkN6uBFiSVovJ0PqP BTxsVB2ESIUxHsEQEJoxhdNtZo2YhhXkECpxx/alrHzFhoaEpK/oJdAExZRTynsxYP7l td4w== X-Gm-Message-State: AAQBX9eiR5DaUSZWdxTzU9PCxg0aFN6UtqINA+hLQAlBFd1kdOClyfx3 ElQV0HO1bany3h5+iOnUYgg= X-Google-Smtp-Source: AKy350bj7zvhou4p05J5BbgTlsvJel9QKT8f62zbe8Op3QDo6o7xrYx5VW8zgTZKbt/PGRjbHzvZlA== X-Received: by 2002:a05:6a20:bb25:b0:cc:63c6:8d3a with SMTP id fc37-20020a056a20bb2500b000cc63c68d3amr3667300pzb.41.1681249561407; Tue, 11 Apr 2023 14:46:01 -0700 (PDT) Received: from ?IPV6:2601:681:5a00:f790:a423:c98:f7d5:55ad? ([2601:681:5a00:f790:a423:c98:f7d5:55ad]) by smtp.gmail.com with ESMTPSA id z62-20020a636541000000b00502f20aa4desm8846449pgb.70.2023.04.11.14.46.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Apr 2023 14:46:00 -0700 (PDT) Message-ID: <961adda9-4eb1-79f6-ee8f-9440a520ac15@gmail.com> Date: Tue, 11 Apr 2023 15:45:59 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: Guidance on INSERT RETURNING order Content-Language: en-CA To: Federico Cc: pgsql-general@lists.postgresql.org References: <95fbd8c8-2f7a-38a1-4a41-b2ac3763d89c@aklaver.com> <6644419d-50e1-97c9-5507-b6915bec96fa@gmail.com> From: Rob Sargent In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> Can your client retain a hashmap of md5,data pairings, allowing the >> lookup on the way back using the returned data and supplied id? >> > When using unique columns or similar, that's something that is done, > but if there are no unique columns in the value no match can be done > reliably with the source data, since sqlalchemy is a library that > allows arbitrary schemas to be generated. > > Thanks for the reply, > Federico So you're returned data is not what was sent to the server? Otherwise it should generate the same md5, as I understand it. Identical data would of course be a problem.