小编roy*_*hri的帖子

未激发创建操作的自定义POST路由

#解释上下文

puts "I am learning Rails, building a simple forum application."
puts "I am pretty satisfied to where I got so far but routes... "
puts "...still figuring them out."
puts "Been 2 days trying all sorts of things."
puts "This is where I am now, and something is not working as expected."
puts "Any help/pointers would be appreciated! :)"
Run Code Online (Sandbox Code Playgroud)

# 问题

puts "I want my forum's create path to be '/helpcenter' and not '/helpcenter/cat'."
puts "When I access the …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails ruby-on-rails-3

24
推荐指数
1
解决办法
3万
查看次数

使用 Google Cloud SQL 重置 pg_stat_statements

我正在使用在 Google Cloud SQL 中运行的 PostgreSQL 实例。

我正在尝试重置 pg_stat_statements,因为我们对表进行了改进并添加了一些索引。不幸的是,当我尝试使用主postgres用户运行以下命令时:

select pg_stat_reset();
Run Code Online (Sandbox Code Playgroud)

我收到以下错误消息:

ERROR:  permission denied for function pg_stat_reset
Run Code Online (Sandbox Code Playgroud)

我知道这是一项托管服务,有些事情需要隔离,但能够重置 pg_stat 很重要,这样您就可以调整数据库。基本上,如果您进行更改,则需要能够重置 pg_stat 以便其输出不会因更改之前的数据而受到污染。即使在托管服务中,这种调整对于能够做到也是至关重要的。

有谁知道我如何让它与 Google Cloud SQL 一起使用?

谢谢。

postgresql google-cloud-sql google-cloud-platform

6
推荐指数
1
解决办法
2960
查看次数