问题标签 [postgres-9.6]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
postgresql - 为什么独占下限转换为包容性?
给定以下代码,有没有办法关闭 Postgres 将下限转换为包容性,即从(date
到[date+1
?
docker - What is wrong with trying to create two instances of docker-compose.yml
I have an idea to up several similar instances with my docker-compose simple mini-project.
docker-compose file:
#xA;Dockerfile:
#xA;In ./config/.env.dev file I set unique required port number (eg. 5435 for first instance,
5436 for second etc.)
When I up first instance with command:
#xA;it's OK and I see one new container and one new network instance1_default.
But when I try to up another new instance with command:
#xA;Docker stuck at this:
#xA;.. and nothing happens. Yes, I changed port number in env-file before running new instance.
What's wrong with creating new network?
#xA;sql - Postgres 将全名拆分为 3 部分 First Middle Last
所有,我有一个不平凡的任务。由于数据库结构更改,我需要将位于一个字段中的全名拆分usr_name
为 3 个字段usr_firstname,usr_middlename, usr_middlename
。
到目前为止看起来很容易,我可以做这样的事情:
然而,诀窍在于数据质量:(
有时全名没有中间名(例如Vasya Pupkin
),而有时它有中间名(Vasya Vasyavich Pupkin
)。
我可以轻松地在字符串中获取 1 个名称和字符串中的最后一个单词,但是如何检索中间(如果存在)或忽略它(如果不存在)?
谢谢 :)
我正在使用 Postgres 9.6
更新:表和数据的示例
sql - 如果不存在,如何创建函数?
如果不存在,是否有一种简单的方法来创建函数?我有多个模式,我正在准备一个脚本,它将在目标模式中创建缺失的对象。计划是运行一个脚本来检查对象是否存在,如果不存在则什么都不做,它会创建它。'CREATE SOMETHING IF NOT EXISTS' 完美地与表序列和其他人一起工作,但是找不到函数的解决方案。我来自 Tsql 世界,它有这个检查。但是,看起来 Postgres 9.6 没有它。有没有什么简单的方法可以绕过这个限制?