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

supposedly incorrect behavior of serial columns with REPLACE #13166

Closed
antonkovalenko opened this issue Jan 4, 2025 · 6 comments
Closed

supposedly incorrect behavior of serial columns with REPLACE #13166

antonkovalenko opened this issue Jan 4, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@antonkovalenko
Copy link
Member

More details are in the gist by @nikolaymatrosov https://gist.github.com/nikolaymatrosov/8a4e77af2bbb15f3e9b160c1803d22f7

@antonkovalenko antonkovalenko added the bug Something isn't working label Jan 4, 2025
@nikolaymatrosov
Copy link

Same wrong behavior could be achieved with UPSERT.

@ssmike
Copy link
Collaborator

ssmike commented Jan 9, 2025

I made a test to reproduce #13211. It passes in main. Am I wrong somewhere? Which server version do you use?

@nikolaymatrosov
Copy link

Serverless YDB in the Yandex Cloud.

@nikolaymatrosov
Copy link

If you sequentially send these queries, you will get result as it shown in the screenshot.

DROP table users;
CREATE TABLE users (
	id Serial,
	name Utf8,
	PRIMARY KEY (id)
);
REPLACE INTO users(id, name) VALUES (2, "z");
REPLACE INTO users(name) VALUES ("a"), ("b"), ("c") RETURNING *;
Screenshot 2025-01-09 at 09 33 37

@ssmike
Copy link
Collaborator

ssmike commented Jan 9, 2025

Looks like an already fixed bug. You should wait for a newer release.

@ssmike
Copy link
Collaborator

ssmike commented Jan 9, 2025

24-3-13 should contain all the bugfixes.

@ssmike ssmike closed this as completed Jan 9, 2025
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

3 participants