Re: [GENERAL] cast name to oid

2012-08-15 Thread Sergey Konoplev
Hi, On Wed, Aug 15, 2012 at 1:02 AM, Little, Douglas douglas.lit...@orbitz.com wrote: Can someone let me know the correct way to do this? This is failing where p.oid = cast(proname as regproc); NOTICE: found dba_work.pg_get_functiondef2 WARNING: sqlstate 42846 WARNING: sqlerrm

[GENERAL] corrupted statistics file pg_stat_tmp/pgstat.stat

2012-08-15 Thread Carl von Clausewitz
Hi All, I’ve just made a clean install for PostgreSQL 9.1 (postgresql-server-9.1.4, postgresql-contrib-9.1.4) on a FreeBSD 9 (FreeBSD 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64). I’ve

[GENERAL] More probs with BLOBs

2012-08-15 Thread Neanderthelle Jones
We are getting a strange thing happening if the lo_export(attr, path) destination is a fifo. First, in the normal case, there is output to the file but also feedback to stdout (or somewhere, appearing on the VT screen) of the number 1. --- 1 (1 row) Now, if the destination file

Re: [GENERAL] More probs with BLOBs

2012-08-15 Thread Neanderthelle Jones
On Wed, 15 Aug 2012, Neanderthelle Jones wrote: So it seems to us that the lo_export output can't be piped (via a named pipe) to another process that reads from the pipe and expects the valid BLOB contents. I should have said that the BLOB is a PDF and the file that results from cat fifo

[GENERAL] PG Installer - Licensing Issues

2012-08-15 Thread Andrew Hastie
As I understand it, I am allowed to redistribute Postgres so long as I include the copyright notice plus paragraphs as detailed on http://www.postgresql.org/about/licence/. What I want to confirm is that the one-click installer (which I understand was supplied by EnterpriseDB) can also be

Re: [GENERAL] Visualize database schema

2012-08-15 Thread Wolfgang Keller
Can anyone advice about a tool to visualize a database schema? SQLalchemy, a Python module, can produce dot (Graphviz) output which you can load into your favourite diagramming application such as e.g. Omnigraffle, yEd or Dia:

Re: [GENERAL] corrupted statistics file pg_stat_tmp/pgstat.stat

2012-08-15 Thread Amitabh Kant
I run the same config (FreeBSD 9 with PG 9.1.x) on couple of servers, and they seem to be working fine without any error messages. The only other setting I have in my sysctl.conf is kern.maxfiles . Amitabh On Wed, Aug 15, 2012 at 1:27 PM, Carl von Clausewitz clausewit...@gmail.com wrote: Hi

Re: [GENERAL] corrupted statistics file pg_stat_tmp/pgstat.stat

2012-08-15 Thread Alban Hertroys
On 15 August 2012 09:57, Carl von Clausewitz clausewit...@gmail.com wrote: I’ve restored from TAR backup our databases, and everything looked fine. What exactly is in that TAR backup? Is that a tar/gzipped PG dump or a file-system snapshot? If the latter: - did you halt the database while

Re: [GENERAL] corrupted statistics file pg_stat_tmp/pgstat.stat

2012-08-15 Thread Tom Lane
Carl von Clausewitz clausewit...@gmail.com writes: I’ve restored from TAR backup our databases, and everything looked fine. Without changing any setting in postgresql.conf (or in kernel settings) – only “track_counts=on”, after 2-3 days, I’m receiving huge number (~5-10 PCS in

Re: [GENERAL] PG Installer - Licensing Issues

2012-08-15 Thread Bruce Momjian
On Wed, Aug 15, 2012 at 11:45:21AM +0100, Andrew Hastie wrote: As I understand it, I am allowed to redistribute Postgres so long as I include the copyright notice plus paragraphs as detailed on http://www.postgresql.org/about/licence/. What I want to confirm is that the one-click installer

Re: [GENERAL] PG Installer - Licensing Issues

2012-08-15 Thread Dave Page
On Wed, Aug 15, 2012 at 3:17 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Aug 15, 2012 at 11:45:21AM +0100, Andrew Hastie wrote: As I understand it, I am allowed to redistribute Postgres so long as I include the copyright notice plus paragraphs as detailed on

Re: [GENERAL] PG Installer - Licensing Issues

2012-08-15 Thread Bruce Momjian
On Wed, Aug 15, 2012 at 03:20:52PM +0100, Dave Page wrote: On Wed, Aug 15, 2012 at 3:17 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Aug 15, 2012 at 11:45:21AM +0100, Andrew Hastie wrote: As I understand it, I am allowed to redistribute Postgres so long as I include the copyright

[GENERAL] Check PostgreSQL status using MS-DOS bat file?

2012-08-15 Thread Loughrey, Hugh
Hi All, I want to write a MS-DOS command to check that the PostgreSQL database is up and running and able to accept data being pushed to it. From a bit of reading I've identified the pg_ctl status command, but can this be incorporated into a *.bat file and can the resulting status be recorded

Re: [GENERAL] Check PostgreSQL status using MS-DOS bat file?

2012-08-15 Thread Bruce Momjian
On Wed, Aug 15, 2012 at 09:52:17AM +, Loughrey, Hugh wrote: Hi All, I want to write a MS-DOS command to check that the PostgreSQL database is up and running and able to accept data being pushed to it. From a bit of reading I’ve identified the pg_ctl status command, but can this be

Re: [GENERAL] Check PostgreSQL status using MS-DOS bat file?

2012-08-15 Thread Dave Page
On Wed, Aug 15, 2012 at 4:04 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Aug 15, 2012 at 09:52:17AM +, Loughrey, Hugh wrote: Hi All, I want to write a MS-DOS command to check that the PostgreSQL database is up and running and able to accept data being pushed to it. From a bit of

[GENERAL] ProblemWithCharsOSX

2012-08-15 Thread Angel Zúñiga
Hi there, This is my first post in the list. I'm a PostgreSQL user in the linux world but at the office there is a Mac computer and I have a problem with postgres in it. The problem is when I use characters with tildes in spanish like in the follow word países. The next is ilustrates my problem:

Re: [GENERAL] Postgres 9.2 beta2 one-click installer on windows

2012-08-15 Thread Marc Watson
Original message: De : pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] De la part de Marc Watson Envoyé : June-11-12 8:36 AM À : Craig Ringer Cc : pgsql-general@postgresql.org; dp...@pgadmin.org; sachin.srivast...@enterprisedb.com Objet : Re: [GENERAL] Postgres

