Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: [QUESTIONS] Practical SQL Handbook - demo script for postgreSQL

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bruce Stephens <bruce(at)cenderis(dot)demon(dot)co(dot)uk>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: [QUESTIONS] Practical SQL Handbook - demo script for postgreSQL
Date: 1998-04-27 16:39:43
Message-ID: 3544B4CF.7E8CA181@alumni.caltech.edu (view raw or flat)
Thread:
Lists: pgsql-hackers
> > > The NULL contraint: PostgreSQL only allows NOT NULL (NULL being 
> > > the default).  I altered the backend grammar for this one.
> >
> >       Patch?
> 
> OK.  The patch to gram.y is almost certainly wrong: it's just a hack
> to get NULL acceptable---it should surely go in the same place as the
> check for NOT NULL.

Yes, and no. Putting the grammar where you did disallows any other
clauses, such as DEFAULT or CONSTRAINT, in the declaration. Trying to
put it in the proper place results in shift/reduce conflicts, since it
is ambiguous with other allowed syntax.

btw, afaik this is not SQL92 anyway...

> The floating point literal change is probably right, but it may break
> things (it may well cause more things to be regarded as floats than
> should be).  Again, somebody who knows about this stuff definitely
> needs to check.
> 
> I hope this helps all the same.

Yes it does! I've got a more general floating patch to apply, but would
not have done it without your prompting. Discussion and proposals are
how we progress. Good work.

Don't know how or if we want to proceed with a bare "NULL" clause.
Should we bother with a special case of _only_ NULL in a declaration, as
in Bruce's patch?

                      - Tom

In response to

Responses

pgsql-hackers by date

Next:From: The Hermit HackerDate: 1998-04-27 16:57:13
Subject: Re: [HACKERS] patch for explain.c that shows index (il secondo)
Previous:From: Thomas G. LockhartDate: 1998-04-27 15:20:25
Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group