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 --- |
- Re: [SQL] Bug or Feature? Herbert R. Ambos
- Re: [SQL] Bug or Feature? Tom Lane