forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Rowversion datatype with Insert Bulk (babelfish-for-postgresq…
…l#776) Added support for rowversion/timestamp datatype with Insert Bulk. Currently no operation happens when we do insert bulk for table having rowversion/timestamp datatype. With this changes added support for rowversion colmetadata and a default value of rowversion is inserted for all rows inserted during an insert bulk operation. Issues Resolved: BABEL-3584 Signed-off-by: Shlok Kyal skkyal@amazon.com
- Loading branch information
Showing
28 changed files
with
650 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
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
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
18 changes: 18 additions & 0 deletions
18
test/JDBC/expected/14_3__preparation__get_tds_id-vu-prepare.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE PROCEDURE get_tds_id_proc | ||
AS | ||
SELECT get_tds_id('timestamp') as rv; | ||
GO | ||
|
||
CREATE FUNCTION get_tds_id_func(@a sys.varchar(50)) | ||
RETURNS INT | ||
AS | ||
BEGIN | ||
DECLARE @b int; | ||
SET @b = (SELECT get_tds_id(@a) as rv); | ||
RETURN @b; | ||
END | ||
GO | ||
|
||
CREATE VIEW get_tds_id_view AS | ||
SELECT * FROM get_tds_id('timestamp') AS rv | ||
GO |
18 changes: 18 additions & 0 deletions
18
test/JDBC/expected/14_5__preparation__get_tds_id-vu-prepare.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE PROCEDURE get_tds_id_proc | ||
AS | ||
SELECT get_tds_id('timestamp') as rv; | ||
GO | ||
|
||
CREATE FUNCTION get_tds_id_func(@a sys.varchar(50)) | ||
RETURNS INT | ||
AS | ||
BEGIN | ||
DECLARE @b int; | ||
SET @b = (SELECT get_tds_id(@a) as rv); | ||
RETURN @b; | ||
END | ||
GO | ||
|
||
CREATE VIEW get_tds_id_view AS | ||
SELECT * FROM get_tds_id('timestamp') AS rv | ||
GO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DROP PROCEDURE get_tds_id_proc; | ||
GO | ||
|
||
DROP FUNCTION get_tds_id_func; | ||
GO | ||
|
||
DROP VIEW get_tds_id_view; | ||
GO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE PROCEDURE get_tds_id_proc | ||
AS | ||
SELECT get_tds_id('timestamp') as rv; | ||
GO | ||
|
||
CREATE FUNCTION get_tds_id_func(@a sys.varchar(50)) | ||
RETURNS INT | ||
AS | ||
BEGIN | ||
DECLARE @b int; | ||
SET @b = (SELECT get_tds_id(@a) as rv); | ||
RETURN @b; | ||
END | ||
GO | ||
|
||
CREATE VIEW get_tds_id_view AS | ||
SELECT * FROM get_tds_id('timestamp') AS rv | ||
GO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
EXEC get_tds_id_proc; | ||
GO | ||
~~START~~ | ||
int | ||
173 | ||
~~END~~ | ||
|
||
|
||
SELECT get_tds_id_func('timestamp') as rv; | ||
GO | ||
~~START~~ | ||
int | ||
173 | ||
~~END~~ | ||
|
||
|
||
SELECT get_tds_id_func('random') as rv; | ||
GO | ||
~~START~~ | ||
int | ||
0 | ||
~~END~~ | ||
|
||
|
||
-- for minor version upgrade this view will use previous version of the get_tds_id function | ||
SELECT * FROM get_tds_id_view; | ||
GO | ||
~~START~~ | ||
int | ||
173 | ||
~~END~~ | ||
|
8 changes: 8 additions & 0 deletions
8
test/JDBC/expected/latest__verification_cleanup__14_3__get_tds_id-vu-cleanup.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DROP PROCEDURE get_tds_id_proc; | ||
GO | ||
|
||
DROP FUNCTION get_tds_id_func; | ||
GO | ||
|
||
DROP VIEW get_tds_id_view; | ||
GO |
32 changes: 32 additions & 0 deletions
32
test/JDBC/expected/latest__verification_cleanup__14_3__get_tds_id-vu-verify.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
EXEC get_tds_id_proc; | ||
GO | ||
~~START~~ | ||
int | ||
173 | ||
~~END~~ | ||
|
||
|
||
SELECT get_tds_id_func('timestamp') as rv; | ||
GO | ||
~~START~~ | ||
int | ||
173 | ||
~~END~~ | ||
|
||
|
||
SELECT get_tds_id_func('random') as rv; | ||
GO | ||
~~START~~ | ||
int | ||
0 | ||
~~END~~ | ||
|
||
|
||
-- for minor version upgrade this view will use previous version of the get_tds_id function | ||
SELECT * FROM get_tds_id_view; | ||
GO | ||
~~START~~ | ||
int | ||
0 | ||
~~END~~ | ||
|
8 changes: 8 additions & 0 deletions
8
test/JDBC/expected/latest__verification_cleanup__14_5__get_tds_id-vu-cleanup.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DROP PROCEDURE get_tds_id_proc; | ||
GO | ||
|
||
DROP FUNCTION get_tds_id_func; | ||
GO | ||
|
||
DROP VIEW get_tds_id_view; | ||
GO |
32 changes: 32 additions & 0 deletions
32
test/JDBC/expected/latest__verification_cleanup__14_5__get_tds_id-vu-verify.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
EXEC get_tds_id_proc; | ||
GO | ||
~~START~~ | ||
int | ||
173 | ||
~~END~~ | ||
|
||
|
||
SELECT get_tds_id_func('timestamp') as rv; | ||
GO | ||
~~START~~ | ||
int | ||
173 | ||
~~END~~ | ||
|
||
|
||
SELECT get_tds_id_func('random') as rv; | ||
GO | ||
~~START~~ | ||
int | ||
0 | ||
~~END~~ | ||
|
||
|
||
-- for minor version upgrade this view will use previous version of the get_tds_id function | ||
SELECT * FROM get_tds_id_view; | ||
GO | ||
~~START~~ | ||
int | ||
0 | ||
~~END~~ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DROP PROCEDURE get_tds_id_proc; | ||
GO | ||
|
||
DROP FUNCTION get_tds_id_func; | ||
GO | ||
|
||
DROP VIEW get_tds_id_view; | ||
GO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE PROCEDURE get_tds_id_proc | ||
AS | ||
SELECT get_tds_id('timestamp') as rv; | ||
GO | ||
|
||
CREATE FUNCTION get_tds_id_func(@a sys.varchar(50)) | ||
RETURNS INT | ||
AS | ||
BEGIN | ||
DECLARE @b int; | ||
SET @b = (SELECT get_tds_id(@a) as rv); | ||
RETURN @b; | ||
END | ||
GO | ||
|
||
CREATE VIEW get_tds_id_view AS | ||
SELECT * FROM get_tds_id('timestamp') AS rv | ||
GO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
EXEC get_tds_id_proc; | ||
GO | ||
|
||
SELECT get_tds_id_func('timestamp') as rv; | ||
GO | ||
|
||
SELECT get_tds_id_func('random') as rv; | ||
GO | ||
|
||
-- for minor version upgrade this view will use previous version of the get_tds_id function | ||
SELECT * FROM get_tds_id_view; | ||
GO |
18 changes: 18 additions & 0 deletions
18
test/JDBC/upgrade/14_3/preparation/get_tds_id-vu-prepare.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE PROCEDURE get_tds_id_proc | ||
AS | ||
SELECT get_tds_id('timestamp') as rv; | ||
GO | ||
|
||
CREATE FUNCTION get_tds_id_func(@a sys.varchar(50)) | ||
RETURNS INT | ||
AS | ||
BEGIN | ||
DECLARE @b int; | ||
SET @b = (SELECT get_tds_id(@a) as rv); | ||
RETURN @b; | ||
END | ||
GO | ||
|
||
CREATE VIEW get_tds_id_view AS | ||
SELECT * FROM get_tds_id('timestamp') AS rv | ||
GO |
Oops, something went wrong.