X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 121668B9F55 for ; Fri, 18 Feb 2005 00:48:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00786-02 for ; Fri, 18 Feb 2005 00:48:44 +0000 (GMT) Received: from hub.org (hub.org [200.46.204.220]) by svr1.postgresql.org (Postfix) with ESMTP id B18B38B9F3A for ; Fri, 18 Feb 2005 00:48:37 +0000 (GMT) Received: from localhost (unknown [200.46.204.144]) by hub.org (Postfix) with ESMTP id 388C812AFBD for ; Thu, 17 Feb 2005 20:48:24 -0400 (AST) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00713-03 for ; Fri, 18 Feb 2005 00:48:22 +0000 (GMT) Received: from ganymede.hub.org (blk-224-134-3.eastlink.ca [24.224.134.3]) by hub.org (Postfix) with ESMTP id E3F97129DBF for ; Thu, 17 Feb 2005 20:48:21 -0400 (AST) Received: by ganymede.hub.org (Postfix, from userid 1000) id 40D963E01C; Thu, 17 Feb 2005 20:48:26 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 3CFE63C7D0 for ; Thu, 17 Feb 2005 20:48:26 -0400 (AST) X-Return-Path: X-Received: from localhost ([unix socket]) by ganymede.hub.org (Cyrus v2.2.10) with LMTPA; Thu, 17 Feb 2005 20:45:56 -0400 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id A653C3E1D2 for ; Thu, 17 Feb 2005 20:45:53 -0400 (AST) X-Received: from mail.postgresql.org [200.46.204.71] by localhost with IMAP (fetchmail-6.2.5) for scrappy@localhost (single-drop); Thu, 17 Feb 2005 20:45:53 -0400 (AST) X-Received: from svr1.postgresql.org ([unix socket]) by svr1.postgresql.org (Cyrus v2.2.10) with LMTPA; Fri, 18 Feb 2005 00:44:26 +0000 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0D4738B9F55 for ; Fri, 18 Feb 2005 00:44:25 +0000 (GMT) X-Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98487-04 for ; Fri, 18 Feb 2005 00:44:18 +0000 (GMT) X-Received: from web14306.mail.yahoo.com (web14306.mail.yahoo.com [216.136.173.82]) by svr1.postgresql.org (Postfix) with SMTP id C1EF78B9F3A for ; Fri, 18 Feb 2005 00:43:44 +0000 (GMT) X-Received: (qmail 81559 invoked by uid 60001); 18 Feb 2005 00:43:34 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=c9ATXs4q/D5iPKLcix7Ks9gazbQOUf+8P2SxSFAHtcDh2gkpABywHY3L43GCd9sIGpE9Zwdi0oGvJKcS4G2xwXQrHrkcomxKoZp9rQesvHJ4+eBIFVjMEqisV/4Q6AEkYGHzKlaMLe1EtvqznHLF4R4xs+Cc0+vHmZYCAPauWIs= ; Message-ID: <20050218004334.81557.qmail@web14306.mail.yahoo.com> X-Received: from [222.126.112.210] by web14306.mail.yahoo.com via HTTP; Thu, 17 Feb 2005 16:43:34 PST Date: Thu, 17 Feb 2005 16:43:34 -0800 (PST) From: yen Subject: question regarding Example 2-4 To: docs@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1944524550-1108687414=:81548" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-DCC: : X-Spam-Pyzor: ReSent-Date: Thu, 17 Feb 2005 20:48:22 -0400 (AST) Resent-From: "Marc G. Fournier" Resent-To: pgsql-docs@postgresql.org ReSent-Subject: question regarding Example 2-4 ReSent-Message-ID: <20050217204822.J874@ganymede.hub.org> X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.249 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, HTML_50_60, HTML_MESSAGE, UPPERCASE_25_50 X-Spam-Level: * X-Archive-Number: 200502/56 X-Sequence-Number: 2889 --0-1944524550-1108687414=:81548 Content-Type: text/plain; charset=us-ascii Hi. I was reading the postgres tutorial and I was confused by this example. I'll post here the example and the given tables. Example 2-1. The Suppliers and Parts Database SUPPLIER SNO | SNAME | CITY SELLS SNO | PNO -----+---------+-------- -----+----- 1 | Smith | London 1 | 1 2 | Jones | Paris 1 | 2 3 | Adams | Vienna 2 | 4 4 | Blake | Rome 3 | 1 3 | 3 4 | 2 PART PNO | PNAME | PRICE 4 | 3 -----+---------+--------- 4 | 4 1 | Screw | 10 2 | Nut | 8 3 | Bolt | 15 4 | Cam | 25 SELECT PNAME, PRICE FROM PART WHERE PNAME = 'Bolt' AND (PRICE = 0 OR PRICE < 15); will lead to the result: PNAME | PRICE --------+-------- Bolt | 15