[GENERAL] success with postgresql on beaglebone

2012-08-15 Thread Tomas Hlavaty
Hi all, I managed to compile postgresql on BeagleBone. The only problem I encountered was insufficient memory for compiling grammars by bison (BeagleBone has 256MB RAM). As a workaround, I compiled the same sources on a bigger machine and copied the following files to BeagleBone:

Re: [GENERAL] corrupted statistics file pg_stat_tmp/pgstat.stat

2012-08-15 Thread Carl von Clausewitz
Hi, I've made the backups with pg_dump, compressed, and there wasn't any kind of error messages. I've made the restoration with pgAdmin (but it also uses pg_dump for restore). How can I check if the statistics are corrupt? regards, Csaba -Original Message- From: Alban Hertroys

Re: [GENERAL] corrupted statistics file pg_stat_tmp/pgstat.stat

2012-08-15 Thread Carl von Clausewitz
Hi, I've made the kernel changes that I wrote in my original e-mail, and I've created some additional logging (both csvlog and syslog), to gather more informations. /boot/loader.conf: kern.ipc.semmni=512 kern.ipc.semmns=1024 kern.ipc.semume=64 kern.ipc.semmnu=512 /etc/sysctl.cong:

[GENERAL] Set Returning Functions and joins

2012-08-15 Thread David Greco
I'm porting some code from an Oracle application and we have many uses of set returning function. In particular, we are using them in joins of the form: CREATE TABLE dave ( id integer, field1 integer ); INSERT INTO dave VALUES (1, 10); SELECT id, g.* FROM dave

Re: [GENERAL] Set Returning Functions and joins

2012-08-15 Thread David Johnston
On Aug 15, 2012, at 15:55, David Greco david_gr...@harte-hanks.com wrote: I’m porting some code from an Oracle application and we have many uses of set returning function. In particular, we are using them in joins of the form: CREATE TABLE dave ( id integer, field1 integer ); INSERT INTO

Re: [GENERAL] Set Returning Functions and joins

2012-08-15 Thread David Greco
Not sure how to write the CTE form of this. This query gives an error that dave is missing a from clause entry. WITH o as ( SELECT getRecord(1, dave.field1) ) SELECT id, o.* FROM dave ; Regarding the INNER JOIN, actually it appears the opposite

Re: [GENERAL] Interval to months

2012-08-15 Thread Aram Fingal
On Aug 7, 2012, at 11:55 AM, Steve Atkins wrote: Something like this? select 12 * extract(year from ?) + extract(month from ?) + extract(epoch from ? - date_trunc('month', ?)) / 2592000 Ugly, but likely closer to accurate. You can't get actually accurate, of course, as you don't know

Re: [GENERAL] Set Returning Functions and joins

2012-08-15 Thread David Johnston
Inline comments: On Aug 15, 2012, at 16:24, David Greco david_gr...@harte-hanks.com wrote: Not sure how to write the CTE form of this. This query gives an error that dave is missing a from clause entry. WITH o as ( SELECT getRecord(1, dave.field1) ) SELECT

Re: [GENERAL] Set Returning Functions and joins

2012-08-15 Thread David Greco
Awesome, thanks that works and is quite clear. The plan looks a bit funny on this. Any high-level synopsis on the performance of this? From: David Johnston [mailto:pol...@yahoo.com] Sent: Wednesday, August 15, 2012 4:57 PM To: David Greco Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL]