---
title: "Starta postgreSQL med -i flagga?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/webbutveckling/72762-starta-postgresql-med-i-flagga"
topic: "Webbutveckling"
topic_url: "https://www.webforum.nu/amne/webbutveckling"
author: "Poppe25"
published: "2003-04-01T10:35:59.000Z"
updated: "2003-04-01T10:35:59.000Z"
replies: 0
views: 484
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/webbutveckling/72762-starta-postgresql-med-i-flagga"
---

# Starta postgreSQL med -i flagga?

## #1 — Poppe25, 2003-04-01T10:35Z

Hej skulle vilja veta hur man ska göra följande på Mac OS X, nämligen starta upp PostgreSQL med  -i flaggan. Syftet är att implementera en java-klass som kopplar upp sig mot PostgreSQL.

 Bifogar kommentar från han som skrivit klassen.

 
/\*\*
 \* The TestPostgreSQL class shows how to access the PostgreSQL
 \* DB server on Mac OS X using the JDBC interface.
 \* It assumes the installation has been performed according
 \* to the instructions at <http://www.entropy.ch/software/macosx/postgresql.>
 \*
 \*
 \* You compile it like this:
 \*
 \*   % javac TestPostgreSQL.java
 \*
 \* Make sure that the PostgreSQL server has been
 \* started with the -i flag. This is not the case in
 \* the example lines of the installation instructions mentioned
 \* above and in the StartupItem package that's available
 \* from the same location. The -i flag tells the DB server
 \* to listen for connection requests from the network
 \* and I have left it off by default for security reasons.
 \*
 \* If the server is running correctly (with -i), run the Test like this:
 \* (in the same directory where you compiled the example)
 \*
 \*   % java -classpath /usr/local/pgsql/share/java/postgresql.jar:. TestPostgreSQL
 \*
 \* You should see the current date as returned by the DB server:
 \* 
 \*   2001-06-23 16:31:49+02
 \*
 \*
 \* @author   Marc Liyanage
 \* @version  1.0
 \*/

Permalänk: https://www.webforum.nu/p/72762

---

Tråden på webben: https://www.webforum.nu/amne/webbutveckling/72762-starta-postgresql-med-i-flagga
