Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for parentheses in CommandType=StoredProcedure #474

Closed
roji opened this issue Feb 6, 2015 · 2 comments
Closed

Drop support for parentheses in CommandType=StoredProcedure #474

roji opened this issue Feb 6, 2015 · 2 comments
Assignees
Milestone

Comments

@roji
Copy link
Member

roji commented Feb 6, 2015

Did some cleanup work and wasn't sure about something...

In 2.2 we currently allow executing a StoredProcedure with parentheses:

var command = new NpgsqlCommand("funcC()", Conn);
command.CommandType = CommandType.StoredProcedure;

Many of our unit tests are written this way.

I know there were some discussions about this (#296) but am not sure of the result.

  • The MSDN docs clearly say that "the CommandText property should be set to the name of the stored procedure to be accessed.
  • Are parameters supported or just open/close parentheses (and should they be)?
  • Should we keep supporting this? Is it too much breakage to remove it?
@roji roji added this to the 3.0 milestone Feb 6, 2015
@franciscojunior
Copy link
Member

I don't remember exactly why we allowed parameters in the text when the command type is set to storedprocedure. :(

I think we should support as stated in the msdn docs: just the name of the stored procedure.

In order to help with the cleanup, I created #449 some time ago which has a lot of changes in the tests to remove the parameters and parentheses from the command text.

@roji
Copy link
Member Author

roji commented Feb 6, 2015

Ah OK, thanks for the quick answer :)

I'll start looking at function support soon, and will remove the parentheses. I'll also look at your PR.

Thanks!

@roji roji changed the title Drop support for parentheses in CommandType=StoredProcedure? Drop support for parentheses in CommandType=StoredProcedure Mar 29, 2015
@roji roji self-assigned this Mar 29, 2015
roji added a commit that referenced this issue Mar 29, 2015
@roji roji closed this as completed Mar 29, 2015
@roji roji modified the milestones: 3.0, 3.0-beta1 Mar 30, 2015
@roji roji modified the milestones: 3.0-beta1, 3.0 Aug 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants