FirebirdSQL / firebird

Firebird server, client and tools
https://firebirdsql.org
1.26k stars 217 forks source link

Ability to use CHECK/NOT NULL constraint in PSQL parameters or variables [CORE1652] #2076

Open firebird-automations opened 16 years ago

firebird-automations commented 16 years ago

Submitted by: Martijn Tonies (martijntonies)

Votes: 1

Now that Domains have entered the domain (pun intended) of PSQL, would it be possible to do things like:

create procedure myproc1 (i int check (value between 1 and 10), .. ) ... declare variable v_bool char(1) check (value in ('T', 'F') or value is NULL);

I think this would enhance the current PSQL even more and allows for better checking of values inside procedural code.

The ability to put constraints on input (and output) parameters and variables could improve the code people write. I think it would be a nice feature.

Perhaps in Firebird 2.5 in combination with SQL based Stored Functions? ;)

firebird-automations commented 16 years ago
Modified by: Martijn Tonies (martijntonies) description: Now that Domains have entered the domain \(pun intended\) of PSQL, would it be possible to do things like: create procedure myproc1 \(i int check \(value between 1 and 10\), \.\. \) \.\.\. declare variable v\_bool char\(1\) check \(value in \('T', 'F'\) or value is NULL\); I think this would enhance the current PSQL even more and allows for better checking of values inside procedural code\. The ability to put constraints on input \(and output\) parameters and variables could improve the code people write\. I think it would be a nice feature\. =\> Now that Domains have entered the domain \(pun intended\) of PSQL, would it be possible to do things like: create procedure myproc1 \(i int check \(value between 1 and 10\), \.\. \) \.\.\. declare variable v\_bool char\(1\) check \(value in \('T', 'F'\) or value is NULL\); I think this would enhance the current PSQL even more and allows for better checking of values inside procedural code\. The ability to put constraints on input \(and output\) parameters and variables could improve the code people write\. I think it would be a nice feature\. Perhaps in Firebird 2\.5 in combination with SQL based Stored Functions? ;\)
firebird-automations commented 16 years ago
Modified by: @pcisar Workflow: jira \[ 13650 \] =\> Firebird \[ 13982 \]
firebird-automations commented 5 years ago

Commented by: rdb_dev (rdb_dev)

Discussion in Russian: http://www.sql.ru/forum/1317347-1/sto-tysyach-pochemu-tak-realizovano