我有一个定义为
的函数 using (NpgsqlConnection sqlConn = new NpgsqlConnection(_conn))
{
sqlConn.Open();
using (NpgsqlCommand sqlCmd = new NpgsqlCommand("user_salt_get", sqlConn))
{
sqlCmd.CommandType = System.Data.CommandType.StoredProcedure;
sqlCmd.Parameters.Add(new NpgsqlParameter("@username", NpgsqlTypes.NpgsqlDbType.Varchar)).Value = username;
salt = (string)(sqlCmd.ExecuteScalar());
}
sqlConn.Close();
}
我用C#代码用以下代码调用它:
42883: function user_salt_get(username := character varying) does not exist
虽然这在以前的版本中有效但我现在收到错误:
sqlCmd.Parameters.Add(new NpgsqlParameter("@@username", NpgsqlTypes.NpgsqlDbType.Varchar)).Value = username;
似乎我将我的代码修改为:
from django.conf.urls import url
from django.contrib import admin
from adventureApp import views
urlpatterns = [
url(r'^sign-up/$', views.signup),
url(r'^sign-up-2/$', views.signup2),
url(r'^sign-up-3/$', views.signup3),
url(r'^$', views.home),
url(r'^admin/', admin.site.urls),
url(r'^login/$', views.login),
]
似乎@符号导致了一些问题,因为我们的大多数代码库都使用这种方式命名参数吗?