Re: [GENERAL] [PGSQL 8.3.5] Use of a partial indexes

2008-12-31 Thread Reg Me Please
Well it should look like the one you suggest. But maybe I've missed some important concept in the partial indexes theory! :-) As soon as I read your posting I understood the problem. I was thinking to create a big cut on the index containing the flag and the timestamp, while the concept is to cut

Re: [GENERAL] return X number of refcursors from a function

2008-12-31 Thread Albe Laurenz
Derek Liang wrote: > I tried to use the following code to retrieve the content of table1 4 > times (in my application, the total number of refcursors that will be > returned is determined by the data in the database). I am getting the > error message says "ERROR: cursor "" already in > use". > >

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-31 Thread Albe Laurenz
Please don't top post. Julius Tuskenis wrote: >> Large Objects >> (http://www.postgresql.org/docs/current/static/largeobjects.html) >> use OID columns, and they work fine for storing binary data like images. > > In the article you provided it is said that "The return value is the OID > that was

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-31 Thread Julius Tuskenis
Albe Laurenz rašė: I don't quite understand what you wrote about lo_read and libpq, because libpq provides lo_open. All I wanted to say, is that it's the components that "talks" to libpq, so there's not a nice way of programming to violate the route "your code -> component code -> libpq". So th

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Karsten Hilbert
On Mon, Dec 29, 2008 at 09:07:14AM -0300, Alvaro Herrera wrote: > > That would not quite be enough -- I am talking about > > messages reported *during* auth, say > > > > FATAL: password authentication failed for user "postgres" > > > > or > > > > fe_sendauth: no password supplied > > >

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Tom Lane
Karsten Hilbert writes: > On Mon, Dec 29, 2008 at 09:07:14AM -0300, Alvaro Herrera wrote: >> And I'm now wondering if we should delay initializing the translation >> stuff until after client_encoding has been reported. > Or else > - just don't pass those messages through gettext so they are >

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Karsten Hilbert
> Karsten Hilbert writes: > > On Mon, Dec 29, 2008 at 09:07:14AM -0300, Alvaro Herrera wrote: > >> And I'm now wondering if we should delay initializing the translation > >> stuff until after client_encoding has been reported. > > > Or else > > > - just don't pass those messages through gettext

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Peter Eisentraut
On Wednesday 31 December 2008 18:57:29 Karsten Hilbert wrote: > The solution is to find the right layer to take control of the encoding but > this is eventually only possible if the encoding is *known*. Thus the plea > for "7-bit-ascii English by default until the encoding *can* be known". > Going

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Karsten Hilbert
> On Wednesday 31 December 2008 18:57:29 Karsten Hilbert wrote: > > The solution is to find the right layer to take control of the encoding > but > > this is eventually only possible if the encoding is *known*. Thus the > plea > > for "7-bit-ascii English by default until the encoding *can* be kno

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Tom Lane
Peter Eisentraut writes: > On Wednesday 31 December 2008 18:57:29 Karsten Hilbert wrote: >> The solution is to find the right layer to take control of the encoding but >> this is eventually only possible if the encoding is *known*. Thus the plea >> for "7-bit-ascii English by default until the enc

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Karsten Hilbert
> > The proper fix is probably to include the client encoding in the > connection > > startup message. > > What of errors occurring before such an option could be applied? > > I think that ultimately it's necessary to accept that there will be some > window during connection startup where sendin

Re: [GENERAL] encoding of PostgreSQL messages

2008-12-31 Thread Karsten Hilbert
> Hm, so maybe both Peter and Alvaro are right: > > 1) Setting the translation wrapper to a NOOP as early as possible. > > Thus, the first messages are sent in 7-bit ASCII English. Despite being *marked* for translation and a translation to exist in the .po file, that is. Karsten -- Sensat

[GENERAL] pg_restore question (-T and -t)

2008-12-31 Thread Tony Caduto
Hi, does anyone know if you can do multiple -T or -t (restore named trigger, restore name table) switches? In the docs for pg_restore it does not specify if it will accept more than one, but in the pg_dump docs the -n and -t switches allow multiples. Thanks, tony -- Sent via pgsql-general

Re: [GENERAL] pg_restore question (-T and -t)

2008-12-31 Thread George Pavlov
Why not just try it! Answer: all -t switches after the first one are ignored. (And, no, "pg_restore --help" does not mention that). However with -l and -L, you have a much more powerful mechanism for specifying exactly which objects you want restored. > -Original Message- > From: pgsql-ge

Re: [GENERAL] pg_restore question (-T and -t)

2008-12-31 Thread Martin Gainty
Tony- pgdump version 8.3 will dump multiple tables (with multiple -t) http://www.postgresql.org/docs/8.3/interactive/app-pgdump.html but I dont see the same multiple table functionality with pgrestore http://www.postgresql.org/docs/8.3/interactive/app-pgrestore.html you may have found a bug..

[GENERAL] manage changes to views having depencies

2008-12-31 Thread Eric Worden
Can anyone recommend a reasonably efficient system for changing a view definition (say by adding a column) when it has a bunch of dependent functions? Right now I work with the output from pg_dump to recreate things after doing "DROP VIEW ... CASCADE". But the pg_dump schema output is only approx

Re: [GENERAL] manage changes to views having depencies

2008-12-31 Thread Scott Marlowe
On Wed, Dec 31, 2008 at 9:57 PM, Eric Worden wrote: > Can anyone recommend a reasonably efficient system for changing a view > definition (say by adding a column) when it has a bunch of dependent > functions? > > Right now I work with the output from pg_dump to recreate things after > doing "DROP

Re: [GENERAL] postgres block_size problem

2008-12-31 Thread Craig Ringer
Bhujbal, Santosh wrote: > 2008-12-30 14:57:33 IST DETAIL: The database cluster was initialized > with BLCKSZ 8192, but the server was compiled with BLCKSZ 16384. > > 2008-12-30 14:57:33 IST HINT: It looks like you need to recompile or > initdb. This error message tells you the answer. You ca