sqlplus -s用户名/密码\ @lock的postgresql等效?

发布于 2025-01-28 02:45:47 字数 149 浏览 1 评论 0原文

Postgres等于以下内容是什么:

sqlplus -S username/password \@lock.

@lock在这里意味着什么?

What will be Postgres equivalent of following:

sqlplus -S username/password \@lock.

Also what does @lock means here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

青萝楚歌 2025-02-04 02:45:47

我不知道postgresql,但是 - 如Oracle,您是:

该命令意味着

  • 命令行工具,称为sql*plus(可执行文件为sqlplus
  • 您将连接到Oracle的 (这就是-s做的)
  • 提供用户名和密码
  • 并执行.sql脚本的名称为lock (我不知道它做什么;您必须打开它在任何文本编辑器中,现在都可以查看)

,有人如何建立与PostgreSQL并运行.sql脚本的连接,这是我不知道的,但是 - 阅读在线文档 - 可能是

psql -U username -d database_name -a -f lock

I don't know PostgreSQL, but - as of Oracle, here you are:

That command means that

  • you'll connect to Oracle's command line tool called SQL*Plus (executable name is sqlplus)
  • in silent mode (that's what -s does)
  • providing username and password
  • and execute .SQL script whose name is lock (I have no idea what it does; you'll have to open it in any text editor and have a look)

Now, how someone establishes connection to PostgreSQL and runs a .SQL script, that's something I wouldn't know, but - reading online documentation - it might be

psql -U username -d database_name -a -f lock
北城孤痞 2025-02-04 02:45:47

根据评论和其他答案的解释,PostgreSQL中的同等内容应为

psql 'user=username password=password dbname=mydatabase' -f lock

According to the explanations in the comments and the other answer, the equivalent in PostgreSQL should be

psql 'user=username password=password dbname=mydatabase' -f lock
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文