Skip to content

SQL DATE_TRUNC query ExecutionError / FATAL: list index out of range #9118

@jackfischer

Description

@jackfischer
  • Gel Version: 6.11 and 7.0
  • Gel CLI Version: 7.9.0
  • OS Version:

Steps to Reproduce:

Run the following SQL,

SELECT 
	DATE_TRUNC('month', al."createdDatetime") as log_date,
    COUNT(*) as log_count
FROM "AuditLog" al
GROUP BY DATE_TRUNC('month', al."createdDatetime")

Gel protocol: ExecutionError: could not determine data type of parameter $2
SQL protocol: FATAL: list index out of range

Schema:

module default {

    type AuditLog {
        required createdDatetime: datetime {
            default := datetime_current();
        }
    }

}

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