Re: defining yuor own commands in PG ?

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: defining yuor own commands in PG ?
Date: 2009-12-20 04:13:12
Message-ID: 482E80323A35A54498B8B70FF2B8798004382780B0@azsmsx504.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

THere's nothing wrong with \d. I prefer it. I really like \? to get all the '\' commands. It's a great system. But I'm in a position of having to calm potential MySQL users who are nervous about "different" commands. I think once they get to know the '\' commands, they'll be fine. But for now, just being able to say that I can reproduce their familiar commands will e a selling pitch.

Great info to be used for this, and I can see other stuff for my own utility too.

Thanks !

________________________________
From: Filip Rembiałkowski [mailto:plk(dot)zuber(at)gmail(dot)com]
Sent: Saturday, December 19, 2009 7:00 AM
To: Gauthier, Dave
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] defining yuor own commands in PG ?

2009/12/18 Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com<mailto:dave(dot)gauthier(at)intel(dot)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(dot)rembialkowski(at)gmail(dot)com<mailto:filip(dot)rembialkowski(at)gmail(dot)com>
http://filip.rembialkowski.net/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2009-12-20 09:12:39 Re: How to use read uncommitted transaction level and set update order
Previous Message Jeff Davis 2009-12-20 00:36:55 Re: modelling question