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

The cypher function terminated the connection due to missing query argument #718

Closed
mohayu22 opened this issue Feb 25, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@mohayu22
Copy link
Contributor

Bug Description:
I ran a query on my graph using the following code:
SELECT * FROM cypher('demo_graph') as (v agtype);

However, I forgot to include the query argument for the Cypher function. As a result, the server closed the connection unexpectedly, and I received the error message.

server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

Expected Result:
I was expecting an exception to be raised (throw an Error) instead of the connection being terminated.

Setup:
Command Line: start postgres with pg_ctl --> connect to database with psql

Environment:
PostgreSQL v11.18 | Latest Apache Age | Ubuntu 20.04.5 LTS

@mohayu22 mohayu22 added the bug Something isn't working label Feb 25, 2023
@mohayu22 mohayu22 changed the title The Cypher function terminated the connection due to missing query argument The cypher function terminated the connection due to missing query argument Feb 25, 2023
@jrgemignani
Copy link
Contributor

@mohayu22 Thank you for catching this. It appears that when I added in some code for driver integration, an edge case was overlooked. I will correct it.

jrgemignani added a commit that referenced this issue Mar 1, 2023
Fixed issue #718 which was due to a lack of input checks for an
edge case and added regression tests.

Addition of the driver parameter patch caused 2 additional edge
cases that needed to be checked -

    SELECT * FROM cypher() AS (result agtype);
    SELECT * FROM cypher(NULL) AS (result agtype);
@jrgemignani
Copy link
Contributor

@mohayu22 The master has been updated with a fix for this issue.

@mohayu22 mohayu22 closed this as completed Mar 5, 2023
jrgemignani added a commit that referenced this issue Mar 20, 2023
Fixed issue #718 which was due to a lack of input checks for an
edge case and added regression tests.

Addition of the driver parameter patch caused 2 additional edge
cases that needed to be checked -

    SELECT * FROM cypher() AS (result agtype);
    SELECT * FROM cypher(NULL) AS (result agtype);
jrgemignani added a commit that referenced this issue Mar 24, 2023
Fixed issue #718 which was due to a lack of input checks for an
edge case and added regression tests.

Addition of the driver parameter patch caused 2 additional edge
cases that needed to be checked -

    SELECT * FROM cypher() AS (result agtype);
    SELECT * FROM cypher(NULL) AS (result agtype);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants