Re: [GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-12 Thread Adarsh Sharma
Below link is little helpful :- http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-pg_xlogdump/ Thanks

[GENERAL] function with different return type depending on parameter?

2014-02-12 Thread James Harper
is it possible to have a function that can return a different type depending on the parameters? Eg (approximately) if param = one then return 1 if param = two then return 2 if param = three then return 3.0 etc I can't see any variant type thanks James -- Sent via pgsql-general mailing

Re: [GENERAL] function with different return type depending on parameter?

2014-02-12 Thread Rémi Cura
Hey http://www.postgresql.org/docs/9.3/static/plpgsql-declarations.html at anyelement. Cheers Rémi-C 2014-02-12 10:20 GMT+01:00 James Harper james.har...@bendigoit.com.au: is it possible to have a function that can return a different type depending on the parameters? Eg (approximately) if

Re: [GENERAL] function with different return type depending on parameter?

2014-02-12 Thread Pavel Stehule
Hello no it is not possible Regards Pavel p.s. result - type must be known before execution (when execution plan is created) 2014-02-12 10:20 GMT+01:00 James Harper james.har...@bendigoit.com.au: is it possible to have a function that can return a different type depending on the

Re: [GENERAL] pgsql and asciidoc output

2014-02-12 Thread Glyn Astill
From: Bruce Momjian br...@momjian.us To: PostgreSQL-general pgsql-general@postgreSQL.org Sent: Tuesday, 11 February 2014, 22:56 Subject: [GENERAL] pgsql and asciidoc output Someone suggested that 'asciidoc' (http://en.wikipedia.org/wiki/AsciiDoc) would be a good output format for psql,

Re: [GENERAL] Streaming Replication - Error on Standby

2014-02-12 Thread bobJobS
Thanks for the information and the URLs! -- View this message in context: http://postgresql.1045698.n5.nabble.com/Streaming-Replication-Error-on-Standby-tp5791463p5791588.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list

Re: [GENERAL] pgsql and asciidoc output

2014-02-12 Thread Bruce Momjian
On Tue, Feb 11, 2014 at 03:32:32PM -0800, Steve Atkins wrote: On Feb 11, 2014, at 2:56 PM, Bruce Momjian br...@momjian.us wrote: Someone suggested that 'asciidoc' (http://en.wikipedia.org/wiki/AsciiDoc) would be a good output format for psql, similar to the existing output formats of

Re: [GENERAL] pgsql and asciidoc output

2014-02-12 Thread Bruce Momjian
On Wed, Feb 12, 2014 at 06:02:29AM +0100, Pavel Stehule wrote: Perhaps, but if we're going to add a text markup format then we'll have to choose one out of many. I personally find Markdown to be more pleasing to the eye than AsciiDoc. http://en.wikipedia.org/wiki/Markdown

Re: [GENERAL] pgsql and asciidoc output

2014-02-12 Thread Bruce Momjian
On Wed, Feb 12, 2014 at 08:48:49AM +0100, Gabriele Bartolini wrote: I second Bruce. I massively use asciidoc. I guess adding both asciidoc and md would not be too hard. Agreed. Assuming there are no objections, I will add it to the TODO list. -- Bruce Momjian br...@momjian.us

Re: [GENERAL] function with different return type depending on parameter?

2014-02-12 Thread Tom Lane
James Harper james.har...@bendigoit.com.au writes: is it possible to have a function that can return a different type depending on the parameters? The data type of any expression (including a function call) has to be determinable at parse time, so no you can't just randomly return a

Re: [GENERAL] pgsql and asciidoc output

2014-02-12 Thread Peter Eisentraut
On 2/11/14, 6:25 PM, Vik Fearing wrote: I personally find Markdown to be more pleasing to the eye than AsciiDoc. Markdown can embed HTML tables, so there is nothing that we need to implement. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] function with different return type depending on parameter?

2014-02-12 Thread Merlin Moncure
On Wed, Feb 12, 2014 at 9:24 AM, Tom Lane t...@sss.pgh.pa.us wrote: James Harper james.har...@bendigoit.com.au writes: is it possible to have a function that can return a different type depending on the parameters? The data type of any expression (including a function call) has to be

[GENERAL] pg_restore issue

2014-02-12 Thread Leonardo M . Ramé
Hi, I'm trying to restore a database dump using pg_restore with the following parameters: pg_restore -h 127.0.0.1 -U _postgresql \ -c -d postgres --exit-on-error \ my_dump.backup Note I used \ to wrap the command, but the real one does not have those. pg_restore: [archiver (db)] Error while

Re: [GENERAL] pg_restore issue

2014-02-12 Thread Adrian Klaver
On 02/12/2014 09:41 AM, Leonardo M. Ramé wrote: Hi, I'm trying to restore a database dump using pg_restore with the following parameters: pg_restore -h 127.0.0.1 -U _postgresql \ -c -d postgres --exit-on-error \ my_dump.backup Note I used \ to wrap the command, but the real one does not

Re: [GENERAL] Hard upgrade (everything)

2014-02-12 Thread Bruce Momjian
On Thu, Feb 6, 2014 at 10:07:18AM +0100, Rémi Cura wrote: On my private computer I upgraded first the postgres to 9.3, then upgraded postgis. Sadly according to http://trac.osgeo.org/postgis/wiki/ UsersWikiPostgreSQLPostGIS , postgis 1.5 is not compatible with postgres 9.3. However POstgis

Re: [GENERAL] pg_restore issue

2014-02-12 Thread Tom Lane
Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= l.r...@griensu.com writes: Hi, I'm trying to restore a database dump using pg_restore with the following parameters: pg_restore -h 127.0.0.1 -U _postgresql \ -c -d postgres --exit-on-error \ my_dump.backup Note I used \ to wrap the command, but the

Re: [GENERAL] pg_restore issue

2014-02-12 Thread Leonardo M . Ramé
On 2014-02-12 09:51:10 -0800, Adrian Klaver wrote: On 02/12/2014 09:41 AM, Leonardo M. Ramé wrote: Hi, I'm trying to restore a database dump using pg_restore with the following parameters: pg_restore -h 127.0.0.1 -U _postgresql \ -c -d postgres --exit-on-error \ my_dump.backup

Re: [GENERAL] pg_restore issue

2014-02-12 Thread Leonardo M . Ramé
On 2014-02-12 13:30:52 -0500, Tom Lane wrote: Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= l.r...@griensu.com writes: Hi, I'm trying to restore a database dump using pg_restore with the following parameters: pg_restore -h 127.0.0.1 -U _postgresql \ -c -d postgres --exit-on-error \

Re: [GENERAL] pg_restore issue

2014-02-12 Thread Tom Lane
Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= l.r...@griensu.com writes: On 2014-02-12 13:30:52 -0500, Tom Lane wrote: The -c switch causes pg_restore to try to DROP every object it's about to restore. If you're restoring into an empty database then this is useless, and in fact will not work if

Re: [GENERAL] pg_restore issue

2014-02-12 Thread Leonardo M . Ramé
On 2014-02-12 14:04:41 -0500, Tom Lane wrote: Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= l.r...@griensu.com writes: On 2014-02-12 13:30:52 -0500, Tom Lane wrote: The -c switch causes pg_restore to try to DROP every object it's about to restore. If you're restoring into an empty database then

[GENERAL] Pg_trgm and invalid invalid byte sequence for encoding UTF8

2014-02-12 Thread alexandros_e
Hello experts, I want to compare integer arrays basically with methods based on string similarity (i.e., levenshtein, trigrams etc).. In order to do that I hacked a custom function that converts those integer array to strings, where each integer is converted to a character by the function

Re: [GENERAL] pg_restore issue

2014-02-12 Thread Jerry Sievers
Leonardo M. Ramé l.r...@griensu.com writes: On 2014-02-12 13:30:52 -0500, Tom Lane wrote: Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= l.r...@griensu.com writes: Hi, I'm trying to restore a database dump using pg_restore with the following parameters: pg_restore -h 127.0.0.1 -U _postgresql \

Re: [GENERAL] pg_test_fsync: Invalid argument in the middle of a test

2014-02-12 Thread Bruce Momjian
On Tue, Feb 11, 2014 at 01:28:01AM +0200, Marti Raudsepp wrote: On Tue, Feb 11, 2014 at 12:20 AM, Marti Raudsepp ma...@juffo.org wrote: This is on Ubuntu 13.10 (kernel 3.11) with XFS (mount ed with noatime, no other customizations). I managed to track this down; XFS doesn't allow using

Re: [GENERAL] pg_test_fsync: Invalid argument in the middle of a test

2014-02-12 Thread Alvaro Herrera
Bruce Momjian wrote: On Tue, Feb 11, 2014 at 01:28:01AM +0200, Marti Raudsepp wrote: On Tue, Feb 11, 2014 at 12:20 AM, Marti Raudsepp ma...@juffo.org wrote: This is on Ubuntu 13.10 (kernel 3.11) with XFS (mount ed with noatime, no other customizations). I managed to track this down;

Re: [GENERAL] pg_test_fsync: Invalid argument in the middle of a test

2014-02-12 Thread Marti Raudsepp
On Wed, Feb 12, 2014 at 10:46 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Would it be more useful to report the test as failed and continue with other tests? Yeah, I think so, I'm planning to code this in the week. It's harder than it sounds because the alarm() timer is still ticking. On

Re: [GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-12 Thread Michael Paquier
On Wed, Feb 12, 2014 at 5:19 PM, Adarsh Sharma eddy.ada...@gmail.com wrote: Below link is little helpful :- http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-pg_xlogdump/ Postgres core includes pg_xlogdump since 9.3 and not xlogdump. As their outputs are a bit different you