Skip to content

pg.Result.fields isn't always an array #2056

@songsanli

Description

@songsanli

After this commit, pg.Result.fields will be an array only after pg.Result.addFields() is called.

However, pg.Result.addFields() is called only in the callback of RowDescription event, which is dispatched by pg in response to a SELECT, FETCH, etc query. If I send sqls like create SCHEMA hello, the pg.Result.fields will remain undefined. This behavior is different from the doc:

Every result will have a fields array.

Please heve a look. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions