1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Accessing a Database</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
15 TITLE="Getting Started"
16 HREF="tutorial-start.html"><LINK
18 TITLE="Creating a Database"
19 HREF="tutorial-createdb.html"><LINK
21 TITLE="The SQL Language"
22 HREF="tutorial-sql.html"><LINK
25 HREF="stylesheet.css"><META
27 CONTENT="2003-12-22T03:48:47"></HEAD
33 SUMMARY="Header navigation table"
43 >PostgreSQL 7.4.1 Documentation</TH
51 HREF="tutorial-createdb.html"
60 HREF="tutorial-start.html"
67 >Chapter 1. Getting Started</TD
73 HREF="tutorial-start.html"
81 HREF="tutorial-sql.html"
95 NAME="TUTORIAL-ACCESSDB"
96 >1.4. Accessing a Database</A
102 > Once you have created a database, you can access it by:
109 STYLE="list-style-type: disc"
115 terminal program, called <SPAN
122 to interactively enter, edit, and execute
130 STYLE="list-style-type: disc"
132 > Using an existing graphical frontend tool like
136 > or an office suite with
140 > support to create and manipulate a
141 database. These possibilities are not covered in this
146 STYLE="list-style-type: disc"
148 > Writing a custom application, using one of the several
149 available language bindings. These possibilities are discussed
151 HREF="client-interfaces.html"
159 You probably want to start up <TT
163 the examples in this tutorial. It can be activated for the
167 > database by typing the command:
178 If you leave off the database name then it will default to your
179 user account name. You already discovered this scheme in the
186 >, you will be greeted with the following
190 >Welcome to psql 7.4.1, the PostgreSQL interactive terminal.
192 Type: \copyright for distribution terms
193 \h for help with SQL commands
194 \? for help on internal slash commands
195 \g or terminate with semicolon to execute query
204 The last line could also be
209 That would mean you are a database superuser, which is most likely
210 the case if you installed <SPAN
214 yourself. Being a superuser means that you are not subject to
215 access controls. For the purpose of this tutorial this is not of
219 > If you have encountered problems starting <TT
223 then go back to the previous section. The diagnostics of
231 similar, and if the latter worked the former should work as well.
234 > The last line printed out by <TT
238 prompt, and it indicates that <TT
242 to you and that you can type <ACRONYM
246 work space maintained by <TT
262 >SELECT version();</KBD
265 ----------------------------------------------------------------
266 PostgreSQL 7.4.1 on i586-pc-linux-gnu, compiled by GCC 2.96
274 >SELECT current_date;</KBD
298 > program has a number of internal
299 commands that are not SQL commands. They begin with the backslash
307 commands were listed in the welcome message. For example,
308 you can get help on the syntax of various
346 > will quit and return you to your
347 command shell. (For more internal commands, type
355 full capabilities of <TT
369 installed correctly you can also type <TT
373 at the operating system shell prompt to see the documentation. In
374 this tutorial we will not use these features explicitly, but you
375 can use them yourself when you see fit.
383 SUMMARY="Footer navigation table"
394 HREF="tutorial-createdb.html"
412 HREF="tutorial-sql.html"
422 >Creating a Database</TD
428 HREF="tutorial-start.html"