plsql-and-sql-coding-guidelines icon indicating copy to clipboard operation
plsql-and-sql-coding-guidelines copied to clipboard

G-2130: Extend guideline regarding Oracle Database 23c SQL DOMAIN feature

Open PhilippSalvisberg opened this issue 3 years ago • 0 comments

As mentioned in #184, the guideline might be too strict. However, introducing a threshold parameter similar to the case mentioned in #180 does not make sense IMO.

Data types can be referenced using %TYPE. However, when there is no persistent representation then %TYPE cannot be used. Of course there is probably a table/view with a similar suited data type, but the relation would be wrong.

So the better option is really to define a subtype. But where? In a centralized PL/SQL package. The problem with centralized packages is, that they the code using them is invalidated. This is especially bad in shared environments. A better option seems to be the new SQL DOMAIN feature which is planned for Oracle Database 23c. See this tweet.

The guideline G-2130 should be extended once SQL Domains become available in the Oracle Database.

PhilippSalvisberg avatar Sep 30 '22 12:09 PhilippSalvisberg