Home | Print | Q/A | Guest | NewsLetter
Display context of search results Case-sensitive searching
한방쿼리스팅 › 인놈소개/2010-03-17 › 사용된오픈소스범주론 › PostgreSQLPsql로그인
Database System
Data Warehouse
Data Analysis
Operating System
Open Source
Enterprise Architecture
Software Engineering
Process
Working Smart

SQL Server
PostgreSQL
Oracle
DB2
Teradata
MySQL
Performance Tuning
Programming

Link
Philosophy
Tools
Misc
주인놈
_
_
SideBar Edit

Contents



필자는 Pervasive PostgreSQL 8.0.1을 설치하였다. 상용화 한다고 해서리.. Pervasive측에서도 앞으로 3년을 바라본다고 했으니 나도 앞으로 3년을 바라보고 천천히 익혀볼 것이다..무엇보다 좋은 것은 양질의 Demo 데이터베이스를 제공한다는게 좋다..다른 DBMS를 다루어봤다면 이것도 하나의 제품이므로 다루기는 쉬우리라 생각한다. 오늘 메뉴얼을 다운로드 하였다..약 1천페이지가 넘는다. 후후..어쨌든 오픈소스...

나는 MySQL을 선택하지 않았다. 왜냐? 기능이 딸린다. 심지어는 다른 DBMS에서 볼 수 없는 기능도 찾아볼 수 있다. 놀라운 기능들...가끔은 PostgreSQL의 성능에 대해서 논의하고는 한다. 성능? 필자의 생각으로는 DBMS자체의 성능은 쓸만하다고 생각한다. 단지 DBMS를 만지는 사람이 문제라고 본다. 뭐..어쨌든...메뉴얼을 보면서 천천히 가보도록 하자...
C:\>psql --help
This is psql 8.0.1, the PostgreSQL interactive terminal.

Usage:
  psql [OPTIONS]... [DBNAME [USERNAME]]

General options:
  -d DBNAME       specify database name to connect to (default: "yasi")
  -c COMMAND      run only single command (SQL or internal) and exit
  -f FILENAME     execute commands from file, then exit
  -l              list available databases, then exit
  -v NAME=VALUE   set psql variable NAME to VALUE
  -X              do not read startup file (~/.psqlrc)
  --help          show this help, then exit
  --version       output version information, then exit

Input and output options:
  -a              echo all input from script
  -e              echo commands sent to server
  -E              display queries that internal commands generate
  -q              run quietly (no messages, only query output)
  -o FILENAME     send query results to file (or |pipe)
  -n              disable enhanced command line editing (readline)
  -s              single-step mode (confirm each query)
  -S              single-line mode (end of line terminates SQL command)

Output format options:
  -A              unaligned table output mode (-P format=unaligned)
  -H              HTML table output mode (-P format=html)
  -t              print rows only (-P tuples_only)
  -T TEXT         set HTML table tag attributes (width, border) (-P tableattr=)
  -x              turn on expanded table output (-P expanded)
  -P VAR[=ARG]    set printing option VAR to ARG (see \pset command)
  -F STRING       set field separator (default: "|") (-P fieldsep=)
  -R STRING       set record separator (default: newline) (-P recordsep=)

Connection options:
  -h HOSTNAME     database server host or socket directory (default: "local sock
et")
  -p PORT         database server port (default: "5432")
  -U NAME         database user name (default: "yasi")
  -W              prompt for password (should happen automatically)

For more information, type "\?" (for internal commands) or "\help"
(for SQL commands) from within psql, or consult the psql section in
the PostgreSQL documentation.

Report bugs to <pgsql-bugs@postgresql.org>.

C:\>psql "Pervasive Demo DB"
Password:
Welcome to psql 8.0.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

Pervasive Demo DB=> select version();
                                               version
-----------------------------------------------------------------------------------------------------
 PostgreSQL 8.0.1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)
(1 row)

Pervasive Demo DB=> select current_date();
ERROR:  syntax error at or near "(" at character 20
LINE 1: select current_date();
                           ^
Pervasive Demo DB=> select current_date;
    date
------------
 2005-06-13
(1 row)

Pervasive Demo DB=> select 2 + 2;
 ?column?
----------
        4
(1 row)

Pervasive Demo DB=> select 2 + '2';
 ?column?
----------
        4
(1 row)

Pervasive Demo DB=> select '2' + '2';
ERROR:  operator is not unique: "unknown" + "unknown"
HINT:  Could not choose a best candidate operator. You may need to add explicit type casts.
Pervasive Demo DB=> select '2' || '2';
 ?column?
----------
 22
(1 row)

Pervasive Demo DB=>

EditText|Print|FindPage|DeletePage|LikePages|http://www.databaser.net|last modified 2010-03-08 17:39:02