X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id F3E8CD1D27C for ; Tue, 10 Feb 2004 03:46:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 58068-07 for ; Mon, 9 Feb 2004 23:46:16 -0400 (AST) Received: from clusternode1.transco.local (unknown [203.177.60.220]) by svr1.postgresql.org (Postfix) with ESMTP id AF401D1B47D for ; Mon, 9 Feb 2004 23:46:08 -0400 (AST) Received: from herbert ([192.168.251.120]) by clusternode1.transco.local with Microsoft SMTPSVC(5.0.2195.5329); Tue, 10 Feb 2004 11:47:46 +0800 From: "Herbert R. Ambos" To: Subject: Bug or Feature? Date: Tue, 10 Feb 2004 11:48:03 -0800 Message-ID: <001701c3f00e$cec10330$78fba8c0@herbert> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0018_01C3EFCB.C0B31FF0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-OriginalArrivalTime: 10 Feb 2004 03:47:47.0536 (UTC) FILETIME=[A5F47D00:01C3EF88] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=3.3 tagged_above=0.0 required=5.0 tests=BAYES_10, DATE_IN_FUTURE_12_24, HTML_70_80, HTML_MESSAGE, RCVD_IN_DSBL X-Spam-Level: *** X-Archive-Number: 200402/94 X-Sequence-Number: 16785 This is a multi-part message in MIME format. ------=_NextPart_000_0018_01C3EFCB.C0B31FF0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hey guys, =20 I found this interesting=85 =20 =20 test=3D# create table t ( c char); CREATE TABLE =20 test =3D# \d t Table "public.t" Column | Type | Modifiers --------+--------------+----------- c | character(1) | =20 test =3D# alter table t drop column c; ALTER TABLE =20 test =3D# \d t Table "public.t" Column | Type | Modifiers --------+------+----------- =20 test =3D# select * from t; =20 -- (0 rows) =20 test =3D# create table t2 (); CREATE TABLE =20 test =3D# select * from t2; =20 -- (0 rows) =20 =20 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=85 we can have other workarounds for that. Is this allowed in SQL? =20 =20 Thanks, =20 =20 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 =20 ------=_NextPart_000_0018_01C3EFCB.C0B31FF0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

Hey guys,

 

I found this interesting=85

 

 

test=3D# create table t ( c char);

CREATE TABLE

 

test =3D# \d t

         Table "public.t"

 Column |     Type     | Modifiers

--------+--------------+-----------

 c      | character(1) |

 

test =3D# alter table t drop column c;

ALTER TABLE

 

test =3D# \d t

     Table "public.t"

 Column | Type | Modifiers

--------+------+-----------

 

test =3D# select * from t;

 

--

(0 rows)

 

test =3D# create table t2 ();

CREATE TABLE

 

test =3D# select * from t2;

 

--

(0 rows)

 

 

I mean, we have a table with nothing on it.  Of cou= rse this maybe useful if like to check if an object exists in pg_class for some reas= ons.  But nah=85 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

------=_NextPart_000_0018_01C3EFCB.C0B31FF0--