Re: Upsert error "column reference is ambiguous"

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Tim Starling <tstarling(at)wikimedia(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Upsert error "column reference is ambiguous"
Date: 2025-04-28 23:01:23
Message-ID: B9138622-2F17-4F70-B397-11176948FB2C@thebuild.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Apr 28, 2025, at 15:58, Christophe Pettus <xof(at)thebuild(dot)com> wrote:
> It does require knowing which of the VALUES is the key value being inserted (pseudocode syntax above) [...]

The instant after I hit send, I realized that information is available to the function by lining up the $names and $values array, since the name of the key column is passed in.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-04-29 06:36:14 Re: Upsert error "column reference is ambiguous"
Previous Message Christophe Pettus 2025-04-28 22:58:42 Re: Upsert error "column reference is ambiguous"