how do I get the table name from a query?

Поиск
Список
Период
Сортировка
От Reggie Burnett
Тема how do I get the table name from a query?
Дата
Msg-id 00b001c2c610$ae084870$c600a8c0@endeavor
обсуждение исходный текст
Ответы Re: how do I get the table name from a query?  (Dave Cramer <dave@fastcrypt.com>)
Список pgsql-hackers
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">When using the FE/BE, how do I retrieve the table name for a given column?<span
style="mso-spacerun:yes"> </span>Say I had the following SQL:</span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanstyle="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Select <span class="SpellE">c.id</span>, <span class="SpellE">c.name</span>, <span
class="SpellE">d.phone</span>from Members c, Addresses d where <span class="SpellE">c.id</span> <
200</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">From the docs of the FE/BE, I would see that the fields are named id, name, phone but how do I find
outthe source tables that each field came from?<span style="mso-spacerun:yes">  </span>I need to know this to discover
<spanclass="SpellE">nullability</span> of fields, uniqueness, etc.</span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanstyle="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Thanks</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Reggie</span></font></div>

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Switching connection on the fly
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ECPG, threading and pooling