Skip to content

result.rows doesn't return the data in the expected structure after upgrading to postgresql 17.5 #3529

@Ammar64

Description

@Ammar64
const result = await client.query("SELECT (uuid, name) FROM students WHERE phone_number = $1;", [phone_number]);
console.log( JSON.stringify(result.rows, null, 4) );

The previous code used to print the following output

[
    {
        "uuid": "0112b894-444b-4f27-9ac5-5d3de91cbe18",
        "name": "example"
    }
]

After upgrading to postgres 17.5
It outputs this

[
    {
        "row": "(0112b894-444b-4f27-9ac5-5d3de91cbe18,example)"
    }
]

The new output is inconvenient

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions