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

tree: cast TIMESTAMP to TEXT without timezone data #51692

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

otan
Copy link
Contributor

@otan otan commented Jul 22, 2020

This better matches postgres. I'm guessing it used to be done this way
to match the CLI output (which we can't fix without changing lib/pq),
but this affects output results from ORM tests. Note that CLI output is
not affected unless TIMESTAMP is cast to text.

Release note (sql change): Casting TIMESTAMP types to TEXT related types
now omits the timezone component. For example, '2001-12-15
15:14:13'::TIMESTAMP will now format as '2001-12-15 15:14:13' instead of
'2001-12-15 15:14:13+00:00'.

@otan otan requested review from rohany and a team July 22, 2020 02:33
@otan otan requested a review from a team as a code owner July 22, 2020 02:33
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@knz
Copy link
Contributor

knz commented Jul 22, 2020

Can you explain in the release note (perhaps anotherone with category 'cli change') what the expected change is in the CLI shell.

@otan
Copy link
Contributor Author

otan commented Jul 22, 2020 via email

@otan otan force-pushed the fix_cast_timestamp branch from 013c3f9 to 6fd7cb3 Compare July 22, 2020 14:35
@otan otan requested a review from a team July 22, 2020 14:35
@otan otan requested a review from a team as a code owner July 22, 2020 14:35
@otan otan requested review from adityamaru and removed request for a team July 22, 2020 14:35
@otan otan force-pushed the fix_cast_timestamp branch 2 times, most recently from a97f73d to f77d857 Compare July 22, 2020 14:53
This better matches postgres. I'm guessing it used to be done this way
to match the CLI output (which we can't fix without changing lib/pq),
but this affects output results from ORM tests. Note that CLI output is
not affected unless TIMESTAMP is cast to text.

Release note (sql change): Casting TIMESTAMP types to TEXT related types
now omits the timezone component. For example, '2001-12-15
15:14:13'::TIMESTAMP will now format as '2001-12-15 15:14:13' instead of
'2001-12-15 15:14:13+00:00'.
@otan otan force-pushed the fix_cast_timestamp branch from f77d857 to 79949e1 Compare July 22, 2020 15:47
@otan
Copy link
Contributor Author

otan commented Jul 22, 2020

TFTR!

bors r=rohany,adityamaru

@craig
Copy link
Contributor

craig bot commented Jul 23, 2020

Build succeeded:

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 this pull request may close these issues.

5 participants