Обсуждение: pgadmin3 column edit question

Поиск
Список
Период
Сортировка

pgadmin3 column edit question

От
Дата:
i've had to change the data types of several columns
in pgadmin3.  most of the time, the data type is
unavailable (shaded out) and, therefore, i have to
delete the whole column and recreate it with the
correct data type.  there is no data in the table.

is there a way to change the data type in pgadmin3 w/o
having to recreate the column?

i want to avoid recreating the column b/c it then
messes up my column order.

if anybody knows how to manipulate the order of
columns, i'd be interested in learning that, too.  ;-)

i've already had to do some recreating.

tia...

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: pgadmin3 column edit question

От
"Oisin Glynn"
Дата:
I see many such issues in pgAdminIII. Like not being able to change a column
to be NOT NULL, not being able to modify parameters/return types of
functions etc.
I end up doing this through phppgadmin or an old fasioned sql statement.

Is there a todo/known buglist for pgAdminIII?
Oisin


----- Original Message -----
From: <operationsengineer1@yahoo.com>
To: "PostgreSQL Novice" <pgsql-novice@postgresql.org>
Sent: Friday, February 25, 2005 15:24
Subject: [NOVICE] pgadmin3 column edit question


> i've had to change the data types of several columns
> in pgadmin3.  most of the time, the data type is
> unavailable (shaded out) and, therefore, i have to
> delete the whole column and recreate it with the
> correct data type.  there is no data in the table.
>
> is there a way to change the data type in pgadmin3 w/o
> having to recreate the column?
>
> i want to avoid recreating the column b/c it then
> messes up my column order.
>
> if anybody knows how to manipulate the order of
> columns, i'd be interested in learning that, too.  ;-)
>
> i've already had to do some recreating.
>
> tia...
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>



php/pgsql coding question...

От
Дата:
i am using a radio button set up in order to choose
the quality standard to which a product will be
inspected.

i'm thinking the easiest way to do this is to grab the
value of the radio button after form submission and
then store it in my pgsql db in a column with datatype
varchar(7).

the other option that i can't disregard right now is
to use the value "0" to represent standard "A" and "1"
to represent value "B".  i was originally thinking
about using boolean, but then i considered the
possibility that a third quality standard could be
added at some later date.

anywho, is either method superior to other?  i guess
the latter method stores less data, but in this case,
the number of product rows will only be a couple
hundred.  maybe i should just go with the latter
method on a general efficiency principle.

if i go the latter route, should i use int2 as the
datatype of the column (used to store "0", "1" and
potentially "2", etc... at a later date?

tia...



__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail

Re: pgadmin3 column edit question

От
Дата:
this might be your (and my) best bet...

http://archives.postgresql.org/pgadmin-support/

--- Oisin Glynn <me@oisinglynn.com> wrote:

> I see many such issues in pgAdminIII. Like not being
> able to change a column
> to be NOT NULL, not being able to modify
> parameters/return types of
> functions etc.
> I end up doing this through phppgadmin or an old
> fasioned sql statement.
>
> Is there a todo/known buglist for pgAdminIII?
> Oisin
>
>
> ----- Original Message -----
> From: <operationsengineer1@yahoo.com>
> To: "PostgreSQL Novice"
> <pgsql-novice@postgresql.org>
> Sent: Friday, February 25, 2005 15:24
> Subject: [NOVICE] pgadmin3 column edit question
>
>
> > i've had to change the data types of several
> columns
> > in pgadmin3.  most of the time, the data type is
> > unavailable (shaded out) and, therefore, i have to
> > delete the whole column and recreate it with the
> > correct data type.  there is no data in the table.
> >
> > is there a way to change the data type in pgadmin3
> w/o
> > having to recreate the column?
> >
> > i want to avoid recreating the column b/c it then
> > messes up my column order.
> >
> > if anybody knows how to manipulate the order of
> > columns, i'd be interested in learning that, too.
> ;-)
> >
> > i've already had to do some recreating.
> >
> > tia...
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> >                http://www.postgresql.org/docs/faq
> >
>
>
>




__________________________________
Do you Yahoo!?
Yahoo! Sports - Sign up for Fantasy Baseball.
http://baseball.fantasysports.yahoo.com/

Re: pgadmin3 column edit question

От
MaXX
Дата:
operationsengineer1@yahoo.com wrote:

> is there a way to change the data type in pgadmin3 w/o
> having to recreate the column?
>
> i want to avoid recreating the column b/c it then
> messes up my column order.
hi,
you can try with CREATE TABLE AS
(http://www.postgresql.org/docs/7.4/static/sql-createtableas.html) in the
SQL editor and then rename the table, You can re-order and change the type
of your columns as you want without loosing your existing values...


HTH
--
MaXX