Skip to content

handle '@' in postgres text fields #22

@marc1uk

Description

@marc1uk

currently the config pages fail to insert records if text fields (such as name or description) contain the '@' character.
the resulting output from sqlquery.cgi was:

got request with user: 'root', db: 'daq', '
        INSERT INTO configurations (time, name, version, description, author, data)
        VALUES ( now(), 'webtest', (select COALESCE(MAX(version)+1,0) FROM configurations WHERE name='webtest'),
                 ' hello this is an information message ..![][]<>?/`~'@'', 'marcus', '{"five":5}'::jsonb)
    '
query return: 'ERROR:  operator is not unique: unknown @ unknown
LINE 4: ...ello this is an information message ..![][]<>?/`~'@'', 'marc...
                                                             ^
HINT:  Could not choose a best candidate operator. You might need to add explicit type casts.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions