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

Column name for builtin functions does not match upstream #1176

Open
jasobrown-rs opened this issue Mar 26, 2024 · 0 comments
Open

Column name for builtin functions does not match upstream #1176

jasobrown-rs opened this issue Mar 26, 2024 · 0 comments

Comments

@jasobrown-rs
Copy link
Contributor

Summary

The default column name for a builtin function that is used in a cached query does not match the upstream (at least for PG). Upstream PG defaults the column name to the simple name of the function, whereas readyset will append the parameter types to the function name (see below).

Expected behavior

Match the upstream naming: only function name is used (PG)

Actual behavior

function name and parameter types

Steps to reproduce

$ create table dogs (id int, name varchar(64), birth_date timestamptz default CURRENT_TIMESTAMP);

$ select date_trunc('minute', birth_date::timestamp) from dogs where id = 2;
     date_trunc      
---------------------
 2024-03-25 18:45:00
(1 row)

$ create cache from select date_trunc('minute', birth_date::timestamp) from dogs where id = 2;

$ select date_trunc('minute', birth_date::timestamp) from dogs where id = 2;
 date_trunc('minute', (`public`.`dogs`.`birth_date`::TIMESTAMP)) 
-----------------------------------------------------------------
 2024-03-25 18:45:00
(1 row)

Upstream DB type and version

PG, any version

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

No branches or pull requests

1 participant