Search Postgresql Archives

Re: psql \e command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux