Re: defining yuor own commands in PG ?

Поиск
Список
Период
Сортировка
От Filip Rembiałkowski
Тема Re: defining yuor own commands in PG ?
Дата
Msg-id 92869e660912190359v62b55881x3947163311caa97c@mail.gmail.com
обсуждение исходный текст
Ответ на defining yuor own commands in PG ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Ответы Re: defining yuor own commands in PG ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Re: defining yuor own commands in PG ?  (Israel Brewster <israel@frontierflying.com>)
Список pgsql-general

2009/12/18 Gauthier, Dave <dave.gauthier@intel.com>

Can you define your own commands in PG. 

In psql, yes:

\set sel 'SELECT * FROM'
:sel clients;

\set desc '\\d'
:desc table

 

E.g., if users from other DBs use “describe foo” to get the metadata for foo, is there a way I can create a command “describe” to = “\d” ?


But what's wrong with "\d"? For me, its like the first thing people learn when practicing postgres.
It is even faster to type than DESCRIBE, right?

IMO, when you will bend postgres to mimick other DBMS, you will hide its real power from users.



--
Filip Rembiałkowski
JID,mailto:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/

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

Предыдущее
От: Filip Rembiałkowski
Дата:
Сообщение: Re: Extracting SQL from logs in a usable format
Следующее
От: Clayton Graf
Дата:
Сообщение: AccessShareLock question