Re: [GENERAL] numeric cast oddity

2009-12-05 Thread Sim Zacks
As I mentioned, it is more then just a headers issue it is a type issue. I have a view that has a column of type numeric(20,4) If I replace that column with -1::numeric(20,4) or - (1::numeric(20,4)) the type that goes to the view is numeric without any scale or precision and then I get an error t

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-05 Thread Scott Marlowe
On Sat, Dec 5, 2009 at 12:11 PM, Jose Maria Terry Jimenez wrote: > Hello all, > > I'm trying to do a crosstab from data that row names are times. > > These times are timestamps and  i  want to  use they truncating to minutes >  this works for me: > > select distinct date_trunc('minute',"timestamp"

Re: [GENERAL] FATAL: no pg_hba.conf entry for host “::1”

2009-12-05 Thread Tom Lane
morny writes: > # IPv4 local connections: > host all all 127.0.0.1/32 md5 > # IPv6 local connections: > #host all all ::1/128 md5 > So the issue seems to be with the last line on IPv6, Yup: it's commented out. Get rid of the '#'. regards, tom lane -- Sent via pgsql-ge

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-05 Thread Richard Broersma
On Sat, Dec 5, 2009 at 11:11 AM, Jose Maria Terry Jimenez wrote: > select distinct date_trunc('minute',"timestamp") as "timestamp" from > historico order by "timestamp"; Notice the example from the documentation: http://www.postgresql.org/docs/8.4/interactive/functions-datetime.html#FUNCTIONS-DA

Re: [GENERAL] Help with starting portable version of postgresql

2009-12-05 Thread Thomas Kellerer
John R Pierce wrote on 06.12.2009 00:01: I downloaded the portable version of Postegresql from http://greg.webhop.net/postgresql_portable It works but the problem is that to start the server you must load it from the gui. Instead since I want to start the server from my app, I need to underst

Re: [GENERAL] Help with starting portable version of postgresql

2009-12-05 Thread John R Pierce
marco di antonio wrote: Hi, I downloaded the portable version of Postegresql from http://greg.webhop.net/postgresql_portable It works but the problem is that to start the server you must load it from the gui. Instead since I want to start the server from my app, I need to understand how to

Re: [GENERAL] FATAL: no pg_hba.conf entry for host “::1”

2009-12-05 Thread Andy Shellam (Mailing Lists)
Hi, > > So the issue seems to be with the last line on IPv6, to be honest i dont > even know what IPv6 is, could disabling IPv6 do the trick or do i need to > add something? Your machine is connecting to PostgreSQL using IPv6's "localhost" address. IPv6 is a newer format of IP addressing that

[GENERAL] Help with starting portable version of postgresql

2009-12-05 Thread marco di antonio
Hi, I downloaded the portable version of Postegresql from http://greg.webhop.net/postgresql_portable It works but the problem is that to start the server you must load it from the gui. Instead since I want to start the server from my app, I need to understand how to load it manually. I tried star

Re: [GENERAL] Examples of using PQexecParams

2009-12-05 Thread Daniel
> check out libpqtypes (http://libpqtypes.esilo.com).  It does all the > binary stuff for you (which you don't need to to with PQexecParams). > thanks, but how do you install it on Gentoo, there is no ebuild. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

[GENERAL] FATAL: no pg_hba .conf entry for host “::1”

2009-12-05 Thread morny
Hi, Im using an application that connects to postgreSQL, now its being tested on a few machines and connects fine but on 1 machine i get this FATAL: no pg_hba.conf entry for host “::1”, user “postgres”, database “myDatabase", SSL off. Heres the HBACONFIG FILE DETAILS # TYPE DATABASE USER CIDR-AD

Re: [GENERAL] tsvector from external files

2009-12-05 Thread Tom Lane
Perry Smith writes: > For example, in to_tsvector([config regconfig , ] document text) -- > how do I give it an external file for document text? pg_read_file() perhaps? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Filip Rembiałkowski
without digging too much into the details - just a suggestion: look at the ltree contrib. it actually provides an indexable array prefix search. 2009/12/4 Denes Daniel : > Hi, > > I have a table like this: > > CREATE TABLE test ( > type text NOT NULL, >     ident text[] NOT NULL, >     ...

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Merlin Moncure
On Sat, Dec 5, 2009 at 10:31 AM, Denes Daniel wrote: > According to the documentation, > http://www.postgresql.org/docs/8.4/static/functions-comparisons.html#ROW-WISE-COMPARISON > "Note: Prior to PostgreSQL 8.2, the <, <=, > and >= cases were not handled > per SQL specification." > I think the way

[GENERAL] Error in crosstab using date_trunc

2009-12-05 Thread Jose Maria Terry Jimenez
Hello all, I'm trying to do a crosstab from data that row names are times. These times are timestamps and i want to use they truncating to minutes this works for me: select distinct date_trunc('minute',"timestamp") as "timestamp" from historico order by "timestamp"; Getting times "norm

[GENERAL] tsvector from external files

2009-12-05 Thread Perry Smith
Hi, In the documentation there is this statement: Another possibility is to store the documents as simple text files in the file system. In this case, the database can be used to store the full text index and to execute searches, and some unique identifier can be used to retrieve the document

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Denes Daniel
2009/12/5 Merlin Moncure > AFAIK, your approach is the only solution given your requirements. It > works well...I've used it often, but usually for integers. Maybe > there is a missing operator for arrays kinda similar to the contains > operator that would be btree indexable. Yes, I also thi

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Denes Daniel
2009/12/5 Sam Mason > Would a GIN index help? You'd be able to ask if a 'foo' appears > anywhere in the array (or some subset if you want). You can then have a > subsequent filter that actually expresses the clause you want. Not sure > what selectivity you're dealing with and if this would be

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Merlin Moncure
On Sat, Dec 5, 2009 at 4:54 AM, Sam Mason wrote: > On Sat, Dec 05, 2009 at 02:23:13AM +0100, Denes Daniel wrote: >> 2009/12/4 Sam Mason >> >  CREATE INDEX test_my_idx ON test (type,(ident[1])); >> >> Sorry, but this approach is no good, since I may search like: >> SELECT * FROM test WHERE type =

Re: [GENERAL] pg_attribute.attnum - wrong column ordinal?

2009-12-05 Thread Peter Eisentraut
On tor, 2009-12-03 at 10:09 -0500, Tom Lane wrote: > Alvaro Herrera writes: > > Should we recast the attributes and columns views in information_schema? > > I notice they still use attnum. > > I'd vote against it, at least until we have something better than a > row_number solution. That would c

[GENERAL] Looking for advice on working with revisions

2009-12-05 Thread Ayo
Hello PostgreSQL users and developers, I have the following database structure to store information about (game) releases. As this information is contributed and edited by users, all changes to the release information are recorded in the form of 'revisions'.  -- this is a simplified representatio

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Sam Mason
On Sat, Dec 05, 2009 at 02:23:13AM +0100, Denes Daniel wrote: > 2009/12/4 Sam Mason > > CREATE INDEX test_my_idx ON test (type,(ident[1])); > > Sorry, but this approach is no good, since I may search like: > SELECT * FROM test WHERE type = 'three' AND (ident[1] = 'foo' AND ident[2] = > 'bar'); >

Re: [GENERAL] Please unsubscibe me from this mailing list

2009-12-05 Thread Andreas Kretschmer
kiran k wrote: > Hi, > > I have tried clicking the unsubscribe mailing list to unsubscribe myself. But > it doesn't seem to work. > > Please unsubscribe this email id: kirank...@gmail.com See the headers: List-Unsubscribe: In othe

[GENERAL] Please unsubscibe me from this mailing list

2009-12-05 Thread kiran k
Hi, I have tried clicking the unsubscribe mailing list to unsubscribe myself. But it doesn't seem to work. Please unsubscribe this email id: kirank...@gmail.com Thanks, Kiran