Re: Requirement for pgAdmin browser.

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Anil Jangam'" <anilj(at)indts(dot)com>, "'pgsql-cygwin(at)postgresql(dot)org'" <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: Requirement for pgAdmin browser.
Date: 2001-12-14 13:26:23
Message-ID: FED2B709E3270E4B903EB0175A49BCB1047379@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

> -----Original Message-----
> From: Anil Jangam [mailto:anilj(at)indts(dot)com]
> Sent: 14 December 2001 13:04
> To: 'Dave Page'; 'pgsql-cygwin(at)postgresql(dot)org'
> Subject: Requirement for pgAdmin browser.
> Importance: High
>
>
> Hi Dave,
>
> It is observed that while creating table, once we define the
> attributes and their properties, we can not change the
> attribute type. e.g. If we have defined an attribute of type
> int. Now if one want to change it to numeric, it is not
> allowed thorugh the pgAdmin GUI. However we have the option
> of further addition of the attribute to the table. Also it is
> not possible to remove the present attribute(s) in the table.

No, this is a limitation of PostgreSQL, *not* pgAdmin. As soon as PostgreSQL
allows ALTER COLUMN and DROP COLUMN I will ensure that pgAdmin does as well.

> Is this a valid to have this kind of restriction if one want
> to do similar change?? I think either we have to go to the
> psql prompt and use some command, or refine the whole table
> after dropping the old one.
>
> Is there any solution to this through GUI, as it is easy to do it.

No, it's not easy to do, it's incredibly difficult. The only easy ways of
doing it is to do a SELECT INTO, or hand edit a pg_dump file, then reload
it. The problem with the SELECT INTO method is that you will lose any
comments, checks, indexes, constraints, foreign keys or triggers defined on
the table, and any objects that use the table's tuple structure as a type
will also be affected. SQL Functions that access the table may also be
affected, although PL/* functions should be OK.

If you need to drop or alter a column, I would suggest the pg_dump method,
unless you know that SELECT INTO will work for you.

Regards, Dave.

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Hannu Krosing 2001-12-14 18:24:27 Re: [HACKERS] Platform Testing - Cygwin
Previous Message Dave Page 2001-12-14 13:16:22 Re: Properties of 'Relationships' in FK definiton.