[GENERAL] XPath PostgreSQL 8.4

2009-10-17 Thread Karl Koster
It looks like I have to abandon xml2 functions in PostgreSQL 8.4. The problem is I can't seem to find an incantation of xpath that will perform the same thing. I have tried the following snippet: select xpath('/trade/trade-info/id/text()', cast(xml as xml))[1] as id from risk.trade_table whi

Re: [GENERAL] 10/13 SFPUG meeting, "The Mighty GUCS," video now available

2009-10-17 Thread Gerhard Wiesinger
On Fri, 16 Oct 2009, Christophe Pettus wrote: The video archive for the 10/13 SFPUG meeting, "The Mighty GUCS: A guide to the essential PostgreSQL settings you need to know," is now available: http://thebuild.com/blog/2009/10/16/the-mighty-gucs/ It's also available on Vimeo:

Re: [GENERAL] 10/13 SFPUG meeting, "The Mighty GUCS," video now available

2009-10-17 Thread Gerhard Wiesinger
On Fri, 16 Oct 2009, Christophe Pettus wrote: The video archive for the 10/13 SFPUG meeting, "The Mighty GUCS: A guide to the essential PostgreSQL settings you need to know," is now available: http://thebuild.com/blog/2009/10/16/the-mighty-gucs/ It's also available on Vimeo:

Re: [GENERAL] db not dumping properly, or at least not restoring

2009-10-17 Thread Scott Marlowe
On Fri, Oct 16, 2009 at 6:11 PM, Kirk Wythers wrote: > On Oct 16, 2009, at 4:51 PM, Scott Marlowe wrote: > >> On Fri, Oct 16, 2009 at 11:25 AM, Kirk Wythers wrote: >> >>> Any ideas what the problem could be here? >> >> Use the pg_dump from the target (i.e. newer) pgsql.  I.e. if going >> from 8.

Re: [GENERAL] slightly off-topic: Central Auth

2009-10-17 Thread Raymond O'Donnell
On 16/10/2009 20:38, Raymond O'Donnell wrote: > Does "PG" = PostgreSQL? If so, it can do LDAP, Kerberos and PAM, among > other things: Apologies for the noise - I thought I was replying to a non-PG list. :-) Ray. -- Raymond O'Donnel

Re: [GENERAL] How ad an increasing index to a query result?

2009-10-17 Thread LaMi
Josip wrote: Hello, Could somebody please try to help me with this problem? So, let’s say that I have the query: CREATE SEQUENCE c START 1; SELECT a, nextval('c') as b FROM table1 ORDER BY a DESC LIMIT 5; I.e., I want to pick the 5 largest entries from table1 and show them alongside a new ind

[GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Ilya Urikh
Hi, I have a problem with snprintf function which insert the variables to string with error. This code I wrote for PostgreSQL 8.3.7 on Fedora 10 and it worked fine. But now I use CentOS 5.3 and PostgreSQL 8.3.8. Function: Datum calculateAccount(PG_FUNCTION_ARGS) { int64 accountId = PG_GETAR

Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Pavel Stehule
2009/10/17 Ilya Urikh : > Hi, > > I have a problem with snprintf function which insert the variables to string > with error. > This code I wrote for PostgreSQL 8.3.7 on Fedora 10 and it worked fine. But > now I use CentOS 5.3 and PostgreSQL 8.3.8. > > Function: > Datum calculateAccount(PG_FUNCTION_

Re: [GENERAL] pgadmin3 hangs during dump

2009-10-17 Thread Peter Geoghegan
> Is this the right place to post this? No, pgsql-general@postgresql.org is no place for posting questions about PgAdmin3, or for fatuous left wing rants. Regards, Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://

Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Ilya Urikh
Pavel, Could you provide some example? I don't really understand which placeholder I can use. On Sun, Oct 18, 2009 at 1:20 AM, Pavel Stehule wrote: > 2009/10/17 Ilya Urikh : > > Hi, > > > > I have a problem with snprintf function which insert the variables to > string > > with error. > > This c

Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Pavel Stehule
2009/10/17 Ilya Urikh : > Pavel, > > Could you provide some example? I don't really understand which placeholder > I can use. > here is one fragment from orafce: it's for delete statement, but SELECT statement is similar ItemPointer tid; Oid argtypes[1] = {TIDOID};

Re: [GENERAL] XPath PostgreSQL 8.4

2009-10-17 Thread Tim Landscheidt
Karl Koster wrote: > It looks like I have to abandon xml2 functions in PostgreSQL > 8.4. The problem is I can't seem to find an incantation of > xpath that will perform the same thing. I have tried the > following snippet: > select xpath('/trade/trade-info/id/text()', cast(xml as > xml))[1] as i

Re: [GENERAL] XPath PostgreSQL 8.4

2009-10-17 Thread Tim Landscheidt
I wrote: > [...] > You have to put brackets around the function call: > | select (xpath('/trade/trade-info/id/text()', cast(xml as xml)))[1] as id > from risk.trade_table; ... or, after a look in the dictionary, whatever you call "(" and ")" :-). Tim -- Sent via pgsql-general mailing list (

Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Tom Lane
Ilya Urikh writes: > This code I wrote for PostgreSQL 8.3.7 on Fedora 10 and it worked fine. But > now I use CentOS 5.3 and PostgreSQL 8.3.8. It looks to me like you're assuming that %ld is the appropriate format string for an int64 value. This might be true on a 64-bit machine but it would not

Re: [GENERAL] 10/13 SFPUG meeting, "The Mighty GUCS," video now available

2009-10-17 Thread Christophe Pettus
On Oct 17, 2009, at 2:05 AM, Gerhard Wiesinger wrote: Can you also upload the sample config files and the presentation. Josh Berkus is on the road right now, but I'm sure he'll upload them quite soon. -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (p

[GENERAL] Delete fails with out of memory

2009-10-17 Thread yuliada
Hello I have a large database and I'm trying to execute delete on a table which has some related tables. The query fails with following error: ERROR: out of memory DETAIL: Failed on request of size 1048576. I'm new to postgresql and I'm currently trying to figure out what to do by myself. I've