• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

babelfish-for-postgresql / babelfish_extensions / 11160092314
74%
BABEL_5_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: fixing_year
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 03 Oct 2024 11:01AM UTC
Jobs 1
Files 114
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Oct 2024 10:14AM UTC coverage: 73.679% (+0.004%) from 73.675%
11160092314

push

github

web-flow
Modify APIs to return palloc'ed values and catalog lookup to validate the user in get_physical_user_name (#2960) (#2997)

Earlier in Babelfish, The get_*_role_name() and get_*_schema_name() APIs returned constant values or string literal for
few cases and palloc'ed copy for other cases. The get_physical_user_name() used to return the user_name after
appending the db_name to the user_name without any checks to verify its existence/validity.

With this change, We return Palloc'ed values for the API every time. In get_physical_user_name() if the user or role is
not found in the sys.babelfish_authid_user_ext catalog, then an error is thrown. Additionally, In multidb.c, made
changes to the APIs like get_role_name() and get_schema_name() to return palloc'ed values instead of constant
values.

Implemented a catalog lookup in get_physical_user_name() to verify if the user or role is found in the
sys.babelfish_authid_user_ext catalog. The 'suppress_role_error' flag indicates if it is ok for the user or role to be
absent from the catalog (required for cases when a new user/role is created and it can't be found in the catalog).

Checked all the functions where the APIs are called and pfree the variables containing values from the above APIs after they are no longer used.

Task: BABEL-4933
Signed-off-by: P Aswini Kumar <aswinii@amazon.com>

134 of 154 new or added lines in 11 files covered. (87.01%)

5 existing lines in 3 files now uncovered.

42959 of 58306 relevant lines covered (73.68%)

142198.28 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
82.24
0.1% contrib/babelfishpg_tsql/src/catalog.c
2
73.59
-0.04% contrib/babelfishpg_tsql/src/dbcmds.c
3
82.77
-0.1% contrib/babelfishpg_tsql/runtime/functions.c
5
83.42
-0.21% contrib/babelfishpg_tsql/src/rolecmds.c
8
81.26
-0.64% contrib/babelfishpg_tsql/src/multidb.c

Uncovered Existing Lines

Lines Coverage ∆ File
1
82.24
0.1% contrib/babelfishpg_tsql/src/catalog.c
1
83.42
-0.21% contrib/babelfishpg_tsql/src/rolecmds.c
3
82.77
-0.1% contrib/babelfishpg_tsql/runtime/functions.c
Jobs
ID Job ID Ran Files Coverage
1 11160092314.1 03 Oct 2024 11:01AM UTC 114
73.68
GitHub Action Run
Source Files on build 11160092314
  • Tree
  • List 114
  • Changed 40
  • Source Changed 12
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11160092314
  • a3de4f9b on github
  • Prev Build on BABEL_3_X_DEV (#11136134816)
  • Next Build on BABEL_3_X_DEV (#11221151263)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc