[GENERAL] PL/pgSQL - Help or advice please on using unbound cursors

2012-07-23 Thread Andrew Hastie
Hi all, Apologies if the answer to my question is "obvious", but I'm fairly new to writing functions in PG. I think my problem is has a simple solution, but I'm damned if I can find it :-/ (Postgres v9.1.1 on Linux 64-bit) I'm trying to write a function which will :- 1. Take 3 input params;

Re: [GENERAL] PL/pgSQL - Help or advice please on using unbound cursors

2012-07-23 Thread Pavel Stehule
Hello dynamic SQL has not impact on FOUND variable - use GET DIAGNOSTICS varname = ROW_COUNT instead. Regards Pavel Stehule 2012/7/23 Andrew Hastie : > Hi all, > > Apologies if the answer to my question is "obvious", but I'm fairly new to > writing functions in PG. I think my problem is has a

[GENERAL] Problem with 9.1 streaming replication

2012-07-23 Thread Georges Racinet
Hi all. While testing a replication setup with PostgreSQL 9.1.4, I'm having an error after promoting the slave to master : some file under the 'base' subdirectory could not be read, that only 0 bytes could be fetched (see the log extract at the end) Indeed the actual file size is 0. I believe

Re: [GENERAL] Pg_ctl promote -- wait for slave to be promoted fully ?

2012-07-23 Thread Manoj Govindassamy
awesome. thanks for the help. Will test it out. thanks, Manoj On 07/20/2012 06:57 PM, Chris Angelico wrote: On Sat, Jul 21, 2012 at 5:28 AM, Manoj Govindassamy wrote: -- Anyway I can query the state of DB to know its status slave or master ?? So, that i can issue write statements only aft

[GENERAL] meaning of "waiting" column in pg_stat_activity?

2012-07-23 Thread Chris Curvey
Just wondering...if a query is "waiting", what is it waiting for? Is this only for locks, or can it be for disk, or a memory buffer? (If there is a description of the meaning of things in pg_stat_activity and it's relatives, I'd love a pointer, 'cause I can't seem to find it.) -- e-Mail is the

[GENERAL] Reporting tool for Npgsql

2012-07-23 Thread Marcus Túlio Ramos
Hi there! I´m using Visual Studio 2010 - C# and Postgres with NPGSQL for data provider. I´d like to know what´s the best option for a Report Builder on this scenario. Thanks -- View this message in context: http://postgresql.1045698.n5.nabble.com/Reporting-tool-for-Npgsql-tp5717654.html

[GENERAL] General guidance: Levenshtein distance versus other similarity algorithms

2012-07-23 Thread Rachel Owsley
Hi, I am hoping you can give me some guidance here. I'm using postgresql 9.1. Basically, I'm trying to create a query on a table of businesses that will return all similar matches to a business name. This is a huge table, and there is a lot of variation in names. The length of the string can be

Re: [GENERAL] meaning of "waiting" column in pg_stat_activity?

2012-07-23 Thread Guillaume Lelarge
On Mon, 2012-07-23 at 16:13 -0400, Chris Curvey wrote: > Just wondering...if a query is "waiting", what is it waiting for? Locks. > Is > this only for locks, or can it be for disk, or a memory buffer? Only locks. > (If > there is a description of the meaning of things in pg_stat_activity >

Re: [GENERAL] Odd corruption issue reported on dba.stackexchange.com, need advice

2012-07-23 Thread Jeff Davis
On Thu, 2012-07-19 at 11:35 +0800, Craig Ringer wrote: > The short version is that the person did a bulk-load of some PostGIS > data using the osm2pgsql data-loader tool > ( http://wiki.openstreetmap.org/wiki/Osm2pgsql) to populate a Pg 9.1 > database. This appeared to succeed, but when the server

Re: [GENERAL] Odd corruption issue reported on dba.stackexchange.com, need advice

2012-07-23 Thread Craig Ringer
On 07/24/2012 08:48 AM, Jeff Davis wrote: On Thu, 2012-07-19 at 11:35 +0800, Craig Ringer wrote: The short version is that the person did a bulk-load of some PostGIS data using the osm2pgsql data-loader tool ( http://wiki.openstreetmap.org/wiki/Osm2pgsql) to populate a Pg 9.1 database. This appe