Skip to content

Change some PL/pgsql functions to SQL#2

Open
davidfetter wants to merge 1 commit intoleondutoit:masterfrom
davidfetter:plpgsql_to_sql
Open

Change some PL/pgsql functions to SQL#2
davidfetter wants to merge 1 commit intoleondutoit:masterfrom
davidfetter:plpgsql_to_sql

Conversation

@davidfetter
Copy link

@davidfetter davidfetter commented Feb 4, 2019

- In passing, use some more set-like reasoning
if untrusted_type = 'mac' then
select ntk.parse_mac_table_def(untrusted_definition) into _res;
return _res;
select ntk.parse_mac_table_def(untrusted_definition);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this error here, when running the tests: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead..

elsif untrusted_type = 'generic' then
select ntk.parse_generic_table_def(untrusted_definition) into _res;
return _res;
select ntk.parse_generic_table_def(untrusted_definition);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

if untrusted_type = 'mac' then
select ntk.parse_mac_table_def(untrusted_definition) into _res;
return _res;
select ntk.parse_mac_table_def(untrusted_definition);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps a good solution is return select ...

@leondutoit
Copy link
Owner

I think there might be some more issues when running the tests, would be great if you could confirm that all of them pass :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants