[JDBC] Create index statement does nothing

Поиск
Список
Период
Сортировка
От Bowman, Randall
Тема [JDBC] Create index statement does nothing
Дата
Msg-id SN1PR10MB0639B2E64F75D1D95FEBF3B1F3750@SN1PR10MB0639.namprd10.prod.outlook.com
обсуждение исходный текст
Ответы Re: [JDBC] Create index statement does nothing  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список 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.postgresql.jdbc.PgStatement$StatementResultHandler@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.postgresql.jdbc.PgStatement$StatementResultHandler@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.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: [JDBC] jdbc-42.1-4 drop of Compatible property and useObjects
Следующее
От: Robert Price
Дата:
Сообщение: [JDBC] Spring Transactional Support