Skip to content
Advertisement

Postgresql column reference is ambiguous

I want to call my function but I get this error:

ERROR: column reference “list” is ambiguous LINE 3: SET list = ARRAY_APPEND(list, input_list2),

the error is on the second list inside array_append function.

My function:

Advertisement

Answer

You have to use the alias name in the insert query because list has two references, one reference in EXCLUDED.list and another reference to the column for an update statement.

Please check the below query (I append the alias with name os in query):

Or you can use table name:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement