# views and row identifier

**URL:** <https://forum.servoy.com/t/views-and-row-identifier/18001>\
**Category:** Classic Servoy\
**Created:** [June 5, 2014, 8:52am UTC](https://forum.servoy.com/t/views-and-row-identifier/18001 "2014-06-05T08:52:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_Nieuwenhuis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@Hans\_Nieuwenhuis](https://forum.servoy.com/u/Hans_Nieuwenhuis)\
**Post date:** [June 5, 2014, 8:52am UTC](https://forum.servoy.com/t/views-and-row-identifier/18001/1 "2014-06-05T08:52:41Z")

</div>

Hi,

I am using Servoy 7.3.1 and Postgresql 9.3  
I have a table that has a primary key, so the column that is the primary key is NOT NUL.

I created a view that has that column included and in Servoy I set it as row-identifier.

Servoy now complains :

```auto
Table "tablexx" has column "columnyy" which has row identity set but column allows null.
Make sure column data is never null.

```

But the “allow null” checkbox is not editable.

What to do ??? or just ignore the warning ??

Regards,

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [June 5, 2014, 7:10pm UTC](https://forum.servoy.com/t/views-and-row-identifier/18001/2 "2014-06-05T19:10:22Z")

</div>

Hi Hans,

it’s been a while ago since I used views, but I think Servoy assumes the column can be empty.  
This is strange as you are saying it’s the pk in the other table.  
Anyway, can you try to put COALESCE around your rowid?

---

<div class="post-metadata">

**Author:** ![Hans\_Nieuwenhuis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@Hans\_Nieuwenhuis](https://forum.servoy.com/u/Hans_Nieuwenhuis)\
**Post date:** [June 5, 2014, 7:36pm UTC](https://forum.servoy.com/t/views-and-row-identifier/18001/3 "2014-06-05T19:36:53Z")

</div>

Thanks Marc,

I’ll try that, but I think the problem is more with Postgresql views.

Before I used Oracle and there the columns in a view also have a NotNull atribute.  
It looks like Postgresql does not have that.

And I guess Servoy sets all columns in a Postgresql view to nullable.  
And then if You set a column as row identifier You end up with this warning.

Maybe one of the Servoyans can comment on this ?

Regards,

---

<div class="post-metadata">

**Author:** ![deezzub](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@deezzub](https://forum.servoy.com/u/deezzub)\
**Post date:** [June 6, 2014, 12:25pm UTC](https://forum.servoy.com/t/views-and-row-identifier/18001/4 "2014-06-06T12:25:50Z")

</div>

I had the same for FoxPro DBF tables: [“SVY-6373: Warnings for tables which has row identity set, but column allows null”](https://support.servoy.com/browse/SVY-6373).

---

<div class="post-metadata">

**Author:** ![Hans\_Nieuwenhuis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@Hans\_Nieuwenhuis](https://forum.servoy.com/u/Hans_Nieuwenhuis)\
**Post date:** [June 6, 2014, 2:06pm UTC](https://forum.servoy.com/t/views-and-row-identifier/18001/5 "2014-06-06T14:06:52Z")

</div>

Thanks Sebastian,

I looked at the response to your ticket from Servoy. It is “won’t fix”.  
That makes sense because your case is about tables, for which the columns can be set tot null/not null.

For Postgresql views the columns can not be set to null/not null.

Regards,

---

<div class="post-metadata">

**Author:** ![deezzub](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@deezzub](https://forum.servoy.com/u/deezzub)\
**Post date:** [June 6, 2014, 3:21pm UTC](https://forum.servoy.com/t/views-and-row-identifier/18001/6 "2014-06-06T15:21:39Z")

</div>

> Hans Nieuwenhuis:  
> That makes sense because your case is about tables, for which the columns can be set tot null/not null.
> 
> For Postgresql views the columns can not be set to null/not null.

Hello Hans, do you mean in Servoy or in the database?

---

<div class="post-metadata">

**Author:** ![Hans\_Nieuwenhuis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@Hans\_Nieuwenhuis](https://forum.servoy.com/u/Hans_Nieuwenhuis)\
**Post date:** [June 6, 2014, 3:39pm UTC](https://forum.servoy.com/t/views-and-row-identifier/18001/7 "2014-06-06T15:39:49Z")

</div>

Hello Sebastian,

Both.

In Postgresql You can not set a views column to null/not null and if a view contains table columns that are defined as not null in the table,  
the view does not reflect this.

In servoy the columns from a Postgresql view are all shown as “null allowed” and that flag is not editable.

Regards,
