Re: Help me start postmaster on a default installation of PostgreSQL.
От | Radosław Smogura |
---|---|
Тема | Re: Help me start postmaster on a default installation of PostgreSQL. |
Дата | |
Msg-id | 33621f5e49317e83d62d53b5c8637d96@mail.softperience.eu обсуждение исходный текст |
Ответ на | Re: Help me start postmaster on a default installation of PostgreSQL. (Craig Ringer <craig@postnewspapers.com.au>) |
Список | pgsql-jdbc |
On Thu, 07 Jul 2011 20:04:33 +0800, Craig Ringer wrote: > On 7/07/2011 6:36 PM, Lord Voldemort wrote: >> I've sorted out things myself. >> >> Firstly IMHO this list is the appropriate place for my query as >> you'd >> see that what I really want is to use JDBC with PostgreSQL. Running >> postmaster was supposed to be a way to accomplish that. >> >> But as it turns out, newer versions of PostgreSQL have done away >> with >> postmaster completely. > > Say what? > > No, there's still a postmaster. You wouldn't ever be invoking it > directly, though; you use pg_ctl to control PostgreSQL if you > installed from source or from the EnterpriseDB packages. For distro > packages of PostgreSQL you use your distro's service management > mechanism: the "service" command, /etc/init.d/ scripts, etc. > > If you're using distro packages of PostgreSQL, stick to the distro's > management methods. > >> After default installation nothing needs to be >> changed. Services necessary for backend database access are started >> automatically at boot-up. > > Note that PostgreSQL probably only listens on 127.0.0.1 or it may > have TCP/IP disabled so it only uses UNIX sockets. You may need to > alter postgresql.conf if you want to listen on other interfaces. > >> After installing libpg-java (that's the JDBC >> driver package for postgreSQL) all that needs to be done is to add >> /usr/share/java/postgresql.jar to the java library. I use NetBeans >> so >> that was easy for me. I don't know how to do that when running >> applications from command line using "java /classname/" though. > > Use the -classpath argument to the JVM. > > Typically, though, you bundle the PostgreSQL JDBC driver within your > executable JAR and run it with "java -jar myapp.jar", using a > Main-class: entry in META-INF/MANIFEST.MF to tell Java what the entry > point class is. This is all basic Java stuff and has nothing to do > with PostgreSQL, though. ...and for more advanced tasks use urlclassloader, refer to JavaDoc. Regards, Radek > -- > Craig Ringer > > POST Newspapers > 276 Onslow Rd, Shenton Park > Ph: 08 9381 3088 Fax: 08 9388 2258 > ABN: 50 008 917 717 > http://www.postnewspapers.com.au/
В списке pgsql-jdbc по дате отправления: