Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error pq: function row_to_json(text) does not exist #623

Closed
murilofurquim opened this issue Nov 5, 2021 · 5 comments
Closed

Error pq: function row_to_json(text) does not exist #623

murilofurquim opened this issue Nov 5, 2021 · 5 comments
Labels
Milestone

Comments

@murilofurquim
Copy link

I'm trying to use prest and have encountered the following error when trying to insert data:
{ "error": "pq: function row_to_json(text) does not exist" }
The GET request works fine, returning data correctly.

I'm using docker for both postgres and prest, both their latest tags.

Here is the prest docker log:
2021/11/05 20:14:02 [msg] tables.go:225 pq: function row_to_json(text) does not exist
[negroni] 2021-11-05T20:14:02Z | 400 | 794.8µs | localhost:3000 | POST /postgres/public/operacao

@arxdsilva arxdsilva added the bug label Nov 10, 2021
@avelino
Copy link
Member

avelino commented Dec 7, 2021

@murilofurquim can you describe your environment?

  • postgresql version
  • prest version

with this we can simulate your environment here

@avelino avelino added the product/api-server REST API Server label Dec 7, 2021
@arxdsilva
Copy link
Member

row_to_json usage:

SQL = fmt.Sprintf(`%s RETURNING row_to_json("%s")`, SQL, tableName[2])

@avelino
Copy link
Member

avelino commented Jan 26, 2022

@murilofurquim what version of postgres are you using?

the row_to_json function that prestd uses is from postgres itself

@murilofurquim
Copy link
Author

murilofurquim commented Jan 28, 2022 via email

@arxdsilva
Copy link
Member

Closing as it is stale and probably related to the postgres version used.

Msg again with more info so we can debug better and reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants