Re: Using row_to_json with %ROWTYPE ? - Mailing list pgsql-general

From Tom Lane
Subject Re: Using row_to_json with %ROWTYPE ?
Date
Msg-id 1455.1423180203@sss.pgh.pa.us
Whole thread Raw
In response to Re: Using row_to_json with %ROWTYPE ?  (Tim Smith <randomdev4+postgres@gmail.com>)
List pgsql-general
Tim Smith <randomdev4+postgres@gmail.com> writes:
> Yes, well PostgreSQL is being incredibly unhelpful in that respect, it
> says "(SQLSTATE: 42702  - SQLERRM: column reference "session_id" is
> ambiguous)" ... but that is an utter lie.   There is only one column
> called session_id in my view (in both the view output and the
> underlying view query, there is only one reference to "session_id")

A reasonably likely bet is that the ambiguity is between a column name
exposed by the query and some variable of the same name declared within
the plpgsql function.  But, as has been mentioned repeatedly, you've not
shown us enough detail to permit a positive diagnosis.

            regards, tom lane


pgsql-general by date:

Previous
From: Tim Smith
Date:
Subject: Re: Using row_to_json with %ROWTYPE ?
Next
From: Adrian Klaver
Date:
Subject: Re: Using row_to_json with %ROWTYPE ?