Re: [HACKERS] Creating a zero-column table

2002-12-16 Thread Peter Eisentraut
Robert Treat writes: > I've never been one for actively going against the sql standards (which > this case would seem to do) so if it is done lets make sure we add > documentation to point out that we aren't compliant on this issue. This could be a reasonable place to hook in the "SQL flagger" (n

Re: [HACKERS] Creating a zero-column table

2002-12-16 Thread Robert Treat
On Fri, 2002-12-13 at 19:27, Peter Eisentraut wrote: > Tom Lane writes: > > > Should we remove this error check, thereby effectively making > > zero-column tables first-class citizens? > > Yes. > I've never been one for actively going against the sql standards (which this case would seem to do)

Re: [HACKERS] Creating a zero-column table

2002-12-13 Thread Peter Eisentraut
Tom Lane writes: > Should we remove this error check, thereby effectively making > zero-column tables first-class citizens? Yes. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please se

Re: [HACKERS] Creating a zero-column table

2002-12-13 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > Just out of curiosity, do any of the SQL specs deal with 0 column > tables? I can't recall any dbms supporting a create table command that > didn't require at least 1 column. Actually, in SQL92 11.17 I find 3) C shall be a column of T and C sha

Re: [HACKERS] Creating a zero-column table

2002-12-13 Thread Robert Treat
On Fri, 2002-12-13 at 03:43, Philip Warner wrote: > At 02:56 AM 13/12/2002 -0500, Tom Lane wrote: > >if it's not the only column in Amy's table, Beth can drop her type > >and Amy's column along with it. > > I keep forgetting PG's inheritance features. In a non-inheritance system, I > would vote f

Re: [HACKERS] Creating a zero-column table

2002-12-13 Thread Philip Warner
At 02:56 AM 13/12/2002 -0500, Tom Lane wrote: if it's not the only column in Amy's table, Beth can drop her type and Amy's column along with it. I keep forgetting PG's inheritance features. In a non-inheritance system, I would vote for forcing a one column table to be dropped. For PG, I think

Re: [HACKERS] Creating a zero-column table

2002-12-12 Thread Tom Lane
Philip Warner <[EMAIL PROTECTED]> writes: > At 12:31 AM 13/12/2002 -0500, Tom Lane wrote: >> Amy does CREATE TABLE foo(f1 beths_type); >> Beth now cannot drop her type beths_type. >> In most circles this would be called a denial of service. > Seems like a feature - if beth made the type public, sh

Re: [HACKERS] Creating a zero-column table

2002-12-12 Thread Philip Warner
At 12:31 AM 13/12/2002 -0500, Tom Lane wrote: Amy does CREATE TABLE foo(f1 beths_type); Beth now cannot drop her type beths_type. In most circles this would be called a denial of service. Seems like a feature - if beth made the type public, she has to deal with fame. I don't see

Re: [HACKERS] Creating a zero-column table

2002-12-12 Thread Tom Lane
Philip Warner <[EMAIL PROTECTED]> writes: > At 04:08 PM 12/12/2002 -0500, Tom Lane wrote: >> Should we remove this error check, thereby effectively making >> zero-column tables first-class citizens? > The other option is to disallow the steps that resulted in the zero-column > table in the first

Re: [HACKERS] Creating a zero-column table

2002-12-12 Thread Philip Warner
At 04:08 PM 12/12/2002 -0500, Tom Lane wrote: Should we remove this error check, thereby effectively making zero-column tables first-class citizens? I should wait 2 minutes before hitting 'send'. The other option is to disallow the steps that resulted in the zero-column table in the first plac

Re: [HACKERS] Creating a zero-column table

2002-12-12 Thread Philip Warner
At 04:08 PM 12/12/2002 -0500, Tom Lane wrote: Should we remove this error check, thereby effectively making zero-column tables first-class citizens? It's a bit daft, but I suspect it's the way to go. There has to be a non-zero chance that a future version of pg_dump may want to add attributes

Re: [HACKERS] Creating a zero-column table

2002-12-12 Thread Hannu Krosing
Tom Lane kirjutas R, 13.12.2002 kell 02:08: > I was bemused to notice that pg_dump is currently unable to dump the > regression database. The domain regression test leaves an empty table > (one with zero columns), which causes pg_dump to produce > > -- > -- TOC entry 172 (OID 675837) > -- Name: d

[HACKERS] Creating a zero-column table

2002-12-12 Thread Tom Lane
I was bemused to notice that pg_dump is currently unable to dump the regression database. The domain regression test leaves an empty table (one with zero columns), which causes pg_dump to produce -- -- TOC entry 172 (OID 675837) -- Name: domnotnull; Type: TABLE; Schema: public; Owner: postgres --