[SQL] Ynt: where's ALTER TABLE table DROP [ COLUMN ] column???

2001-05-28 Thread Madness

Hi,

I want to make a little correction. The correct syntax should be:

SELECT [all columns except named] into mytemp1 from [$table_name] ;
drop table [$table_name];
SELECT * into [$table_name] from mytemp1;

With regards,
Devrim GÜNDÜZ

Keith Gray <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Bruno Boettcher wrote:
> >
> > Hello!
> >
> > as far as i can tell, i can add columns to a table, but can't remove
> > them later on.
> >
> > is this true?
>
> My thought would be that somebody must have written an
> automated version of
>
> select [all columns except named] from [named table] into droptemp;
> drop [named table];
> select * from droptemp into [named table];
>
> Would this be available or easily written as a "rule" ??
> Could anyone familiar with the code comment?
>
> --
> Keith Gray
>
> ---(end of broadcast)---
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



[SQL] Ynt: corrupted tables !!!

2001-05-28 Thread Madness

Hi,

What kind of a corruption? Do you lose data? As far as I tested; bas
transactions do not destroy db.

With regards,
Devrim

"J.Fernando Moyano" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> I have big problems with my postgres.
> There is a table that gets corrupted frecuently !!! (every week ...)
> I have to drop the table and create it again using the backup copy.
(normally
> i lose some data)
>
> Can it gets corrupted bucause of bad usage of transactions (ie.
transactions
> not committed or rollbacked) ??
>
> And an intensive usage of restrictions, foreign keys, etc... ???
>
> Thanks !!
>
>
> - --
> Fernando Moyano
>
> Frase del día:
> - --
> Linux es aburrido... con Windows nunca sabes cuándo se va a colgar.
>
> (*) SymeX ==> http://symex.lantik.com
> (*) WDBIL ==> http://wdbil.sourceforge.net
> (*) Informate sobre LINUX en http://www.linux.org
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE7D8EQoZaf9MvtDvcRArX0AKCmj7oqUaWsKi4245SKqeUEU2/QvwCcDY1L
> sn48O86W3DRkSbnXJeqB/5U=
> =XHJm
> -END PGP SIGNATURE-
>
> ---(end of broadcast)---
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



[SQL] altering date type of a column

2001-05-28 Thread Madness

Hi,

I have a table in one of my databases which has a row of type char. I would
like to convert it to int data type. Is there an easy way for doing it?

With regards,
Devrim GÜNDÜZ
[EMAIL PROTECTED]





---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl