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

От:
"Carlos Cobos" <clcobosu@hotmail.com>
Дата:


hi people !
I'm trying to change a structure of a table but I don't know how a use alter 
table in psql but doesn´t work always give me a  parser error can you 
explein how to do by the why pgadmin don't have a plugins to do that
[root@dns1 root]# su -l postgres
bash-2.05$ psql iutepalsc
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

iutepalsc=# create table prueba ("id" varchar(8));
CREATE
iutepalsc=# alter  table prueba column ("id" varchar(15));
ERROR:  parser: parse error at or near "column"
iutepalsc=#








_________________________________________________________________
MSN Fotos: la forma más fácil de compartir e imprimir fotos. 
http://photos.msn.es/support/worldwide.aspx

Re:

От:
Ligia Pimentel <lmpimentel@yahoo.com>
Дата:
try...

alter table prueba add column id varchar(15);

remember, for some reason, you can only add columns
one by one.

Good Luck.

Ligia Pimentel

--- Carlos Cobos  wrote:
> 
> 
> hi people !
> I'm trying to change a structure of a table but I
> don't know how a use alter 
> table in psql but doesn�t work always give me a 
> parser error can you 
> explein how to do by the why pgadmin don't have a
> plugins to do that
> [root@dns1 root]# su -l postgres
> bash-2.05$ psql iutepalsc
> Welcome to psql, the PostgreSQL interactive
> terminal.
> 
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help on internal slash commands
>        \g or terminate with semicolon to execute
> query
>        \q to quit
> 
> iutepalsc=# create table prueba ("id" varchar(8));
> CREATE
> iutepalsc=# alter  table prueba column ("id"
> varchar(15));
> ERROR:  parser: parse error at or near "column"
> iutepalsc=#
> 
> 
> 
> 
> 
> 
> 
> 
>
_________________________________________________________________
> MSN Fotos: la forma m�s f�cil de compartir e
> imprimir fotos. 
> http://photos.msn.es/support/worldwide.aspx
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
FAQ