Skip to content

Commit

Permalink
Merge branch 'BABEL_3_X_DEV' into dev-babel-3953-datetrunc
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandeep Kumawat committed Oct 10, 2023
2 parents 1bd793e + 818bf34 commit faffe7a
Show file tree
Hide file tree
Showing 35 changed files with 2,653 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ runs:
elif [[ ${{inputs.engine_branch}} != *"__PG_13_"* ]]; then
cd ../..
rm -rf pg_hint_plan
git clone --depth 1 --branch REL15_1_5_0 https://github.com/ossc-db/pg_hint_plan.git
git clone --depth 1 --branch REL15_1_5_1 https://github.com/ossc-db/pg_hint_plan.git
cd pg_hint_plan
export PATH=$HOME/${{ inputs.install_dir }}/bin:$PATH
make
Expand Down
63 changes: 63 additions & 0 deletions contrib/babelfishpg_tsql/sql/sys_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,53 @@ SELECT
WHERE FALSE;
GRANT SELECT ON sys.spatial_index_tessellations TO PUBLIC;

CREATE OR REPLACE VIEW sys.asymmetric_keys
AS
SELECT
CAST('' as sys.sysname) AS name
, CAST(0 as sys.int) AS principal_id
, CAST(0 as sys.int) AS asymmetric_key_id
, CAST('a' as sys.bpchar(2)) AS pvt_key_encryption_type
, CAST('' as sys.nvarchar(60)) AS pvt_key_encryption_type_desc
, CAST(null as sys.varbinary(32)) as thumbprint
, CAST('a' as sys.bpchar(2)) AS algorithm
, CAST('' as sys.nvarchar(60)) AS algorithm_desc
, CAST(0 as sys.int) AS key_length
, CAST(null as sys.varbinary(85)) as sid
, CAST('' as sys.nvarchar(128)) AS string_sid
, CAST(NULL as sys.varbinary(8000)) AS public_key
, CAST('' as sys.nvarchar(260)) AS attested_by
, CAST('' as sys.nvarchar(120)) AS provider_type
, CAST(NULL as sys.UNIQUEIDENTIFIER) as cryptographic_provider_guid
, CAST(NULL AS sys.sql_variant) AS cryptographic_provider_algid

WHERE FALSE;
GRANT SELECT ON sys.asymmetric_keys TO PUBLIC;

CREATE OR REPLACE VIEW sys.certificates
AS
SELECT
CAST('' as sys.sysname) AS name
, CAST(0 as sys.int) AS principal_id
, CAST(0 as sys.int) AS asymmetric_key_id
, CAST('a' as sys.bpchar(2)) AS pvt_key_encryption_type
, CAST('' as sys.nvarchar(60)) AS pvt_key_encryption_type_desc
, CAST(0 as sys.bit) AS is_active_for_begin_dialog
, CAST('' as sys.nvarchar(442)) AS issuer_name
, CAST('' as sys.nvarchar(64)) AS cert_serial_number
, CAST(null as sys.varbinary(85)) as sid
, CAST('' as sys.nvarchar(128)) AS string_sid
, CAST('' as sys.nvarchar(4000)) AS subject
, CAST('' as sys.datetime) AS expiry_date
, CAST('' as sys.datetime) AS start_date
, CAST(null as sys.varbinary(32)) as thumbprint
, CAST('' as sys.nvarchar(260)) as attested_by
, CAST('' as sys.datetime) AS pvt_key_last_backup_date
, CAST(0 AS sys.int) AS key_length

WHERE FALSE;
GRANT SELECT ON sys.certificates TO PUBLIC;

CREATE OR REPLACE VIEW sys.all_parameters
AS
SELECT
Expand Down Expand Up @@ -3004,3 +3051,19 @@ SELECT
CAST(0 as sys.BIT) AS is_ambiguous
WHERE FALSE;
GRANT SELECT ON sys.sql_expression_dependencies TO PUBLIC;

CREATE OR REPLACE VIEW sys.database_permissions
AS
SELECT
CAST(0 as sys.tinyint) AS class,
CAST('' as sys.NVARCHAR(60)) AS class_desc,
CAST(0 as sys.int) AS major_id,
CAST(0 as sys.int) AS minor_id,
CAST(0 as sys.int) AS grantee_principal_id,
CAST(0 as sys.int) AS grantor_principal_id,
CAST('a' as sys.BPCHAR(4)) AS type,
CAST('' as sys.NVARCHAR(128)) AS permission_name,
CAST('G' as sys.BPCHAR(1)) AS state,
CAST('' as sys.NVARCHAR(60)) AS state_desc
WHERE FALSE;
GRANT SELECT ON sys.database_permissions TO PUBLIC;
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,70 @@ LANGUAGE plpgsql;
* final behaviour.
*/


CREATE OR REPLACE VIEW sys.asymmetric_keys
AS
SELECT
CAST('' as sys.sysname) AS name
, CAST(0 as sys.int) AS principal_id
, CAST(0 as sys.int) AS asymmetric_key_id
, CAST('a' as sys.bpchar(2)) AS pvt_key_encryption_type
, CAST('' as sys.nvarchar(60)) AS pvt_key_encryption_type_desc
, CAST(null as sys.varbinary(32)) as thumbprint
, CAST('a' as sys.bpchar(2)) AS algorithm
, CAST('' as sys.nvarchar(60)) AS algorithm_desc
, CAST(0 as sys.int) AS key_length
, CAST(null as sys.varbinary(85)) as sid
, CAST('' as sys.nvarchar(128)) AS string_sid
, CAST(NULL as sys.varbinary(8000)) AS public_key
, CAST('' as sys.nvarchar(260)) AS attested_by
, CAST('' as sys.nvarchar(120)) AS provider_type
, CAST(NULL as sys.UNIQUEIDENTIFIER) as cryptographic_provider_guid
, CAST(NULL AS sys.sql_variant) AS cryptographic_provider_algid

WHERE FALSE;
GRANT SELECT ON sys.asymmetric_keys TO PUBLIC;

CREATE OR REPLACE VIEW sys.certificates
AS
SELECT
CAST('' as sys.sysname) AS name
, CAST(0 as sys.int) AS principal_id
, CAST(0 as sys.int) AS asymmetric_key_id
, CAST('a' as sys.bpchar(2)) AS pvt_key_encryption_type
, CAST('' as sys.nvarchar(60)) AS pvt_key_encryption_type_desc
, CAST(0 as sys.bit) AS is_active_for_begin_dialog
, CAST('' as sys.nvarchar(442)) AS issuer_name
, CAST('' as sys.nvarchar(64)) AS cert_serial_number
, CAST(null as sys.varbinary(85)) as sid
, CAST('' as sys.nvarchar(128)) AS string_sid
, CAST('' as sys.nvarchar(4000)) AS subject
, CAST('' as sys.datetime) AS expiry_date
, CAST('' as sys.datetime) AS start_date
, CAST(null as sys.varbinary(32)) as thumbprint
, CAST('' as sys.nvarchar(260)) as attested_by
, CAST('' as sys.datetime) AS pvt_key_last_backup_date
, CAST(0 AS sys.int) AS key_length

WHERE FALSE;
GRANT SELECT ON sys.certificates TO PUBLIC;

CREATE OR REPLACE VIEW sys.database_permissions
AS
SELECT
CAST(0 as sys.tinyint) AS class,
CAST('' as sys.NVARCHAR(60)) AS class_desc,
CAST(0 as sys.int) AS major_id,
CAST(0 as sys.int) AS minor_id,
CAST(0 as sys.int) AS grantee_principal_id,
CAST(0 as sys.int) AS grantor_principal_id,
CAST('a' as sys.bpchar(4)) AS type,
CAST('' as sys.NVARCHAR(128)) AS permission_name,
CAST('G' as sys.bpchar(1)) AS state,
CAST('' as sys.NVARCHAR(60)) AS state_desc
WHERE FALSE;
GRANT SELECT ON sys.database_permissions TO PUBLIC;

CREATE OR REPLACE VIEW information_schema_tsql.key_column_usage AS
SELECT
CAST(nc.dbname AS sys.nvarchar(128)) AS "CONSTRAINT_CATALOG",
Expand Down
Loading

0 comments on commit faffe7a

Please sign in to comment.