Create index statement does nothing

From: "Bowman, Randall" <randall(dot)bowman(at)spglobal(dot)com>
To: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Create index statement does nothing
Date: 2017-10-10 19:41:07
Message-ID: SN1PR10MB0639B2E64F75D1D95FEBF3B1F3750@SN1PR10MB0639.namprd10.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm executing a create index statement in jdbc. The statement executes without error but the index does not show up in the database. I execute "select * from pg_indexes where tablename = 'mkteodprice'" in pgAdmin and it returns no rows.
When I execute "create index "Temp_4419_1507660884753" on systestdata01p.mktEODPrice ( priceDate, tradingItemId, PacVerToFeedPop )" in pgAdmin the index is created as expected.
The java statement that I'm using is "int n = _statement.executeUpdate( sql );" Later in the java code I attempt to drop the index and it fails because the index does not exist.

JDBC driver build number: 42.1.4
Server version: 9.6
Java Version: 1.8.0_144
pgAdmin version: 2.0

Log entry for create:
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl execute simple execute, handler=org(dot)postgresql(dot)jdbc(dot)PgStatement$StatementResultHandler(at)6090ad99, maxRows=0, fetchSize=0, flags=5
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendParse FE=> Parse(stmt=null,query="BEGIN",oids={})
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendBind FE=> Bind(stmt=null,portal=null)
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendExecute FE=> Execute(portal=null,limit=0)
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendParse FE=> Parse(stmt=null,query="create index "Temp_4419_1507660884753" on systestdata01p.mktEODPrice ( priceDate, tradingItemId, PacVerToFeedPop )",oids={})
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendBind FE=> Bind(stmt=null,portal=null)
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendDescribePortal FE=> Describe(portal=null)
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendExecute FE=> Execute(portal=null,limit=1)
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl sendSync FE=> Sync
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE ParseComplete [null]
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE BindComplete [unnamed]
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl receiveCommandStatus <=BE CommandStatus(BEGIN)
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE ParseComplete [null]
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE BindComplete [unnamed]
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE NoData
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl receiveCommandStatus <=BE CommandStatus(CREATE INDEX)
2017-10-10 12:43:03 FINEST org.postgresql.core.v3.QueryExecutorImpl receiveRFQ <=BE ReadyForQuery(T)

Log entry for drop:
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl execute simple execute, handler=org(dot)postgresql(dot)jdbc(dot)PgStatement$StatementResultHandler(at)1e930436, maxRows=0, fetchSize=0, flags=21
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl sendParse FE=> Parse(stmt=null,query="drop index systestdata01p."Temp_4419_1507660884753"",oids={})
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl sendBind FE=> Bind(stmt=null,portal=null)
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl sendDescribePortal FE=> Describe(portal=null)
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl sendExecute FE=> Execute(portal=null,limit=1)
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl sendSync FE=> Sync
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE ParseComplete [null]
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE BindComplete [unnamed]
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl processResults <=BE NoData
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse <=BE ErrorMessage(ERROR: index "Temp_4419_1507660884753" does not exist
Location: File: tablecmds.c, Routine: DropErrorMsgNonExistent, Line: 759
Server SQLState: 42704)
2017-10-10 12:43:13 FINEST org.postgresql.core.v3.QueryExecutorImpl receiveRFQ <=BE ReadyForQuery(I)

Thanks,
Randy Bowman

________________________________

The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. S&P Global Inc. reserves the right, subject to applicable local law, to monitor, review and process the content of any electronic message or information sent to or from S&P Global Inc. e-mail addresses without informing the sender or recipient of the message. By sending electronic message or information to S&P Global Inc. e-mail addresses you, as the sender, are consenting to S&P Global Inc. processing any of your personal data therein.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Robert Price 2017-10-11 00:36:19 Spring Transactional Support
Previous Message Michael Paquier 2017-10-10 13:12:25 Re: [JDBC] Channel binding support for SCRAM-SHA-256