Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0vOt-0007w8-7Z for pgsql-general@arkaria.postgresql.org; Fri, 14 Sep 2018 21:13:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g0vOq-0001Bw-9W for pgsql-general@arkaria.postgresql.org; Fri, 14 Sep 2018 21:13:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0vOo-0001Bh-GZ for pgsql-general@lists.postgresql.org; Fri, 14 Sep 2018 21:13:12 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0vOe-0004iu-J2 for pgsql-general@postgresql.org; Fri, 14 Sep 2018 21:13:09 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 943ED2C7; Fri, 14 Sep 2018 17:12:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 14 Sep 2018 17:12:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=JAXaWfWF31xgS3Tg6VC2EFvnM7Tqk gQtVfHTqsTXdmo=; b=NZ6b+JI2+QDxlhjgCjtNZ6SYsgrRxxP3chyilxyb38lHb wGqVkxaRpcM0x9mFy0WhZUizMdvWa+LBmOMxD0AMbW6TxR5ESQoXSREWywFbhkOP lczMhrP8dMh/et0BSiIu8OCmvm7Mizqv4x3eO9LVIv7ZwsaUOi3KOo0tP4OMyrmQ 35iWcQnD59sspyKZwu7ot9vldLBemVh5gD+UqJ30W7gMY40QZg92xr1g6d45DuVn C5xIeYCRPNAAQeXh4w7SMnfPUuEZUPLFCdkbDe3oMkalRr0N4MO0YnCkBh7RN8w5 pa6+4JNlW2+I5qZlr1XI2BlVKTZaSi2a+kovoUQdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=JAXaWf WF31xgS3Tg6VC2EFvnM7TqkgQtVfHTqsTXdmo=; b=SJAqGoAifLi5hv9kBhF+1h COlP+WP0FDLaVCy//538nBAg9sUYqxFDWzBjf8F6M8GNfcNNwSr9VQqtZDvDp9ST 7d+ddHB5Gnp7z0uk3lUldu2DjU5yeijm7On+lyzvEDjcxK/ceaJLBHlwJBIRFgHv p2CcmDLTnmct3duIK8Ovbcqj/IvDBftmGnlfV258dkl170FVUunWZ0+K0EjF+3SV V5JOhqwL2rqwuF4hsg8hBZjv2pLlfIQi4C3Wv1FV8bqZ4nduwyeUShP3M0NljZaa cslK8pIu25haX6ldV+NskwHugsFYSRvsGC56WfJ0hc7zrA7ngPkePeUmE8CH0Mcw == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 744B7102D6; Fri, 14 Sep 2018 17:12:57 -0400 (EDT) Subject: Re: Query act different when doing by hand and by using a driver in app To: ik , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: Date: Fri, 14 Sep 2018 14:12:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/14/18 12:11 PM, ik wrote: > Hello, > > Not sure that this is the right mailing list, so sorry from advance. > > I have a program that when it does a query I have one raw returns, but > when I execute the same query with the same conditions, I get the right > number of rows back. The above is going to need more information to work out: 1) The query that returns one row is running in a Go program using the Go driver below, correct? 2) The other query that returns correctly is being run where and how? 3) What is the actual query? 4) How is the query setup in the program? 5) Are you sure the incorrect and correct queries are running against the same database? > > I'm using gonlang and https://github.com/jackc/pgx . > The query inside is inside an already open cursor of another "select" > query that I iterate over. > > Is there a way to debug just that inside pg-logs without having all > possible queries logged in? If it is a SELECT query then no. > > Thank you > Ido -- Adrian Klaver adrian.klaver@aklaver.com