Start a new topic

UUID Extension

[This topic is migrated from our old forums. The original author name has been removed]

Hey All, My project is using Postgres and I am using the UUID extension (uuid-ossp) for my database. All my primary keys are UUID for each table and for my xref tables foreign keys. DbVis does not like it. I get an error from Postgres (through DbVis) saying it expects UUID but is getting character varying (where it is indeed a uuid v4 string). Is there support for the UUID extension on DbVis that I have not found? \dx List of installed extensions Name | Version | Schema | Description -----------+---------+------------+------------------------------------------------- plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language uuid-ossp | 1.0 | public | generate universally unique identifiers (UUIDs) (2 rows) ---------------- \d t_user Table "public.t_user" Column | Type | Modifiers -------------------+------------------------+---------------------------------------------- user_id | uuid | not null default uuid_generate_v4() email | character varying(255) | not null If I try to edit a row on public.t_user, I get the error I explained above. Thanks in advance.

[This reply is migrated from our old forums.]

Re: UUID Extension
Adam, This is now fixed in the new 9.0.8 version. http://www.dbvis.com/download Regards Roger
[This reply is migrated from our old forums.]

Re: UUID Extension
Hi Adam, I tested with this statement: UPDATE "uuid_test" SET "id" = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', "col2" = 2 WHERE "id" = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11' for a table with this DDL: CREATE TABLE "uuid_test" ( "id" UUID NOT NULL, "col2" BIGINT, PRIMARY KEY ("id") ); Is your case different? Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: UUID Extension
Hey, Thanks for the update. I'll look forward to the maintenance release. However, I do believe I had this problem in SQL commander too. Just wanted to give you a heads up. I've had to run the commands at the psql prompt in the terminal.
[This reply is migrated from our old forums.]

Re: UUID Extension
Hi Adam, Thanks for reporting this. It was fixed in 8.0.8 but another fix in 8.0.12 caused the problem to reappear. It will be fixed again in the next maintenance release. For now, you need to run the UPDATE or INSERT statement in the SQL Commander. You can get some help generating the SQL using the Script to SQL Commander menu in the Data tab grid right-click menu. Best Regards, Hans