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

sql: "no database specified" in pgwire session with database properly set #4550

Closed
knz opened this issue Feb 22, 2016 · 2 comments · Fixed by #4610
Closed

sql: "no database specified" in pgwire session with database properly set #4550

knz opened this issue Feb 22, 2016 · 2 comments · Fixed by #4610
Assignees

Comments

@knz
Copy link
Contributor

knz commented Feb 22, 2016

Assuming #4537 and #4548 , investigating #4036, next error:

  • JDBC sends CREATE TABLE test, this succeeds;
  • next command is INSERT INTO test VALUES ..., this fails with error: no database specified: test.

Network trace:

Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
PostgreSQL
    Type: Parse
    Length: 13
    Statement: 
    Query: BEGIN
    Parameters: 0
PostgreSQL
    Type: Bind
    Length: 12
    Portal: 
    Statement: 
    Parameter formats: 0
    Parameter values: 0
    Result formats: 0
PostgreSQL
    Type: Execute
    Length: 9
    Portal: 
    Returns: all rows
PostgreSQL
    Type: Parse
    Length: 76
    Statement: 
    Query: INSERT INTO test ( name, val ) VALUES ( $1, $2 ) RETURNING *
    Parameters: 2
        Type OID: 1043
        Type OID: 20
PostgreSQL
    Type: Bind
    Length: 33
    Portal: 
    Statement: 
    Parameter formats: 2
        Format: Text (0)
        Format: Binary (1)
    Parameter values: 2
        Column length: 1
        Data: 61
        Column length: 8
        Data: 0000000000000000
    Result formats: 0
PostgreSQL
    Type: Describe
    Length: 6
    Portal: 
PostgreSQL
    Type: Execute
    Length: 9
    Portal: 
    Returns: all rows
PostgreSQL
    Type: Sync
    Length: 4

Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
PostgreSQL
    Type: Parse completion
    Length: 4

Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
PostgreSQL
    Type: Bind completion
    Length: 4

Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1

Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
PostgreSQL
    Type: Command completion
    Length: 10
    Tag: BEGIN

Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
PostgreSQL
    Type: Error
    Length: 48
    Severity: ERROR
    Code: XX000
    Message: no database specified: test

Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
PostgreSQL
    Type: Ready for query
    Length: 5
    Status: In a transaction (84)
@knz
Copy link
Contributor Author

knz commented Feb 22, 2016

Waiting for #4578 to propose a standalone test (will extract from #4557).

@knz
Copy link
Contributor Author

knz commented Feb 25, 2016

While looking at #4036

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

Successfully merging a pull request may close this issue.

2 participants