Re: How do I check for NULL

2025-12-08 Thread Igor Korot
Hi, Davd, On Mon, Dec 8, 2025 at 6:44 PM David G. Johnston wrote: > > On Monday, December 8, 2025, Igor Korot wrote: >> >> >> However,, I'd like to still insert the record and I'd like to do something >> like: >> >> INSERT INTO test VALUES( 0, 'abc', 12345, IF( (SELECT foo FROM bar) == >> NULL,

Re: How do I check for NULL

2025-12-08 Thread Ron Johnson
On Mon, Dec 8, 2025 at 9:51 PM Ron Johnson wrote: > On Mon, Dec 8, 2025 at 9:40 PM Igor Korot wrote: > >> Hi, ALL, >> Consider the following scenario: >> >> CREATE TABLE test(a INT, b VARCHAR(256), c INT, d VARCHAR(256), /* >> more fields follows*/); >> CREATE UNIQUE INDEX test_x( b, c, d ); >>

Re: How do I check for NULL

2025-12-08 Thread Ron Johnson
On Mon, Dec 8, 2025 at 9:40 PM Igor Korot wrote: > Hi, ALL, > Consider the following scenario: > > CREATE TABLE test(a INT, b VARCHAR(256), c INT, d VARCHAR(256), /* > more fields follows*/); > CREATE UNIQUE INDEX test_x( b, c, d ); > > Now I try to do: > > INSERT INTO test VALUES( 0, 'abc', 1234

Re: How do I check for NULL

2025-12-08 Thread David G. Johnston
On Monday, December 8, 2025, Igor Korot wrote: > > > However,, I'd like to still insert the record and I'd like to do something > like: > > INSERT INTO test VALUES( 0, 'abc', 12345, IF( (SELECT foo FROM bar) == > NULL, "postgres", ), /*more data follow*/); > > What would be the best way to achieve

How do I check for NULL

2025-12-08 Thread Igor Korot
Hi, ALL, Consider the following scenario: CREATE TABLE test(a INT, b VARCHAR(256), c INT, d VARCHAR(256), /* more fields follows*/); CREATE UNIQUE INDEX test_x( b, c, d ); Now I try to do: INSERT INTO test VALUES( 0, 'abc', 12345, (SELECT foo FROM bar), /*more data follow*/); My problem is: Th

Help needed debugging a storage issue

2025-12-08 Thread Tudor Zaharia
Hi, my name is Tudor and I am one of the maintainers of PGlite - PostgreSQL in WASM. I am doing a major refactoring of our codebase and I am a bit stuck in the last step of initdb. IIUC, my problem is related to the storage layer. I see this in the logs: 2025-12-08 21:38:42.741 +01 [42] WARNING

Advent of Code Day 8

2025-12-08 Thread Bernice Southey
Hi, Is anyone else doing AoC in postgres this year? I've solved today's part 1 and 2 with a brute force loop, but there must be better ways. If anyone found something clever in postgres, please give me a big hint. https://adventofcode.com/2025/day/8 Thanks, Bernice