X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DE2469FA5C8 for ; Thu, 1 Jun 2006 16:54:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 58046-08 for ; Thu, 1 Jun 2006 16:54:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from alvh.no-ip.org (201-221-200-231.bk11-dsl.surnet.cl [201.221.200.231]) by postgresql.org (Postfix) with ESMTP id AA9F09FA040 for ; Thu, 1 Jun 2006 16:54:06 -0300 (ADT) Received: by alvh.no-ip.org (Postfix, from userid 1000) id 63ED3C3A214; Thu, 1 Jun 2006 15:54:05 -0400 (CLT) Date: Thu, 1 Jun 2006 15:54:05 -0400 From: Alvaro Herrera To: Yasir Malik Cc: PostgreSQL Subject: Re: Am I crazy or is this SQL not possible Message-ID: <20060601195405.GH19388@surnet.cl> Mail-Followup-To: Yasir Malik , PostgreSQL References: <447F34B1.5020004@oisinglynn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.145 tagged_above=0 required=5 tests=AWL, BAYES_00, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO, RCVD_IN_SORBS_DUL X-Spam-Level: X-Archive-Number: 200606/25 X-Sequence-Number: 25261 Yasir Malik wrote: > >It is a hack, but when someone wants you to do something in a way > >different from the norm, aren't they asking for a hack? > > > >SQL Server does something like > >select top (1) from .... > > > >I am thinking this is NOT a SQL-99 standard. > > > This was an interview with Amazon, and I don't think Amazon wanted a hack. > I hope Amazon doesn't use hacks. There has to be another way. It would > be cruel if they expected me know some database specific functionality. Do they use PostgreSQL at Amazon? Maybe they wanted to know if you are aware of common non-standard tricks for whatever RDBMS they use. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.