Comments (1)
Reduced repro:
CREATE FUNCTION f() RETURNS RECORD LANGUAGE plpgsql AS $$
BEGIN
IF true THEN
RETURN (1:::INT8, NULL, -1.0:::DECIMAL);
ELSIF false THEN
BEGIN
RETURN (1:::INT8, 1.0:::DECIMAL, NULL);
END;
END IF;
END;
$$;
If the nested block in the ELSIF
branch is omitted, then we get a nice error message:
CREATE FUNCTION f() RETURNS RECORD LANGUAGE plpgsql AS $$
BEGIN
IF true THEN
RETURN (1:::INT8, NULL, -1.0:::DECIMAL);
ELSIF false THEN
-- BEGIN
RETURN (1:::INT8, 1.0:::DECIMAL, NULL);
-- END;
END IF;
END;
$$;
-- ERROR: unimplemented: returning different types from a RECORD-returning function is not yet supported
-- SQLSTATE: 0A000
-- HINT: You have attempted to use a feature that is not yet implemented.
-- See: https://go.crdb.dev/issue-v/115384/v24.1
-- --
-- try casting all RETURN statements to the same type
from cockroach.
Related Issues (20)
- upgrade/upgrades: TestSessionBasedLeaseUpgrade failed HOT 1
- jobs: TestPauseReason failed HOT 2
- kv/kvserver: TestStrictGCEnforcement failed HOT 1
- ccl/schemachangerccl: TestBackupMixedVersionElements_base_drop_table failed HOT 1
- workload: initialize bank workload failed with syntax error HOT 1
- ccl/streamingccl/streamingest: TestStreamingReplanOnLag failed HOT 4
- pkg/sql/logictest/tests/local/local_test: TestLogic_upsert_non_metamorphic failed HOT 1
- pkg/sql/logictest/tests/fakedist-disk/fakedist-disk_test: TestLogic_upsert_non_metamorphic failed HOT 1
- ccl/sqlproxyccl/tenant: TestRefreshThrottling failed HOT 1
- pkg/sql/logictest/tests/local-mixed-23.2/local-mixed-23_2_test: TestLogic_upsert_non_metamorphic failed HOT 1
- pkg/sql/copy/copy_test: TestLargeDynamicRows failed HOT 1
- changefeedccl: collated string collation key present in output value HOT 4
- sql: optbuilder should only be invoked once for `CREATE FUNCTION` and `CREATE PROCEDURE`
- sql: inaccurate active constraint check in legacy schema changer HOT 1
- pkg/sql/logictest/tests/local-vec-off/local-vec-off_test: TestLogic_schema_repair failed HOT 1
- roachprod/prometheus: avoid scraping http on secure clusters HOT 2
- admission: control snapshot ingest disk write bandwidth HOT 1
- storage: TestFS failed HOT 2
- pkg/sql/logictest/tests/cockroach-go-testserver-23.1/cockroach-go-testserver-23_1_test: TestLogic_mixed_version_procedure failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cockroach.