Re: Reading schema information
От | Mansour Al Akeel |
---|---|
Тема | Re: Reading schema information |
Дата | |
Msg-id | CAFvvX=bq1Ug1-LUUej3Xn4c-SgJREuLZGUO1e7b4JWuOBjKACA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Reading schema information (Mansour Al Akeel <mansour.alakeel@gmail.com>) |
Список | pgsql-jdbc |
Please note, I am still using : Connection conn = DriverManager.getConnection(info.getUrl(), info.getUser(), info.getPassword()); DatabaseMetaData metaData = conn.getMetaData(); So I am getting the meta data of the whole data base, and I didn't try your method yet. You method obtains the meta data for each table as far as I understand. On Mon, May 25, 2015 at 6:49 PM, Mansour Al Akeel <mansour.alakeel@gmail.com> wrote: > Hello, > > Yes I did a search and couldn't find anything. This line of code is > generating the same exception: > > String SCOPE_CATALOG = fields.getString("SCOPE_CATALOG"); > > > > On Mon, May 25, 2015 at 6:58 PM, dmp <danap@ttc-cmc.net> wrote: >> dmp wrote: >>> >>> Mansour Al Akeel wrote: >>>> >>>> Sorry for missing the email subject in my previous email ! >>>> >>>> I am trying to get some information about a coloum using the method: >>>> >>>> DatabaseMetaData.getString("IS_GENERATEDCOLUMN") >>>> >>>> However it is throwing an exception: >>>> >>>> org.postgresql.util.PSQLException: The column name IS_GENERATEDCOLUMN >>>> was not found in this ResultSet. >>>> >>>> Based on javadoc for getColumns method: >>>> >>>> >>>> http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String) >>>> >>>> >>>> >>>> We have: >>>> >>>> IS_GENERATEDCOLUMN String => Indicates whether this is a generated column >>>> >>>> YES --- if this a generated column >>>> NO --- if this not a generated column >>>> empty string --- if it cannot be determined whether this is a generated >>>> column >>>> >>>> >>>> My questions is, is this a bug ? if not, how can I obtain this >>>> information about a column (if it's generated or not) ? >>>> >>>> >>>> Thank you. >>>> >> >> Hello, >> >> I'm sorry, after testing, currently the given name IS_GENERATEDCOLUMN is >> given the error as you describe. The index of 23 can be used to obtain the >> results desired. >> >> Did you search the mailing list for a report or issue on this? >> >> danap. >>
В списке pgsql-jdbc по дате отправления: