Last active
October 3, 2016 22:51
-
-
Save teepark/9279c57ad4aa15dc68597afeaaab0ec2 to your computer and use it in GitHub Desktop.
multi-insert with composite type fails?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create domain required_int as integer check (not null); | |
create type xypoint as ( | |
name text, | |
x required_int, | |
y int | |
); | |
create table foo ( | |
description text, | |
location xypoint | |
); | |
-- single insert works fine | |
insert into foo (description, location.name, location.x) | |
values ('desc1', 'home', 1); | |
-- but a bulk insert fails | |
insert into foo (description, location.name, location.x) | |
values | |
('desc2', 'work', 2), | |
('desc3', 'the bar', 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment