Re: [GENERAL] Help needed structuring Postgresql correlation query

2016-06-21 Thread Tim Smith
Thanks for that, looks like something to sink my teeth into ! On 21 June 2016 at 13:29, Alban Hertroys wrote: > >> On 19 Jun 2016, at 10:58, Tim Smith wrote: >> >> Hi, >> >> My postgresql-fu is not good enough to write a query to achieve this >> (some may well say r is a better suited tool to ac

Re: [GENERAL] Help needed structuring Postgresql correlation query

2016-06-21 Thread Alban Hertroys
> On 19 Jun 2016, at 10:58, Tim Smith wrote: > > Hi, > > My postgresql-fu is not good enough to write a query to achieve this > (some may well say r is a better suited tool to achieve this !). > > I need to calculate what I would call a correlation window on a time > series of data, my table l

[GENERAL] Help needed structuring Postgresql correlation query

2016-06-20 Thread Tim Smith
Hi, My postgresql-fu is not good enough to write a query to achieve this (some may well say r is a better suited tool to achieve this !). I need to calculate what I would call a correlation window on a time series of data, my table looks like this : create table data(data_date date,data_measurem

Re: [GENERAL] Help needed with postgres stats and math

2014-08-05 Thread Tim Smith
Hi Serge, A million apologies for the delayed acknowledgement of your email.   The Yahoo webmail is doing weird things with conversations (your email was hiding in my sent box instead of inbox, tagged onto the end of my original email !). But I digress.  I will take a look at your suggestions a

Re: [GENERAL] Help needed with postgres stats and math

2014-08-04 Thread Serge Fonville
Or... Do you mean to use windowing functions? http://www.postgresql.org/docs/9.3/static/tutorial-window.html Or both of course... Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl 2014-08-04 19:43 GMT+02:00 Serge Fonville : > Hi, > > Perhaps a CTE would help? >

Re: [GENERAL] Help needed with postgres stats and math

2014-08-04 Thread Serge Fonville
Hi, Perhaps a CTE would help? WITH NormCTE AS ( SELECT delta - avg(delta))/stddev(delta) AS deltaNorm , (echo - avg(echo))/stddev(echo) AS echoNorm , (foxtrot - avg(foxtrot))/stddev(foxtrot) AS foxtrotNorm FROM t_subs ) SELECT deltaNorm + echoNorm + foxtrotNorm AS

[GENERAL] Help needed with postgres stats and math

2014-08-04 Thread Tim Smith
Hi, I'm on Postgres 9.3.5, however I think my knowledge of Postgres is not deep enough to help me with this challenge, so here I am reaching out to the community ! Let's say I have a table as follows : create table t_subs (alpha text,bravo text,charlie numeric,delta numeric,echo numeric,foxtr

Re: [GENERAL] Help needed to mount a dmp file

2012-04-09 Thread John R Pierce
On 04/09/12 12:40 PM, François Beausoleil wrote: It depends on whether you have a SQL dump file or a custom archive type. I believe pg_restore can restore both kinds. no, pg_restore can only restore from custom archives (made with pg_dump -Fc) . straight SQL dumps are fed to psql -- john

Re: [GENERAL] Help needed to mount a dmp file

2012-04-09 Thread François Beausoleil
Le lundi 9 avril 2012 à 12:47, Lux a écrit : > Hi, > I am new to Postgresql and have no clue. The first task given to me was to > try to mount this dmp file on Postgresql which has been downloaded from Jive. > I am not sure how to go about and where to start. Can someone please help me. > Than

[GENERAL] Help needed to mount a dmp file

2012-04-09 Thread Lux
Hi, I am new to Postgresql and have no clue. The first task given to me was to try to mount this dmp file on Postgresql which has been downloaded from Jive. I am not sure how to go about and where to start. Can someone please help me. Thanks & Regards, Lux.

Re: [GENERAL] Help needed creating a view

2012-01-27 Thread Sebastian Tennant
Quoth "David Johnston" : > A) SELECT user_id, CASE WHEN course_name = 'Maths' THEN completed ELSE false > END math_cmp, CASE WHEN course_name = 'English' THEN completed ELSE false > END AS english_cmp FROM applications > a) Expand to multiple columns and store either the default "false" or the

Re: [GENERAL] Help needed creating a view

2012-01-26 Thread salah jubeh
ubject: Re: [GENERAL] Help needed creating a view -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sebastian Tennant Sent: Thursday, January 26, 2012 6:55 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Help needed

Re: [GENERAL] Help needed creating a view

2012-01-26 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sebastian Tennant Sent: Thursday, January 26, 2012 6:55 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Help needed creating a view Hi list, Given an 'applica

[GENERAL] Help needed creating a view

2012-01-26 Thread Sebastian Tennant
Hi list, Given an 'applications' table for a static set of courses:: user_id (integer) course_name (text) completed (boolean) how best should I go about creating an 'alumni' view with columns: user_id (integer) maths (boolean) english (boolean) . . . . . . w

Re: [GENERAL] Help needed in Search

2011-09-29 Thread Filip Rembiałkowski
Siva, in addition to what others said, please note that underscore matches any character. to change it use escape char. http://www.postgresql.org/docs/9.1/static/functions-matching.html#FUNCTIONS-LIKE 2011/9/28 Siva Palanisamy > Hi All, > > ** ** > > I am trying to retrieve the contact

Re: [GENERAL] Help needed in Search

2011-09-28 Thread planas
On Wed, 2011-09-28 at 12:33 +0530, Siva Palanisamy wrote: > Hi All, > > > > I am trying to retrieve the contact names based on the keyed search > string. It performs good for the English alphabets and behaves > strangely for special chars such as _,/,\,% > > The % character is used by SQL

[GENERAL] Help needed in Search

2011-09-28 Thread Siva Palanisamy
Hi All, I am trying to retrieve the contact names based on the keyed search string. It performs good for the English alphabets and behaves strangely for special chars such as _,/,\,% My query in the function is similar to SELECT contact_name FROM contacts WHERE LOWER(contact_name) LIKE LOWER(

[GENERAL] Help needed in Search

2011-09-28 Thread Siva Palanisamy
Hi All, I am trying to retrieve the contact names based on the keyed search string. It performs good for the English alphabets and behaves strangely for special chars such as _,/,\,% My query in the function is similar to SELECT contact_name FROM contacts WHERE LOWER(contact_name) LIKE LOWER(

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Craig Ringer
On 22/06/11 10:00, Greg Smith wrote: > On 06/21/2011 10:00 AM, Vick Khera wrote: >> Postgres has nothing quite like the MySQL cluster mode with NDB. You >> will have to re-think your solution if you want to use postgres to >> distribute your queries and data across multiple servers. >> > > The

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Greg Smith
On 06/21/2011 10:00 AM, Vick Khera wrote: Postgres has nothing quite like the MySQL cluster mode with NDB. You will have to re-think your solution if you want to use postgres to distribute your queries and data across multiple servers. The closest thing to a NDB cluster in PostgreSQL is usi

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Craig Ringer
On 06/21/2011 01:25 PM, David Fetter wrote: Dynamically generated tables are generally a problem at the design level. Neither PostgreSQL nor any other engine will solve that. It depends a bit on what the OP means by dynamically generated tables. I'm not entirely sure what you mean by a "clu

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Vick Khera
On Tue, Jun 21, 2011 at 1:07 AM, Vikram Vaswani wrote: > So my first question is, I'd like to know if PostgreSQL has similar issues > when running in a clustered scenario. > Postgres has nothing quite like the MySQL cluster mode with NDB. You will have to re-think your solution if you want to us

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-20 Thread David Fetter
On Tue, Jun 21, 2011 at 05:07:10AM +, Vikram Vaswani wrote: > > Hello > > I'm new to PostgreSQL, coming at it from a MySQL background. I'm > currently looking at switching one of our applications (which > currently uses MySQL) over to PostgreSQL and had some questions. > > We're considering

[GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-20 Thread Vikram Vaswani
Hello I'm new to PostgreSQL, coming at it from a MySQL background. I'm currently looking at switching one of our applications (which currently uses MySQL) over to PostgreSQL and had some questions. We're considering the switch because of issues we have faced when using MySQL in a clustered sc

[GENERAL] Help needed in PITR

2008-04-15 Thread Andrea
Hi all, i'll try a second time to post tips on the problem i'm facing Fisrt sorry for my impatience; i first try to reed deeply as i can the docs and then i tryed to setup a test env to run a PITR, but it didn't work as is expected to. Now i'm getting confused, so i really need help in tr

Re: [GENERAL] Help needed optimizing query

2007-11-29 Thread Martijn van Oosterhout
On Thu, Nov 29, 2007 at 01:26:00PM +, Pedro Doria Meunier wrote: > Hi People. > > I need some help optimizing this query: > I still get Seq Scans although all used fields are indexed, hence the > time used... :-( A seq scan on a table with 10 rows is *good*. An index would take longer. What

[GENERAL] Help needed optimizing query

2007-11-29 Thread Pedro Doria Meunier
Hi People. I need some help optimizing this query: SELECT u.friendly_name, distance(transform(u.curr_location,32628), rc.agg_geometry) AS thedistance, u.mobile FROM (SELECT transform(collect(r.geometry),32628) AS agg_geometry, t.county FROM pt_madeira_roads r, pt_madeira_toponymy t WHERE r.name

[GENERAL] Help Needed

2007-11-27 Thread Amit
Hi, Hope you all are doing gr8! I need a help regarding PostgreSQL installation. I am using PostgreSQL for a web-based application using Tomcat. I want to install PostgreSQL automatically to user system(using some EXE) with a default database(which is required for my application to run). The m

[GENERAL] Help Needed

2007-11-27 Thread Amit
Hi, Hope you all are doing gr8! I need a help regarding PostgreSQL installation. I am using PostgreSQL for a web-based application using Tomcat. I want to install PostgreSQL automatically to user system(using some EXE) with a default database(which is required for my application to run). The m

[GENERAL] help needed, PG 8.0.0 ERROR: index is not a btree is solved in 8.0.9

2006-11-14 Thread surabhi.ahuja
  From: [EMAIL PROTECTED] on behalf of surabhi.ahujaSent: Fri 11/10/2006 12:03 PMTo: pgsql-general@postgresql.orgSubject: [GENERAL] how can i prove that this issue on PG 8.0.0 ERROR: index "patient_pkey" is not a btree is solved in 8.0.9 hi I am using Postgres 8.0.0 and we found this i

Re: [GENERAL] help needed, PG 8.0.0 ERROR: index is not a btree is solved in 8.0.9

2006-11-14 Thread Martijn van Oosterhout
On Tue, Nov 14, 2006 at 01:58:49PM +0530, surabhi.ahuja wrote: > hi > I am using Postgres 8.0.0 and we found this issue "ERROR: index > "patient_pkey" is not a btree" > I have been informed that we should shift to Postgres 8.0.9 I beleive you've asked this a few times already. As a rule it alway

[GENERAL] Help Needed in Postgis

2006-11-02 Thread ajay kamath
Hi,    I'm new to the mapserver and postgis system. I'm not very familiar with the structure applications involving these. My query is probably a very elementry one . Can someone please help me resolve this.AIM: I have a working Mapserver demo application, the common one which displays the map of I

Re: [GENERAL] Help needed

2006-10-19 Thread Casey Duncan
On Oct 19, 2006, at 8:19 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: I want to upgrade a system from 7.3.8 ro 8.1.5 I am new to Psql and looking for handy hints Any known problems or pit-falls ? You'll need to dump the database and reload (pg_dump and pg_restore), 8.1 uses a diffe

Re: [GENERAL] Help needed

2006-10-19 Thread Richard Broersma Jr
> I want to upgrade a system from 7.3.8 ro 8.1.5 > I am new to Psql and looking for handy hints > Any known problems or pit-falls ? > Anything we need to do in preparation ? The Postgresql manual is a good place to start: http://www.postgresql.org/docs/8.1/interactive/install-upgrading.html http:/

[GENERAL] Help needed

2006-10-19 Thread Craig_Walker
I want to upgrade a system from 7.3.8 ro 8.1.5 I am new to Psql and looking for handy hints Any known problems or pit-falls ? Anything we need to do in preparation ? Cheers CraigW ---(end of broadcast)--- TIP 3: Have you checked our extensive F

Re: [GENERAL] Help needed defining timestamp format for input?

2006-08-25 Thread Tom Lane
Brent Wood <[EMAIL PROTECTED]> writes: > I've been given a dataset (from Sybase) which has the timestamps > expressed as > "Jun 26 2002 12:18:56:903PM" That's pretty bizarre. My advice is to run a quick perl or sed script over the data and change the (I assume) fractional seconds delimiter to a

[GENERAL] Help needed defining timestamp format for input?

2006-08-25 Thread Brent Wood
Hi, I've been given a dataset (from Sybase) which has the timestamps expressed as "Jun 26 2002 12:18:56:903PM" I'd like to use copy in Postgres to load these data, but can't see in the (v8.1) docs how to specify this format for Postgresql. Can anyone help with this? Thanks, Brent Wood

Re: [GENERAL] help needed (which group do I post these questions to?)

2006-04-07 Thread Martijn van Oosterhout
On Thu, Apr 06, 2006 at 05:39:00PM -0700, Bit Byter wrote: > 1). Does anyone know how to execute a stored procedure (i.e. PL/PGSQL > function), using libpq, and passing it parameters?. An example will be > superb, as I have not managed to find one that does this after about a > week of Googling. S

[GENERAL] help needed (which group do I post these questions to?)

2006-04-07 Thread Bit Byter
I am getting a little desperate as I have not got any replies yet. I am wondering if this is the correct group for my questions. If not, please point me to the appropriate group. My questions revolve around libpq. 1). Does anyone know how to execute a stored procedure (i.e. PL/PGSQL function), us

Re: [GENERAL] help needed for functions

2005-09-16 Thread A. Kretschmer
am 16.09.2005, um 6:51:16 -0700 mailte Nitin Ahire folgendes: > I am facing problems for stored procedures. Is their any way so that I > can transfer my existing stored procedure from mssql to postgre ? I guess: no. > > I already read about functions & tried to implement it but I could not >

Re: [GENERAL] help needed for functions

2005-09-16 Thread Dinesh Pandey
ntid     LOOP     return next r;     END LOOP;     RETURN; END ' LANGUAGE 'plpgsql';   -     Thanks Dinesh Pandey From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nitin Ahire Sent: Friday, September 16, 2005 7:21 PM To: pgsql-

[GENERAL] help needed for functions

2005-09-16 Thread Nitin Ahire
Hello All,   I am new to postgresql database. I am transferring current database from mssql database to postgresql 7.4   I am facing problems for stored procedures. Is their any way so that I can transfer my existing stored procedure from mssql to postgre ?   I already read about functions & trie

[GENERAL] Help needed with PGOleDB driver and ADO

2005-07-14 Thread Craig Bryden
Hi   We have a numeric field in our table. When setting the value of this field to 1.00, we experience the following problem when using ADO (with the PgOleDB driver) to query the table.   the field comes back correctly identified as a NUMERIC field, but the actual value of of the field is

Re: [GENERAL] Help needed with QueryPlan

2004-12-16 Thread Alex
Richard, thanks for the reply. I actually did what you suggested but still the same. Now i set ENABLE_SEQSCAN=false in the perl script which works but I dont think thats the way it shold be done. Alex Richard Huxton wrote: Alex wrote: Hi, I have a query that runs pretty slow and tried to use exp

Re: [GENERAL] Help needed with QueryPlan

2004-12-14 Thread Richard Huxton
Alex wrote: Hi, I have a query that runs pretty slow and tried to use explain to see where the problem is. Both tables have 2.1 and 2.8 million records. In the Explain output I see that a Seq Scan is used on nval_price_hist what I dont quite understand. Could some one help me creating the correct i

[GENERAL] Help needed with QueryPlan

2004-12-13 Thread Alex
Hi, I have a query that runs pretty slow and tried to use explain to see where the problem is. Both tables have 2.1 and 2.8 million records. In the Explain output I see that a Seq Scan is used on nval_price_hist what I dont quite understand. Could some one help me creating the correct indices? SELE

Re: [GENERAL] Help needed on time data types

2004-07-12 Thread Peter Eisentraut
mike wrote: > All the date-time types seem to only be for specific time dates and > not for a running total. You probably want the interval type. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (sen

Re: [GENERAL] Help needed on time data types

2004-07-12 Thread Michal Taborsky
mike wrote: I cannot seem to find a field type in postgres that is equivalent to h:mm without enforcing a 24 hour day limit. This seems to preclude pg from use - am I correct? You want to use "interval" data type and then do some formatting on the output to get 123 hours 30 minutes. See: http://w

[GENERAL] Help needed on time data types

2004-07-12 Thread mike
Hi I am trying to setup a timesheet app. However I have come up against an unexpected problem (possibly fatal) I cannot seem to find a field type in postgres that is equivalent to h:mm without enforcing a 24 hour day limit. This seems to preclude pg from use - am I correct? All the date-time type

Re: [GENERAL] help needed regarding Query processing in postgres

2004-04-10 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > hi all, > > I am an M.Tech student of IITBombay,india. > We are doing a project on access control in postgres. > > Is there any way in which, i can add a extra predicate to the sql query > given to the postgres database table. > > please if any body could help me in th

[GENERAL] help needed regarding Query processing in postgres

2004-04-10 Thread kirang
hi all, I am an M.Tech student of IITBombay,india. We are doing a project on access control in postgres. Is there any way in which, i can add a extra predicate to the sql query given to the postgres database table. please if any body could help me in this regard. Reply as soon as posible. thank

[GENERAL] Help needed in Replicating pgsql

2003-09-09 Thread Hema Sekhar
Hi I am Hemasekhar K.P I am trying to replicae pgsql on REDHATLinux 8,but  the site http://gborg.postgresql.org/genpage?replication_72install. isgiving instructions on REDHATLinux 7,is there any site which gives instructions on how to replicate onREDHATLinux 8,Actually in postgresql.conf wh

Re: [GENERAL] Help needed : temp tables.

2000-10-09 Thread Tom Lane
"Vilson farias" <[EMAIL PROTECTED]> writes: > I'm having problems with temporary tables in postgre. > I've been using Postgre 7.02 in a red hat 6.2 and I'm accessing using Delphi > 5 + Winzeos Postgre Components. I've been using for some mounths and now I > checked that there are lots of temp tabl

[GENERAL] Help needed : temp tables.

2000-10-09 Thread Vilson farias
I'm having problems with temporary tables in postgre. I've been using Postgre 7.02 in a red hat 6.2 and I'm accessing using Delphi 5 + Winzeos Postgre Components. I've been using for some mounths and now I checked that there are lots of temp tables in my system. These tables where created by my a

Re: [GENERAL] HELP needed : COPY datas from file

1999-06-16 Thread Anonymous
Hi! On Wed, 16 Jun 1999, Ming-Hung Eng wrote: > I have a problem to copy datas from unix file, I get the following message > when I try to import > a file with more 20 lines : > > pgReadData() -- backend closed the channel unexpectedly > This probably means the backend terminated abnorma

[GENERAL] HELP needed : COPY datas from file

1999-06-16 Thread Anonymous
Hi I have a problem to copy datas from unix file, I get the following message when I try to import a file with more 20 lines : pgReadData() -- backend closed the channel unexpectedly This probably means the backend terminated abnormally before or while processing the request. We have los