- 论坛徽章:
- 0
|
本帖最后由 dwm123 于 2010-12-14 16:34 编辑
回复 11# tanfeng3
多谢了,
[root@v1 ~]# service postgresql status
(pid 10635) 正在运行...
[root@v1 ~]# su - postgres
-bash-3.2$ psql mydb postgres
psql (8.4.4)
输入 "help" 来获取帮助信息.
mydb=# \d weather
资料表 "public.weather"
栏位 | 型别 | 修饰词
---------+-----------------------+--------
city | character varying(80) |
temp_lo | integer |
temp_hi | integer |
prcp | real |
date | date |
mydb=# INSERT INTO weather (city,temp_lo,temp_hi,prcp,date) VALUES ('san francisco',43,57,0.0,'2010-01-01');
INSERT 0 1
mydb=# SELECT * from weather ;
city | temp_lo | temp_hi | prcp | date
---------------+---------+---------+------+------------
san francisco | 43 | 57 | 0 | 2010-01-01
(1 行记录)
mydb=# SELECT * from weather;
city | temp_lo | temp_hi | prcp | date
---------------+---------+---------+------+------------
san francisco | 43 | 57 | 0 | 2010-01-01
(1 行记录)
这样应该可以了。多谢了。可能我上午那里弄错了。
如果我在其他机器上想连接postgresql数据库(192.168.1.85),客户系统所linux,需要在客户机上运行什么命令。 |
|