GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Postgres driver: error on creating non-string properties · Issue #691 · ArcadeData/arcadedb

Postgres driver: error on creating non-string properties #691

New issue
Copy link
New issue
Copy link
Closed
Closed
Postgres driver: error on creating non-string properties#691
Copy link
Assignees
lvca
Milestone
22.12.1

Description

@docbacardi
docbacardi
opened on Dec 20, 2022
Issue body actions

ArcadeDB Version: 22.12.1-SNAPSHOT

JDK Version: openjdk version "11.0.17" 2022-10-18

OS: Ubuntu 22.04.1 LTS

Expected behavior

I have a vertex type with several properties:

chicken@asteroid:~$ psql --host=localhost testdatabase root
Password for user root: 
psql (14.5 (Ubuntu 14.5-0ubuntu0.22.04.1), server 10.5)
Type "help" for help.

testdatabase=> CREATE VERTEX TYPE v;
     operation      | typeName 
--------------------+----------
 create vertex type | v
(1 row)

INSERT 0 1
testdatabase=> CREATE PROPERTY v.s STRING;
    operation    | typeName | propertyName 
-----------------+----------+--------------
 create property | v        | s
(1 row)

testdatabase=> CREATE PROPERTY v.i INTEGER;
    operation    | typeName | propertyName 
-----------------+----------+--------------
 create property | v        | i
(1 row)

testdatabase=> CREATE PROPERTY v.b BOOLEAN;
    operation    | typeName | propertyName 
-----------------+----------+--------------
 create property | v        | b
(1 row)

testdatabase=> CREATE PROPERTY v.sh SHORT;
    operation    | typeName | propertyName 
-----------------+----------+--------------
 create property | v        | sh
(1 row)

testdatabase=> CREATE PROPERTY v.d DOUBLE;
    operation    | typeName | propertyName 
-----------------+----------+--------------
 create property | v        | d
(1 row)

testdatabase=> CREATE PROPERTY v.da DATETIME;
    operation    | typeName | propertyName 
-----------------+----------+--------------
 create property | v        | da
(1 row)

A new vertex is created and selected:

testdatabase=> CREATE VERTEX v SET s="abc", i=1, b=true, sh=2, d=3.5, da="2022-12-20 18:00";
  s  | i |  b   | sh |   d   | da 
-----+---+------+----+-------+----
 abc |   | \x01 |    | @\x0C | 
(1 row)

INSERT 0 1
testdatabase=> {gremlin} g.V().hasLabel('v');
  s  | i |  b   | sh |   d   | da 
-----+---+------+----+-------+----
 abc |   | \x01 |    | @\x0C | 
(1 row)

Please note the strange response for both commands. The values for the properties i and sh are empty. The boolean b looks like binary data. The double d does not look very much like a number, and the date-time da is empty.
The studio shows the correct values for all fields, including "true" for the boolean.

