Re: [SQL] Creating a new database with a TEMPLATE did not work

2013-02-25 Thread Ben Morrow
Quoth adrian.kla...@gmail.com (Adrian Klaver): > On 02/25/2013 02:49 PM, mkumbale wrote: > > Hi, I am new to PostgreSQL. I have an empty PostgreSQL DB containing tables > > but no data. I issued the following command in PGADMIN SQL editor: > > > > CREATE DATABASE "NewDefault" > >WITH OWNER =

Re: [SQL] Creating a new database with a TEMPLATE did not work

2013-02-25 Thread Adrian Klaver
On 02/25/2013 02:49 PM, mkumbale wrote: Hi, I am new to PostgreSQL. I have an empty PostgreSQL DB containing tables but no data. I issued the following command in PGADMIN SQL editor: CREATE DATABASE "NewDefault" WITH OWNER = postgres ENCODING = 'UTF8' TEMPLATE = Default

[SQL] Creating a new database with a TEMPLATE did not work

2013-02-25 Thread mkumbale
Hi, I am new to PostgreSQL. I have an empty PostgreSQL DB containing tables but no data. I issued the following command in PGADMIN SQL editor: CREATE DATABASE "NewDefault" WITH OWNER = postgres ENCODING = 'UTF8' TEMPLATE = Default TABLESPACE = pg_default LC_COLLATE

[SQL] Euclidean distance between two sets of tuples

2013-02-25 Thread Surfing
Hi all, I would like to ask if there exists a function to calculate the Euclidean distance between two rows of the same table. Obviously, the distance between two non-numeric fields should be 0 if they are the same value, 1 otherwise. In general, I need to compute an average distance betwe