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

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

From: Bruce Stephens <bruce(at)cenderis(dot)demon(dot)co(dot)uk>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [QUESTIONS] Practical SQL Handbook - demo script for postgreSQL
Date: 1998-04-25 18:43:01
Message-ID: m3zph968ui.fsf@cenderis.demon.co.uk (view raw or flat)
Thread:
Lists: pgsql-hackers
The Hermit Hacker <scrappy(at)hub(dot)org> writes:

> Moved to pgsql-hackers(at)postgresql(dot)org (where the developers hang out)

> > 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.

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.


*** /mnt/1gig2/postgres/make/pgsql/src/backend/parser/gram.y	Fri Apr 17 05:12:56 1998
--- gram.y	Mon Apr 20 22:59:01 1998
***************
*** 735,740 ****
--- 735,741 ----
  		;
  
  ColQualifier:  ColQualList						{ $$ = $1; }
+ 	| NULL_P { $$ = NULL; }
  			| /*EMPTY*/							{ $$ = NULL; }
  		;
  
*** /mnt/1gig2/postgres/make/pgsql/src/backend/parser/scan.l	Wed Apr  8 07:35:00 1998
--- scan.l	Mon Apr 20 23:22:16 1998
***************
*** 153,159 ****
  xmstop			-
  
  integer			-?{digit}+
! real			-?{digit}+\.{digit}+([Ee][-+]?{digit}+)?
  
  param			\${integer}
  
--- 153,159 ----
  xmstop			-
  
  integer			-?{digit}+
! real			-?{digit}*\.{digit}+([Ee][-+]?{digit}+)?
  
  param			\${integer}
  

In response to

Responses

pgsql-hackers by date

Next:From: Ryan KirkpatrickDate: 1998-04-25 20:45:46
Subject: Patch to remove -Dalpha for Alphas...
Previous:From: The Hermit HackerDate: 1998-04-25 17:49:55
Subject: Re: [QUESTIONS] Practical SQL Handbook - demo script for postgreSQL

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