Hey guys,
I found this interesting…
test=# create table t ( c char);
CREATE TABLE
test =# \d t
Table "public.t"
Column | Type | Modifiers
--------+--------------+-----------
c | character(1) |
test =# alter table t drop column c;
ALTER TABLE
test =# \d t
Table "public.t"
Column | Type | Modifiers
--------+------+-----------
test =# select * from t;
--
(0 rows)
test =# create table t2 ();
CREATE TABLE
test =# select * from t2;
--
(0 rows)
I mean, we have a table with nothing on it. Of course this maybe useful if like to check if an object exists in pg_class for some reasons. But nah… we can have other workarounds for that. Is this allowed in SQL?
Thanks,
herbert
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.542 / Virus Database: 336 - Release Date: 11/18/2003