The Information Schema vs the PG Catalog
От | Ken Winter |
---|---|
Тема | The Information Schema vs the PG Catalog |
Дата | |
Msg-id | 001801c607ee$0dbed960$6603a8c0@kenxp обсуждение исходный текст |
Список | pgsql-sql |
<div class="Section1"><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">I’m writing PL/pgSQL routines that generate triggers, functions, and rules based on design characteristicsof tables, columns, and other database objects. These routines need to be able to look up the definitionsof these objects. I see that there are two places available to look up this info: the Information Schema andin the PG Catalog. </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana"> </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">Which source is preferable? Or if that answer isn’t absolute, what are the reasons or conditions forpreferring one over the other? </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana"> </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">Also, a specific question: Does the Information Schema offer any way to list the sequences that existand their attributes? I can’t seem to find any.</span></font><p class="MsoNormal"><font face="Verdana" size="2"><spanstyle="font-size:10.0pt; font-family:Verdana"> </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">~ TIA</span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">~ Ken</span></font></div>
В списке pgsql-sql по дате отправления: