Re: .psqlrc and custom functions (mysql-like)

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Sandeep Srinivasa <sss(at)clearsenses(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: .psqlrc and custom functions (mysql-like)
Date: 2010-08-16 05:34:01
Message-ID: AANLkTimPnHZUmj-2jptx9c7_GWk0JWVq_qxF4hS6mPV0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

2010/8/14 Sandeep Srinivasa <sss(at)clearsenses(dot)com>:
> 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 ?

no, and it will not be a possible in near future.

> 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

Regards

Pavel Stehule

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2010-08-16 07:09:24 Re: Relationship between ulimit and effective_cache_size, work_mem, shared_buffers, maintenance_work_mem and vacuum
Previous Message Tom Lane 2010-08-15 16:36:45 Re: InitDB: Bad system call