.psqlrc and custom functions (mysql-like)

Поиск
Список
Период
Сортировка
От Sandeep Srinivasa
Тема .psqlrc and custom functions (mysql-like)
Дата
Msg-id AANLkTimHWccg7fbW-SpqAWu+LTxVu4W0h=PVnHw_dPrC@mail.gmail.com
обсуждение исходный текст
Ответы Re: .psqlrc and custom functions (mysql-like)
Список pgsql-general
hi,
  As part of a product we are building, we are using postgres as our database. But most of our developers have a (loud) mysql background.
I want to potentially provide "aliases" for a few commonly used mysql functions.

 I see that the .psqlrc could potentially be the place where you could define these custom functions - I looked at http://okbob.blogspot.com/2009/12/macros-for-epsql.html but it seems to be a patched psql. Is is possible to have the exact same commands as defined in that page in a .psqlrc .. via plpgsql or something ?

I might be totally way off the target here, so please correct me if I am wrong.

As an example, how would I do something as simple as "DESCRIBE table" (yes I know \d+ equivalent.. I still want to be able to define this function)

thanks and regards
Sandeep

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Windows 2003 server installation issue
Следующее
От: Torsten Zühlsdorff
Дата:
Сообщение: Re: InitDB: Bad system call