UIBakery Postgres field types

Hi there! Love this tool/platform, but interestingly enough, while building my postgres (uibakery’s built in) tables/schema i came across varchar and char type fields with no length specifications (i can’t find how) whereas i wanted to specify the type like varchar(20) and char(4) respectively. So the struggle did not yield results although i believe this is a shortcoming on my knowledge of the tool/documentation. Please clarify it to newbies like me, thanx a lot :slight_smile:

Hey @Uzlander,

This is an issue on UI Bakery’s side. I just checked the field types of the internal postgres db and it seems like the input of the field type only accepts values exactly from the list, well, at least if you select them. This is not a text input, but rather a select enhanced with a search functionality.

But it is rather a bizzare decision from UI Bakerys developers side. The character varying(n) type defaults to unlimited characters if no limit was specified, but on the other hand the (fixed-length) character(n) type defaults to 1. This means if you set any field to char like so
image
then you cannot enter more than 1 character to that field. (source)

Either way, it seems like currently your only viable option is to go for a character varying(n) type (so just varchar) and have no limit set for that field. That is if you do it with the UI Bakery internal databases, you could still set up a database on a server or something, but not everyone has access to that.

Hi guys!

@Max thanks for jumpining in, as usual :relieved:
It seems like a limitation of Database Editor only, you can create a varchar(20) column with the Query Runner in Data Sources.

So I run

CREATE TABLE example_table (
    example_column VARCHAR(20)
);

over my Postgres:

@Uzlander, could you please put length property as a feature request on https://roadmap.uibakery.io/?

1 Like

Thank you Max, yeah i wanted to go the easiest way(lowest entry barrier) - built in uibakery db, and a good thing is, its relational type, but this is what is has on the surface at the moment, now i see

This is a good thing, let me see if creating say CHAR(4) works ok too via query