Обсуждение: Re: [HACKERS] Current source from CVS won't compile.

Поиск
Список
Период
Сортировка

Re: [HACKERS] Current source from CVS won't compile.

От
Mike Mascari
Дата:
--- Bruce Momjian <maillist@candle.pha.pa.us> wrote:
> > Yes.
> > 
> > This is my fault. Sorry.  Attached is a patch which fixes the problem.
> > I missed adding the rule to make parse.h to the Makefile for 
> > the ../backend/commands. It also allows for comments to be dropped
> > using IS NULL as well as IS '';
> > 
> 
> Can we use only NULL, and not '' please?  Seems clearer.  I don't like
> us of '' for any special handling.  Thanks.
> 
> -- 
>   Bruce Momjian                        |  http://www.op.net/~candle
>   maillist@candle.pha.pa.us            |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania
> 19026
> 

I agree with you, an empty string is a goofy way to drop a comment.
The only reason I did it that way was because that's how Oracle does
it (heck, why not create comment on, drop comment on). The question is,
what should the behavior be when a user supplies an empty string?

COMMENT ON TABLE employees IS '';

Should the above add an empty comment to pg_description?

Its up to you... :-)

Mike Mascari
(mascarim@yahoo.com)




=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com


Re: [HACKERS] Current source from CVS won't compile.

От
Bruce Momjian
Дата:
> > Can we use only NULL, and not '' please?  Seems clearer.  I don't like
> > us of '' for any special handling.  Thanks.
> > 
> > -- 
> >   Bruce Momjian                        |  http://www.op.net/~candle
> >   maillist@candle.pha.pa.us            |  (610) 853-3000
> >   +  If your life is a hard drive,     |  830 Blythe Avenue
> >   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania
> > 19026
> > 
> 
> I agree with you, an empty string is a goofy way to drop a comment.
> The only reason I did it that way was because that's how Oracle does
> it (heck, why not create comment on, drop comment on). The question is,
> what should the behavior be when a user supplies an empty string?
> 
> COMMENT ON TABLE employees IS '';
> 
> Should the above add an empty comment to pg_description?

OK, I like the compatability issue.  Let's leave both as dropping
comments, but only document the NULL case.  SGML already updated.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026