Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aMSzr-0000aR-FN for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Jan 2016 04:06:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aMSzr-0003mB-2C for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Jan 2016 04:06:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aMIUy-0000fP-NR for pgsql-bugs@postgresql.org; Thu, 21 Jan 2016 16:54:16 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aMIUn-0004eF-1Z for pgsql-bugs@postgresql.org; Thu, 21 Jan 2016 16:54:09 +0000 MIME-Version: 1.0 Subject: BUG #13880: Different procedures in same SQL To: pgsql-bugs@postgresql.org From: victor.evangelista@caixa.gov.br Date: Thu, 21 Jan 2016 16:53:10 +0000 Message-ID: <20160121165310.2736.59053@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13880 Logged by: Victor Neves Email address: victor.evangelista@caixa.gov.br PostgreSQL version: 9.1.9 Operating system: RedHat 4.4.7 x64 Description: I found a different procedures in same SQL, in postgres 9.1.9. I create a table, but i dont insert any data, after execute insert into (namecolum1, namecolum2, namecolum3, namecolum4) select distinct 'value1', 'value2', 'value3', 'value4' from
where not exists (select 1 from
sis where sis.namecolum2='value2' ) Postgres says: "Query returned successfully: 0 rows affected, 1 ms execution time." But if I insert any data in the table and execute the SQL again, the insert works fine! If I truncate the table and execute de SQL, postgres says "0 rows affected" again. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs