Web lists-archives.com

Attention PostgreSQL maintainer




Marco,

I've written a short updated quick start guide for PostgreSQL on Cygwin.

It is attached, (cygwin_postgresql_9_6_5_quick_start_example.txt.)

You're free to use it if you think it will be helpful for the README
or elsewhere.


Keith
----------------------------------------------------------------------
Updated Quick Start for PostgreSQL under Cygwin 2.9.0, under Windows 7
Sat Oct 28 16:24:15 MDT 2017
----------------------------------------------------------------------




---------------------------
Windows Version Information
---------------------------
	Sat Oct 28 15:30:34 pty1 (keith@somemachine) /home/keith>uname -a

	CYGWIN_NT-6.1-WOW somemachine 2.9.0(0.318/5/3) 2017-09-12 10:41 i686 Cygwin

	Sat Oct 28 15:30:40 pty1 (keith@somemachine) /home/keith>wmic os get buildnumber,caption,CSDVersion /format:csv

	Node,BuildNumber,Caption,CSDVersion
	somemachine,7601,Microsoft Windows 7 Enterprise ,Service Pack 1




-----------------
Install cygserver
-----------------
	Sat Oct 28 15:30:48 pty1 (keith@somemachine) /home/keith>/bin/cygserver-config
	Generating /etc/cygserver.conf file


	Warning: The following function requires administrator privileges!

	Do you want to install cygserver as service?
	(Say "no" if it's already installed as service) (yes/no) yes

	The service has been installed under LocalSystem account.
	To start it, call `net start cygserver' or `cygrunsrv -S cygserver'.

	Further configuration options are available by editing the configuration
	file /etc/cygserver.conf.  Please read the inline information in that
	file carefully. The best option for the start is to just leave it alone.

	Basic Cygserver configuration finished. Have fun!




---------------
Start cygserver
---------------
	Sat Oct 28 16:00:27 pty1 (keith@somemachine) /home/keith>cygrunsrv -S cygserver




------------------------------------
Initialize PostgreSQL data directory
------------------------------------
	Sat Oct 28 16:04:03 pty1 (keith@somemachine) /home/keith>/usr/sbin/initdb.exe -D /usr/share/postgresql/data
	The files belonging to this database system will be owned by user "keith".
	This user must also own the server process.

	The database cluster will be initialized with locale "C".
	The default database encoding has accordingly been set to "SQL_ASCII".
	The default text search configuration will be set to "english".

	Data page checksums are disabled.

	creating directory /usr/share/postgresql/data ... ok
	creating subdirectories ... ok
	selecting default max_connections ... 30
	selecting default shared_buffers ... 128MB
	selecting dynamic shared memory implementation ... posix
	creating configuration files ... ok
	running bootstrap script ... ok
	performing post-bootstrap initialization ... ok
	syncing data to disk ... ok

	WARNING: enabling "trust" authentication for local connections
	You can change this by editing pg_hba.conf or using the option -A, or
	--auth-local and --auth-host, the next time you run initdb.

	Success. You can now start the database server using:

	    /usr/sbin/pg_ctl -D /usr/share/postgresql/data -l logfile start




----------------
Start PostgreSQL
----------------
	Sat Oct 28 16:04:47 pty1 (keith@somemachine) /home/keith>/usr/sbin/pg_ctl -D /usr/share/postgresql/data -l logfile start
	server starting




--------------------------------------------
PostgreSQL is now running, create a database
--------------------------------------------
	Sat Oct 28 16:05:20 pty1 (keith@somemachine) /home/keith>createdb




----------------------------------------------------------------------------
Start psql, the PostgreSQL command line client, and run a few sample queries
----------------------------------------------------------------------------
	Sat Oct 28 16:05:45 pty1 (keith@somemachine) /home/keith>psql
	psql (9.6.5)
	Type "help" for help.

	keith=# select version();
					 version
	-------------------------------------------------------------------------
	 PostgreSQL 9.6.5 on i686-pc-cygwin, compiled by gcc (GCC) 6.4.0, 32-bit
	(1 row)


	keith=# \c template1
	You are now connected to database "template1" as user "keith".
	template1=# select version();
					 version
	-------------------------------------------------------------------------
	 PostgreSQL 9.6.5 on i686-pc-cygwin, compiled by gcc (GCC) 6.4.0, 32-bit
	(1 row)

	template1=# select now();
		      now
	-------------------------------
	 2017-10-28 16:07:13.462488-06
	(1 row)

	template1=# select 1.0/.3;
	      ?column?
	--------------------
	 3.3333333333333333
	(1 row)

	template1=# \l
					 List of databases
	    Name    |   Owner    | Encoding  | Collate | Ctype |     Access privileges
	------------+------------+-----------+---------+-------+---------------------------
	 keith      | keith | SQL_ASCII | C       | C     |
	 postgres   | keith | SQL_ASCII | C       | C     |
	 template0  | keith | SQL_ASCII | C       | C     | =c/keith            +
		    |       |           |         |       | keith=CTc/keith
	 template1  | keith | SQL_ASCII | C       | C     | =c/keith            +
		    |       |           |         |       | keith=CTc/keith
	(4 rows)




-------------------------------------------------
Quit the PSQL command line client, back to the OS
-------------------------------------------------
	template1=# \q




Sat Oct 28 16:13:14 pty1 (keith@somemachine) /home/keith>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple