Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tWGDn-00FLwf-IQ for pgsql-general@arkaria.postgresql.org; Fri, 10 Jan 2025 14:42:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tWGDm-00GzdK-0y for pgsql-general@arkaria.postgresql.org; Fri, 10 Jan 2025 14:42:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tWGAX-00GuNN-P6 for pgsql-general@lists.postgresql.org; Fri, 10 Jan 2025 14:39:25 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tWGAU-000vAv-2c for pgsql-general@lists.postgresql.org; Fri, 10 Jan 2025 14:39:25 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-5f321876499so1009895eaf.1 for ; Fri, 10 Jan 2025 06:39:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736519961; x=1737124761; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Cz4UH/TIfZmDA/dGMTzyIMCRVX8sL4K4UBzE1fydf2c=; b=eHw2R1vphLON39gJ8UpxkzPzHKydSBCGuLvTptnfKFyw4KzEI9eangTGzXcxR+3OuP poXBSk5oFK/k8YDE0R/3DEtnwjj84GbkUfx7EumjjkK8UvqGH8GK2BZJo7pJwW73vVe/ n/oXze+Z/Xcvw4kJ25wfvZN8tLZJ32Ed7EdwUVUKQ7ZCk8WS2VyF8yMSFdoi2eLmzhg0 rb6YfU7Yay90hDsy8YXqp2CAE7BQ23IPJ7pOftb3mgRVkCHliHZ3YRPQ4fkTcmiTxx5S SvZYrSJBW6Bidd762wivBtFb5XiyluKpB4FnQe5m6lfNPORdpgYa05xLEVOYam4LtkV2 7ovA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736519961; x=1737124761; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Cz4UH/TIfZmDA/dGMTzyIMCRVX8sL4K4UBzE1fydf2c=; b=UMd3ivAjPvgr3OzC0CueQkx1ZlPFX11y6skAjUkoTgvsKGMU8vmWRtzJDRsBQOLH9D awwmWFmn7NL2coWuHR7P3FMK25FbshFOaksjkdqDU7hwy9c0oLZbyV7xxr1CKocFqssZ lB4RC9k5C+s+0w7gVLjUUeWUyxZzgfqxUOPIloVpOa24+JWGsixZ9mBY0qtdme6PI3HE GUV1a0JsabtKazI1AEFDPH9CvauAI5E+CudILFHpR5nMhE7mTIsrTFfAub6YaWeFum32 P8rsB68PlAh/bf5KYsNHPmPANo57I4ad5gaRvYK7umA3HeEDemBjX4GFrdnL/5ncDJro OYyQ== X-Forwarded-Encrypted: i=1; AJvYcCUiEbX/h6bXtKY0E8QEh/dd8nlxhDw9MFIazJseu6y526E3HWxrksyqYPOiqEAHUkBnLfQ3FhPFnzFo/NQS@lists.postgresql.org X-Gm-Message-State: AOJu0YwYOgYgu3AYFaH71MTDxpyF1W6Hhx2/dtcui9Yr9BhLi7yFmMHK JxuRo0Gv++vyvPtgQOp20gd068PJ7g7dba5Havo5OlO6N3u38WL/5nYR1J1HH+RjjUbF4XZ5lds 1cDjaVOTtDui3Hhhoz7f9mHIYWUI= X-Gm-Gg: ASbGncvvS/OEXLmP917oW3IqalFayKl+MnFkrTg4p6G864vwpn9yjDRJPABHOkyvnDm cPH9pEI0oF1fK2PUdWjN/LSLJpx3i58saJf66qg0= X-Google-Smtp-Source: AGHT+IFRIoJD4aKSpMVfwuxqrrGoP9oXjioP7hI63RLtukpMz+neC8vSyX88sQlYt5xRBqMee9+zZ+3z2P45lZ2pypE= X-Received: by 2002:a05:6870:3311:b0:29e:74fa:b7c with SMTP id 586e51a60fabf-2ad80796869mr4173223fac.8.1736519961429; Fri, 10 Jan 2025 06:39:21 -0800 (PST) MIME-Version: 1.0 References: <1309d698-fa5f-493e-809a-fd6d95d913b6@manitou-mail.org> In-Reply-To: <1309d698-fa5f-493e-809a-fd6d95d913b6@manitou-mail.org> From: Ron Johnson Date: Fri, 10 Jan 2025 09:39:10 -0500 X-Gm-Features: AbW1kvYz-lvE8_J8TgN2DJysi15zbnaDT5GuqC26_9Atzdfl5kr5TrBHJwjsIyk Message-ID: Subject: Re: Display Bytea field To: Daniel Verite Cc: Andy Hartman , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000072542c062b5b0f34" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000072542c062b5b0f34 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 10, 2025 at 7:49=E2=80=AFAM Daniel Verite wrote: [snip] > Alternatively, you could compare image checksums before and > after moving them into postgres. The advantage is that you > don't need to export or view any file, and you compare globally > all your images. If the checksums are identical, the data are identical. > On the MSSQL side, checksums can be computed with hashbytes() > as suggested in this stackoverflow answer: [3] > On the postgres side, use functions like md5() or sha256() > directly on the bytea column. > This is what I did when migrating Oracle xLOB columns to bytea. Had to use upper(md5()). I didn't suggest this earlier, since I don't know the details of MSSQL's Image data type. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --00000000000072542c062b5b0f34 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jan 10, 2025 at 7:49=E2=80=AFAM D= aniel Verite <daniel@manitou-= mail.org> wrote:
[snip]=C2=A0
Alternatively, you could compare image checksums before and
after moving them into postgres. The advantage is that you
don't need to export or view any file, and you compare globally
all your images. If the checksums are identical, the data are identical. On the MSSQL side, checksums can be computed with hashbytes()
as suggested in this stackoverflow answer: [3]
On the postgres side, use functions like md5() or sha256()
directly on the bytea column.

This is w= hat I did when migrating Oracle xLOB columns to bytea.=C2=A0 Had to use upp= er(md5()).

I didn't suggest this earlier, sinc= e I don't know the details of MSSQL's Image data type.
--
Death to <Redacted&g= t;, and butter sauce.
Don't boil me, I'm still alive.
<= div><Redacted> lobster!
--00000000000072542c062b5b0f34--