Re: PQftable insufficient for primary key determination - Mailing list pgsql-general

From mmc@maruska.dyndns.org (Michal Maruška)
Subject Re: PQftable insufficient for primary key determination
Date
Msg-id m28ydkeedp.fsf@linux11.maruska.tin.it
Whole thread Raw
In response to Re: PQftable insufficient for primary key determination  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PQftable insufficient for primary key determination
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> mmc@maruska.dyndns.org (Michal =?iso-8859-2?q?Maru=B9ka?=) writes:
>> So, my question is: should i look at the code which walks that tree
>> (probably related to the function SendRowDescriptionMessage), or
>> is this code (which provides the distinguishing info) already available?
>
> The problem is you haven't said what it is you want to distinguish.
> Yes, p is the primary key of A ... so then what?
>


hm, i should have written "primary key _value_".

SELECT * from A, A ....

gives a result table like:

p | data | p |data |....
--------------------
1 |  xxx | 2 | yyy | ...


Now you edit the value  'yyy'  and want to commit this change to the DB:

update A set data = 'zzz' where  p = primary-key-value;

How to determine what to use for 'primary-key-value'? The value from the 1st
column (PQftable gives A) or from the 3rd column (PQftable gives A again)?


thanks

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PQftable insufficient for primary key determination
Next
From: Peter Eisentraut
Date:
Subject: Re: moving an installation