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

Marc G. Fournier <scrappy@hub.org>

From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Stephens <bruce@cenderis.demon.co.uk>
Cc: pgsql-hackers@postgreSQL.org
Date: 1998-04-25T17:49:55Z
Lists: pgsql-hackers
Moved to pgsql-hackers@postgresql.org (where the developers hang out)

On 24 Apr 1998, Bruce Stephens wrote:

> -----
> The NULL contraint: PostgreSQL only allows NOT NULL (NULL being the
> default).  I altered the backend grammar for this one.

	Patch?

> Floating point literals: PostgreSQL requires that positive floating
> point constants start with a digit, but the script has ".10" and
> things.  Same here, I altered the lexical spec for floats, but it's
> possible there was a reason for it being the way it was.

	Patch?

> View syntax: The script has "CREATE VIEW foo (a, b, c) AS SELECT ..."
> which doesn't seem to be acceptable to PostgreSQL.  I rephrased these
> as "CREATE VIEW foo AS SELECT blah AS a, ..." and so on.
> 
> Commands separated by "go", not ";".  Don't know whether this would be
> easy or hard to do, or whether it's important.  Global substitution
> for this.
> 
> Some types, like "tinyint" aren't available, so I just substituted
> "int".
> 
> Some of the views are only creatable as the PostgreSQL superuser.
> (This is on the TODO list, I think.)
> -----
> 
> I think that was it.  Presumably the developers will be making some
> effort to get this to work (at least most of it: "go" vs ";" is a bit
> irrelevant, but NULL is important, IMHO); it's surely slightly
> embarrassing to recommend a book which has an example that won't run!
> --
> Official WWW Site: http://www.postgresql.org
> Online Docs & FAQ: http://www.postgresql.org/docs
> Searchable Lists: http://www.postgresql.org/mhonarc
> 

Marc G. Fournier                                
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org