Re: psql \e command - Mailing list pgsql-general

From Klint Gore
Subject Re: psql \e command
Date
Msg-id 48464E60.5050708@une.edu.au
Whole thread Raw
In response to psql \e command  (Volkan YAZICI <yazicivo@ttmail.com>)
Responses Re: psql \e command  (Volkan YAZICI <yazicivo@ttmail.com>)
List pgsql-general
Volkan YAZICI wrote:
> 2. It would be really neat to be able to issue
>
>      \et  regex  - Edit table. (Create script of table will get dumped.)
>      \et+ regex  - Edit table with dependents. (With create script of
>                    INDEXes, triggers, etc.)
>
How do you intend to use it?

postgres=# create table bar (foo int);
CREATE TABLE
postgres=# \e
ERROR:  relation "bar" already exists
postgres=#

You'd have to comment out the create table and then write all the alter
table statements to get the changes made.

>      \ef  regex  - Edit function.
>
Yes.  Like what pgadmin does when you hit the sql button with a function
selected.

postgres=# create or replace function foo() returns int as $$ select 1;
$$ language sql;
CREATE FUNCTION
postgres=# \e
CREATE FUNCTION
postgres=#

klint.

--
Klint Gore
Database Manager
Sheep CRC
A.G.B.U.
University of New England
Armidale NSW 2350

Ph: 02 6773 3789
Fax: 02 6773 3266
EMail: kgore4@une.edu.au


pgsql-general by date:

Previous
From:
Date:
Subject: Insert into master table ->" 0 rows affected" -> Hibernate problems
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: [JDBC] How to just "link" to some data feed