Re: SHOW TABLES

Поиск
Список
Период
Сортировка
От Hans-Jürgen Schönig
Тема Re: SHOW TABLES
Дата
Msg-id 93A7509E-5ACB-4992-9B3E-1273DBA53B15@cybertec.at
обсуждение исходный текст
Ответ на Re: SHOW TABLES  (Thom Brown <thombrown@gmail.com>)
Список pgsql-hackers
On Jul 15, 2010, at 6:20 PM, Thom Brown wrote:

> On 15 July 2010 17:16, Marc G. Fournier <scrappy@hub.org> wrote:
>> On Thu, 15 Jul 2010, Thom Brown wrote:
>>
>>> On 15 July 2010 17:07, Marc G. Fournier <scrappy@hub.org> wrote:
>>>>
>>>> On Thu, 15 Jul 2010, Thom Brown wrote:
>>>>
>>>>> If it's only a psql problem, why implement it as SQL?  Is it just so
>>>>> we're
>>>>> not adding keywords specifically to psql?  In that case, it shouldn't
>>>>> support QUIT.
>>>>
>>>> Personally, I think this is somethign that should go into the backend ...
>>>> I'd like to be able to write perl scripts that talk to the backend
>>>> without
>>>> having to remember all the various system tables I need to query / join
>>>> to
>>>> get the same results as \d gives me in psql ... same for any interface
>>>> language, really ...
>>>>
>>>
>>> Isn't that what the information_schema catalog is for?
>>
>> I'd rather write:
>>
>> SHOW TABLES;
>>
>> then:
>>
>> SELECT  table_name
>>  FROM information_schema.tables
>>  WHERE table_type = 'BASE TABLE'
>>   AND table_schema NOT IN
>>       ('pg_catalog', 'information_schema');
>>
>> And, the latter, unless I'm doing it regularly, is alot harder to remember
>> then the former ...
>
> Yes, I see what you mean now.  That would simplify things greatly.
>
> Thom
>


exactly ...
and also: how many people outside the "inner circle" do you know who have ever seen the information schema?
i have been in postgres business for more than 10 years (full time) and i cannot name 5 customers who ever used the
informationschema to do "show tables" ... 
a big argument is: "show tables" (or whatever) could work for all versions to come while a direct hit on the pg_class
orso would not give you total portability forever. 

and yes, it is all about simplicity ...
it would not even add too much code to the backend and thus the complexity of this feature can really be neglected from
amaintenance point of view. 
regards,
    hans


--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: SHOW TABLES
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: SHOW TABLES