草庐IT

pg_upgrade_internal

全部标签

javascript - Node.js 和 MySQL - 错误 : 1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

现在我只有这个代码:constSequelize=require('sequelize');constsequelize=newSequelize('database','root','passwd',{host:'localhost',dialect:'mysql',//http://docs.sequelizejs.com/manual/tutorial/querying.html#operatorsoperatorsAliases:false});sequelize.authenticate().then(()=>{console.log('Connectionhasbeenes

带有 pg/postgres 的 node.js 纤维

我一直在尝试弄清楚如何使用node-fibers使我的数据库代码在node.js中不那么困惑,但我无法让它工作。我将代码归结为最小测试用例:varFuture=require('fibers/future');varpg=require('pg');varconnstr="pg://not_the_real_user:or_password@localhost/db";varpconnect=Future.wrap(pg.connect);Fiber(function(){varclient=pconnect(connstr).wait();console.log("calledfun

带有 pg/postgres 的 node.js 纤维

我一直在尝试弄清楚如何使用node-fibers使我的数据库代码在node.js中不那么困惑,但我无法让它工作。我将代码归结为最小测试用例:varFuture=require('fibers/future');varpg=require('pg');varconnstr="pg://not_the_real_user:or_password@localhost/db";varpconnect=Future.wrap(pg.connect);Fiber(function(){varclient=pconnect(connstr).wait();console.log("calledfun

PG数据库入门知识

前言Linux和windows的路劲分隔符是不同的,Linux下是斜杠/,而windows是反斜杠(\)。但在PG里window下也要使用linux的/作为路劲分隔符。基础知识为什么选择PGPostgreSQL是一款企业级关系型数据库管理系统。PostgreSQL之所以如此特别,是因为它不仅仅是一个数据库,还是一个功能强大的应用开发平台。PostgreSQL在数据类型的支持方面有两个优势,不但支持比绝大多数数据库更丰富的原生数据类型,而且还允许用户按需求自定义数据类型。PostGRESQL同样还允许用户重定义基础运算符。PostgreSQL会为每一张用户表自动创建一个数据类型的定义。你比如说我

node.js - pg-promise 将整数作为字符串返回

我对包含bigint类型列的表进行了这个简单的查询。但是,当我查询它时,pg-promise将此列的值作为字符串返回。我在文档中找不到有关此的信息。这是标准行为吗?varids=[180,120];db.any('SELECTid_brand,brandfromcatalog_brandWHEREid_brandin($1:csv)',[ids]).then((data)=>{//returnresults});data采用以下形式,id为string而不是int:[{id_brand:"180",brand:"Ford"},{id_brand:"120",brand:"Nike"}]

node.js - pg-promise 将整数作为字符串返回

我对包含bigint类型列的表进行了这个简单的查询。但是,当我查询它时,pg-promise将此列的值作为字符串返回。我在文档中找不到有关此的信息。这是标准行为吗?varids=[180,120];db.any('SELECTid_brand,brandfromcatalog_brandWHEREid_brandin($1:csv)',[ids]).then((data)=>{//returnresults});data采用以下形式,id为string而不是int:[{id_brand:"180",brand:"Ford"},{id_brand:"120",brand:"Nike"}]

node.js - Brew 清理错误 : Permission denied @ unlink_internal

我在执行“brewcleanup”时遇到错误:$brewcleanupWarning:Skippingopam:mostrecentversion2.0.3notinstalledWarning:Skippingpython:mostrecentversion3.7.2_2notinstalledWarning:Skippingsqlite:mostrecentversion3.27.1notinstalledError:Permissiondenied@unlink_internal-/usr/local/lib/node_modules/@angular/cli/node_modu

node.js - Brew 清理错误 : Permission denied @ unlink_internal

我在执行“brewcleanup”时遇到错误:$brewcleanupWarning:Skippingopam:mostrecentversion2.0.3notinstalledWarning:Skippingpython:mostrecentversion3.7.2_2notinstalledWarning:Skippingsqlite:mostrecentversion3.27.1notinstalledError:Permissiondenied@unlink_internal-/usr/local/lib/node_modules/@angular/cli/node_modu

node.js - 何时断开连接以及何时结束 pg 客户端或池

我的堆栈是node、express和pg模块。我真的试图通过文档和一些过时的教程来理解。我不知道何时以及如何断开和结束客户端。对于某些路线,我决定使用游泳池。这是我的代码constpool=newpg.Pool({user:'pooluser',host:'localhost',database:'mydb',password:'pooluser',port:5432});pool.on('error',(err,client)=>{console.log('error',err);process.exit(-1);});app.get('/',(req,res)=>{pool.con

node.js - 何时断开连接以及何时结束 pg 客户端或池

我的堆栈是node、express和pg模块。我真的试图通过文档和一些过时的教程来理解。我不知道何时以及如何断开和结束客户端。对于某些路线,我决定使用游泳池。这是我的代码constpool=newpg.Pool({user:'pooluser',host:'localhost',database:'mydb',password:'pooluser',port:5432});pool.on('error',(err,client)=>{console.log('error',err);process.exit(-1);});app.get('/',(req,res)=>{pool.con