创建pg_buffercache后,查询时报错:

postgres=# create extension pg_buffercache;
postgres=# select * from pg_buffercache;
ERROR: relation "pg_buffercache" does not exist
LINE 1: select * from pg_buffercache;

  

原因:消息'relation does not exist'通常是因为没有连接到相应数据库。因为我只是psql连接后,没有切换到某个数据库。

解决方法:

\c yourDb
yourDb=# CREATE EXTENSION IF NOT EXISTS pg_buffercache;
yourDb=# SELECT count(*) FROM pg_buffercache;

  

ERROR: relation "pg_buffercache" does not exist的更多相关文章

  1. pgsql 执行建库脚本时候出现ERROR: relation "xxx_id_seq" does not exist

    1. 问题: ERROR: relation "xxx_id_seq" does not exist 2. 出现原因:由于表中建立了自增字段,id定义为Serial 类型,当执行完 ...

  2. postgresql shell发起select操作报错ERROR: relation "tablename" does not exist

    最近安装了一套clourdera manager,其中hive元数据保存在postgresql中,因为今天想看一下hive的元数据信息,就登录了psql,连接到hive元数据库,发起select操作, ...

  3. [转载]Vertica “ERROR: Too many ROS containers exist”

    最近在用Vertica的时候碰到一个问题,Vertica在运行了一段时间后总是出现类似下面的错误 1: java.sql.SQLException: [Vertica][VJDBC](5065) 2: ...

  4. PostgreSql问题:ERROR: column "1" does not exist

    摘录自:http://blog.csdn.net/shuaiwang/article/details/1807421 在PostgreSQL中,不论是在pgAdmin中还是在命令行控制台里面,在SQL ...

  5. [PAClient Error] Error: E4356 File does not exist armv7

    [PAClient Error] Error: E4356 File does not exist: /Users/tt/PAServer/scratch-dir/Administrator-snIO ...

  6. when create a table,then show error ora-00952 tablespace tsb_1 not exist

    QUESTION:When create a table,then show error ora-00952 tablespace tsb_1 not exist. STEP: 1.select us ...

  7. ERROR: type "sum" does not exist

    开发问pg中执行一个简单的语句,多次报错: > ERROR: type "sum" does not exist LINE 1: SELECT SUM ^ 看看具体的语句,其 ...

  8. 解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist

    解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist 早上在linux下用selenium启动Chro ...

  9. react-native run-android Starting: Intent Error type 3 Error: Activity class does not exist

    使用”react-native run-android”命令运行android应用时,如果常常出现如下错误: Starting the app (/home/xxx/soft/sdk//platfor ...

随机推荐

  1. 【DATAGUARD】物理dg配置客户端无缝切换 (八.2)--Fast-Start Failover 的配置

    [DATAGUARD]物理dg配置客户端无缝切换 (八.2)--Fast-Start Failover 的配置 一.1  BLOG文档结构图       一.2  前言部分   一.2.1  导读 各 ...

  2. Redis_初识

    一.简介 Redis(Remote Dictionary Server)本质上是一个Key-Value类型的内存数据库,整个数据库统统加载在内存当中进行操作,定期通过异步操作吧数据库flush到硬盘上 ...

  3. day 01 预科

    目录 作业 二,Markdown基本语法 一级标题 二级标题 三级标题 作业 二,Markdown基本语法 标题 一级标题 二级标题 三级标题 四级标题 加粗 哦,更粗了 斜体 咦,我歪了 高亮 == ...

  4. mybatis批量更新报错 org.mybatis.spring.MyBatisSystemException

    具体报错信息: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Bin ...

  5. MySQL-查看DB文件位置

    show global variables like "%datadir%"

  6. 利用ViewStub实现布局懒惰加载

    这个问题也是头条面试官问的,本身没什么难度,但以前确实没仔细研究过. 1.使用介绍 ViewStub是一种不可见的尺寸为0的View,用来实现布局资源的懒加载.当ViewStub被设置为用户可见或其  ...

  7. mysql where 1

    where后跟各种查询条件,当条件为真时即可查询出记录.在这里where 1,1为真,也就是where后的条件为真,查询表中所有内容. SELECT * FROM `sdb_pam_members` ...

  8. ab 接口压力测试工具使用

    安装: yum install httpd-tools 使用: ab -n 1000 -c 100 http://www.baidu.com/; -n 总的请求数;  -c 并发数; -k 是否开启长 ...

  9. pycharm下site-packages文件标记为红的问题;pycharm无法识别本地site-packages问题

    当图示红框标记区域的文件夹颜色显示红色时,需要到FIle-setting里面设置好本地的运行环境,设置错误就会导致引用问题: 启动谷歌浏览器 from selenium import webdrive ...

  10. 51nod 2502 最多分成多少块

    小b有个长度为n的数组a,她想将这个数组排序. 然而小b很懒,她觉得对整个数组排序太累了,因此她请你将a分成一些块,使得她只需要对每一块分别排序,就能将整个数组排序. 请问你最多能把a分成多少块. 保 ...