上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 104 下一页
摘要: 继续分析: if (pwprompt && pwfilename) { fprintf(stderr, _("%s: password prompt and password file cannot be specified together\n"), progname); exit(1); } if (authmethod == NULL || !strlen(authmethod)) { authwarning = _("\nWARNING: enabling \"trust\" authentication for ... 阅读全文
posted @ 2013-07-05 16:55 健哥的数据花园 阅读(959) 评论(0) 推荐(0)
摘要: 继续其实接前面,整个while循环是这样的: while ((c = getopt_long(argc, argv, "dD:E:L:nU:WA:sT:X:", long_options, &option_index)) != -1) { switch (c) { ...... } ...... }这一句,c = getopt_long(argc, argv, "dD:E:L:nU:WA:sT:X:", lo... 阅读全文
posted @ 2013-07-05 16:33 健哥的数据花园 阅读(741) 评论(0) 推荐(0)
摘要: 继续分析下面这一段,当 initdb --version 或者 initdb --help 才有意义。 if (argc > 1) { if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0) { usage(progname); exit(0); } if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0) { ... 阅读全文
posted @ 2013-07-05 15:51 健哥的数据花园 阅读(733) 评论(0) 推荐(0)
摘要: 开始第一段:intmain(int argc, char *argv[]){/* * options with no short version return a low integer, the rest return * their short version value */ static struct option long_options[] = { {"pgdata", required_argument, NULL, 'D'}, {"encoding", required_argument, NULL, 'E' 阅读全文
posted @ 2013-07-05 15:32 健哥的数据花园 阅读(1225) 评论(0) 推荐(0)
摘要: 首先,建立表:pgsql=# create table tab10(id integer);CREATE TABLEpgsql=# select 147525::regclass; regclass ---------- tab10(1 row)pgsql=# 查看此时的文件信息:[pgsql@localhost 16384]$ pwd/home/pgsql/DemoDir/base/16384[pgsql@localhost 16384]$ ls -l 147525-rw------- 1 pgsql pgsql 0 Jul 4 13:45 147525[pgsql@localhost 1. 阅读全文
posted @ 2013-07-05 09:40 健哥的数据花园 阅读(2724) 评论(0) 推荐(0)
摘要: 查看schema信息:[pgsql@localhost bin]$ ./psqlpsql (9.1.2)Type "help" for help.pgsql=# create schema gaosche;CREATE SCHEMApgsql=# select catalog_name,schema_name from information_schema.schemata ; catalog_name | schema_name --------------+-------------------- pgsql | pg_toast pgsql | ... 阅读全文
posted @ 2013-07-04 12:15 健哥的数据花园 阅读(2000) 评论(0) 推荐(0)
摘要: 从逻辑上看,schema,table,都是位于database之下。首先,在postgres数据库下建立表(相当于建立在public schema下):[pgsql@localhost bin]$ ./psql -d postgrespsql (9.1.2)Type "help" for help.postgres=# create table tab200(id integer);CREATE TABLEpostgres=# \q然后,再在tester数据库下建立表(相当于建立在public schema下):[pgsql@localhost bin]$ ./psql - 阅读全文
posted @ 2013-07-04 11:52 健哥的数据花园 阅读(17650) 评论(0) 推荐(0)
摘要: db1=# \xExpanded display is on.db1=# SELECT * FROM information_schema.tables WHERE table_name='tab100';-[ RECORD 1 ]----------------+-----------table_catalog | db1table_schema | publictable_name | tab100table_type | BASE TABLEself_re... 阅读全文
posted @ 2013-07-04 11:34 健哥的数据花园 阅读(2565) 评论(0) 推荐(0)
摘要: 开始:当前的tablesapce信息pgsql=# select * from pg_tablespace; spcname | spcowner | spclocation | spcacl | spcoptions ------------+----------+-----------------------+--------+------------ pg_default | 10 | | | pg_global | 10 | | ... 阅读全文
posted @ 2013-07-04 10:29 健哥的数据花园 阅读(4528) 评论(0) 推荐(1)
摘要: [pgsql@localhost bin]$ ./psql -d testerpsql (9.1.2)Type "help" for help.tester=# select current_database(); current_database ------------------ tester(1 row)tester=# http://www.postgresql.org/docs/7.3/static/functions-misc.html 阅读全文
posted @ 2013-07-04 09:50 健哥的数据花园 阅读(5840) 评论(0) 推荐(0)
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 104 下一页