Thread: ResultSetMetaData.isNullable

ResultSetMetaData.isNullable

From
snpe
Date:
Hello,
  ResultSetMetaData.isNullable return always java.sql.ResultSetMetaData.columnNullableUnknown.
Is it possible that this function return "null/not null" as "null/not null" in a table in the database.
I have found this comment in source :
        *
         * TODO This needs a real implementation, taking into account columns
         * defined with NOT NULL or PRIMARY KEY, CHECK constraints, views,
         * functions etc.
         */
It isn't important for PRIMARY KEY (must be not null), other constraints, triggers - this function is only for first
impression.
I need this function for access right in forms.

Please help

regards
Haris Peco


Re: ResultSetMetaData.isNullable

From
Barry Lind
Date:
Haris,

In 7.3 and earlier it really isn't possible to return more correct
information, since the jdbc driver doesn't know what the table and
column names are that make to an individual column result.

However in 7.4 with the changes in the FE/BE protocol this will be
possible.  But it will be a lot of work to change over to use the new
protocol so it may take a while before all of this is changed.

thanks,
--Barry

snpe wrote:
> Hello,
>   ResultSetMetaData.isNullable return always java.sql.ResultSetMetaData.columnNullableUnknown.
> Is it possible that this function return "null/not null" as "null/not null" in a table in the database.
> I have found this comment in source :
>         *
>          * TODO This needs a real implementation, taking into account columns
>          * defined with NOT NULL or PRIMARY KEY, CHECK constraints, views,
>          * functions etc.
>          */
> It isn't important for PRIMARY KEY (must be not null), other constraints, triggers - this function is only for first
impression.
> I need this function for access right in forms.
>
> Please help
>
> regards
> Haris Peco
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>