Re: ; being a terminator or separator
"Billy G. Allie" <[email protected]> Fri, 27 Jun 2003 22:54:02 -0400
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Organization | michigan!/usr/group |
| Message-ID | <[email protected]> |
Karsten Hilbert wrote: >Billy, > >you stated that ; is a statement _separator_ in SQL which >makes sense. However, this: > > http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-syntax.html#SQL-SYNTAX-LEXICAL > (1.1.4. Special Characters, 5th bullet) > >suggests otherwise. Given PGs track record of being (sanely) >anal about SQL conformity I wonder what to make of it. I >certainly am no expert on such matters. > >Thanks for your help, >Karsten > > First, I didn't say that, someone else on the list did ;-) The point your refering to state a semi-colon is a command terminater. Multiple commands can be entered (even on the same line) terminated (seperated) by a semi-colon. Commands are also terminated by the end of the input stream, which is why a semi-colon is not needed in the query given to the execute() method if there is only one command in the query. Note that adding the semi-colon to a single command query does not cause any problems, it just terminates the one command. I guess I'm trying to say is that if you equate 'statement' to 'command' and 'separator' to 'terminator', then there is no conflict. -- ___________________________________________________________________________ ____ | Billy G. Allie | Domain....: [email protected] | /| | 7436 Hartwell | MSN.......: [email protected] |-/-|----- | Dearborn, MI 48126| |/ |LLIE | (313) 582-1540 | ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01