| Monday, May 17. 2010Output parameters, custom data type gotchasPrinter FriendlyRecommended Books: PostGIS In Action  PostgreSQL 8.4 Official The SQL Language  PostgreSQL 8.4 Server Administration Comments Display comments as
									(Linear | Threaded)
								 
                    Am I missing something here? Shouldn't the outer SELECT refer to the sub-SELECT alias? As in: SELECT (foo).* FROM (SELECT somefunction(rast) As m FROM somerastertable) As foo By the way, how about mentioning somewhere which markup in the comment system allows for monospace/code text. I've previewed this a dozen times with various html,bbcode,texttile markup etc and can't make the above SQL look nice... Cheers, Mark. 
                    Mark, Yes its the way it is written in PostgreSQL to represent a composite object. Kind of weird looking I admit. The (m) denotes the alias of the composite output and not the table foo. I guess it would have been clearer written as SELECT (foo.m).* FROM (SELECT somefunction(rast) As m FROM somerastertable) As foo Regarding markup. Hmm I think we may have that all disabled except for emoticons because of some annoying spam attacks. Will have to check that out. | Entry's LinksQuicksearchCalendar
 Categories
 Blog Administration | |||||||||||||||||||||||||||||||||||||||||||||||||
Tracked: Apr 08, 02:28