Activity

  1. docbacardi
    changed the title [-]Empty values for number type properties.[/-] [+]Creating non-string properties.[/+] on Dec 20, 2022
  2. lvca commented on Dec 20, 2022

    @lvca
    lvca
    on Dec 20, 2022
    Member
    More actions

    Ok, if Studio works, it must be an issue with the console. I'm going to write a test case for this.

  3. lvca
    self-assigned this
    on Dec 20, 2022
  4. lvca
    added
    bug
    on Dec 20, 2022
  5. lvca
    added this to the 22.12.1 milestone on Dec 20, 2022
  6. lvca commented on Dec 20, 2022

    @lvca
    lvca
    on Dec 20, 2022
    Member
    More actions

    Just written a test case and the return from the command is:

    ArcadeDB Console v.22.12.1-SNAPSHOT - Copyrights (c) 2021 Arcade Data Ltd (https://arcadedb.com)
    Database already connected, to connect to a different database close the current one first
    +---------+------------------+
    |NAME     |VALUE             |
    +---------+------------------+
    |operation|create vertex type|
    |typeName |v                 |
    +---------+------------------+
    Command executed in 197ms
    +------------+---------------+
    |NAME        |VALUE          |
    +------------+---------------+
    |operation   |create property|
    |typeName    |v              |
    |propertyName|s              |
    +------------+---------------+
    Command executed in 9ms
    +------------+---------------+
    |NAME        |VALUE          |
    +------------+---------------+
    |operation   |create property|
    |typeName    |v              |
    |propertyName|i              |
    +------------+---------------+
    Command executed in 2ms
    +------------+---------------+
    |NAME        |VALUE          |
    +------------+---------------+
    |operation   |create property|
    |typeName    |v              |
    |propertyName|b              |
    +------------+---------------+
    Command executed in 3ms
    +------------+---------------+
    |NAME        |VALUE          |
    +------------+---------------+
    |operation   |create property|
    |typeName    |v              |
    |propertyName|sh             |
    +------------+---------------+
    Command executed in 3ms
    +------------+---------------+
    |NAME        |VALUE          |
    +------------+---------------+
    |operation   |create property|
    |typeName    |v              |
    |propertyName|d              |
    +------------+---------------+
    Command executed in 3ms
    +------------+---------------+
    |NAME        |VALUE          |
    +------------+---------------+
    |operation   |create property|
    |typeName    |v              |
    |propertyName|da             |
    +------------+---------------+
    Command executed in 3ms
    VERTEX @type:v @rid:#1:0
    +----+-----------------------+
    |NAME|VALUE                  |
    +----+-----------------------+
    |s   |abc                    |
    |i   |1                      |
    |b   |true                   |
    |sh  |2                      |
    |d   |3.5                    |
    |da  |2022-12-20 00:00:00.000|
    +----+-----------------------+
    Command executed in 23ms
    
  7. lvca
    added a commit that references this issue on Dec 20, 2022

    Added test case for issue #691

    d237c20
  8. docbacardi commented on Dec 22, 2022

    @docbacardi
    docbacardi
    on Dec 22, 2022
    ContributorAuthor
    More actions

    Indeed, looks like it only happens in postgresql.

  9. lvca commented on Dec 22, 2022

    @lvca
    lvca
    on Dec 22, 2022
    Member
    More actions

    I was able to reproduce the problem from postgres console. Working on it.

  10. lvca commented on Dec 22, 2022

    @lvca
    lvca
    on Dec 22, 2022
    Member
    More actions

    Ok, the commands are executed correctly, but the output is serialized wrongly. I tried with a small fix that serializes by using the stringify protocol and works (everything but the FLOAT number for some reason). I need to dig a little bit more into this. Unfortunately the documentation on how to serialize types in Postgres Wire protocol is scarce/non-existent :-(

  11. lvca
    added a commit that references this issue on Dec 22, 2022

    fix: postgres driver now serialize correctly all data types

    d4f8134
  12. lvca commented on Dec 22, 2022

    @lvca
    lvca
    on Dec 22, 2022
    Member
    More actions

    Fixed. Changed serialization to text.

  13. lvca
    closed this as completedon Dec 22, 2022
  14. lvca
    added
    bug fixed
    on Dec 22, 2022
  15. docbacardi commented on Dec 23, 2022

    @docbacardi
    docbacardi
    on Dec 23, 2022
    ContributorAuthor
    More actions

    All results look good now, including floats. This is just perfect.

    Reacted by Luca Garulli
    Reacted by Luca Garulli
  16. lvca
    changed the title [-]Creating non-string properties.[/-] [+]Postgres driver: error on creating non-string properties[/+] on Dec 23, 2022
  17. mergify
    added a commit that references this issue on Dec 1, 2025

    chore(deps): bump dorny/test-reporter from 2.2.0 to 2.3.0 [skip ci]

    30b61d4
  18. mergify
    added a commit that references this issue on Feb 8, 2026

    chore(deps-dev): bump org.codehaus.mojo:license-maven-plugin from 2.4…

    e83f28e
  19. tae898
    added 4 commits that reference this issue on Jun 28, 2026

    Added test case for issue ArcadeData#691

    b4f9b08

    fix: postgres driver now serialize correctly all data types

    7182c26

    chore(deps): bump dorny/test-reporter from 2.2.0 to 2.3.0 [skip ci]

    ddc3273

    chore(deps-dev): bump org.codehaus.mojo:license-maven-plugin from 2.4…

    5aeb5a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    • 22.12.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.