Re: [GENERAL] Class dependencies

2011-01-10 Thread Jasen Betts
On 2011-01-10, Joel Jacobson j...@gluefinance.com wrote:
 Hi,

 Is it safe to assume all objects of a given class can be
 dropped/created, provided all objects of a list of other classes have
 already been dropped/created?

 I'm looking at http://developer.postgresql.org/pgdocs/postgres/catalogs.html

 For each class, a list of References are defined, i.e. other classes
 the given class depend on.


 For instance, is it correct to assume constraints always can be
 dropped, i.e. no other class (nor other constraints) can depend on
 them?

As I unserstand it a references constraint requires a unique
constraint on the referred-to expressiom.

 table a (b,c) references d(e,f) 
 
 requires 
 
 unique (e,f) on table d
 
 
 
-- 
⚂⚃ 100% natural

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Class dependencies

2011-01-10 Thread Tom Lane
Jasen Betts ja...@xnet.co.nz writes:
 On 2011-01-10, Joel Jacobson j...@gluefinance.com wrote:
 Is it safe to assume all objects of a given class can be
 dropped/created, provided all objects of a list of other classes have
 already been dropped/created?

 For instance, is it correct to assume constraints always can be
 dropped, i.e. no other class (nor other constraints) can depend on
 them?

 As I unserstand it a references constraint requires a unique
 constraint on the referred-to expressiom.

Another problem for this type of scheme is circular dependencies.
There are for example circular dependencies between a type and its
I/O functions.  pg_dump contains some heuristics for resolving the
kinds of circular dependencies that are known to exist.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Realtime Query Dashboard Results

2011-01-10 Thread Vick Khera
On Fri, Jan 7, 2011 at 5:21 PM, Oliver Kohll - Mailing Lists 
oliver.li...@gtwm.co.uk wrote:

 Charts are updated once a day overnight, or cached whenever someone looks
 at them in the system underlying the dashboard, so they are at most one day
 old. A chart is also updated when a user clicks on it to drill down to the
 data.

 Of course what you decide depends on what the business use case is and what
 demands there are on the system. In my cases so far the slowest charts take
 1 or 2 seconds to generate by SQL so if necessary, each could be loaded in
 in real time over AJAX, though that hasn't been needed yet.


We found for our use case that customers don't like 1 day old reports.
 We've moved much of our dashboard statistics to trigger-based materialized
view, so whenever they reload, they get current numbers and the cost to
compute those numbers has already been amortized over the metric-gazillion
updates and inserts that comprise them. :)  Computing them on-the-fly is
just too time consuming and people don't like to wait, either.


Re: [GENERAL] Remote Connection

2011-01-10 Thread Bill Moran
In response to Bob Pawley rjpaw...@shaw.ca:

 Hi 
 
 I am attempting to connect from two local interfaces to a remote database.
 
 With one interface (SharpMap developed in C#) I have no problems.
 
 With the other interface (Delphi) I have no problem connecting in design mode.
 
 However when I compile Delphi it just hangs, until timeout, without opening.
 
 The postgresql log follows. Can someone please interpret  it for me?
 
 Bob
 
 2011-01-07 09:03:55 PSTERROR:  unrecognized configuration parameter 
 ssl_renegotiation_limit
 2011-01-07 09:03:55 PSTSTATEMENT:  SET ssl_renegotiation_limit=0
 2011-01-07 09:04:08 PSTLOG:  could not receive data from client: No 
 connection could be made because the target machine actively refused it.
 
 
 2011-01-07 09:04:08 PSTLOG:  unexpected EOF on client connection
 2011-01-07 09:22:58 PSTLOG:  could not receive data from client: No 
 connection could be made because the target machine actively refused it.
 
 
 2011-01-07 09:22:58 PSTLOG:  unexpected EOF on client connection

What version of PostgreSQL are you using and what version does Delphi
think you're using?  It seems to me that the Delphi IDE is connecting
differently than the app it compiles for you, and that said app is
trying to set a configuration parameter that doesn't exist, then aborting
when that fails.

Can't imagine what version you'd be using ... that option seems to have
been around since 8.0 at least.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Para participantes extranjeros en el Tercer PGDay Latinoamericano.

2011-01-10 Thread Ing. Yunior Mesa Reyes


IMPORTANTE!!!: 





Para participantes extranjeros en el Tercer PGDay Latinoamericano, a 
desarrollarse en la Universidad de las Ciencias Informáticas, La Habana, en 
febrero del 2011 . 




Estimados, luego de realizar todas las coordinaciones previas le relacionamos 
la información referente a su participación en nuestro evento: 




** El evento estará acargo de la gestión de las visas. 

** El pasaje deberá pagarlo el interesado. 

** El hospedaje y la alimentación durante los días de desarrollo del evento se 
garantizará por nuestra parte. 

**Necesitamos antes del miércoles 12 de enero del 2011 los siguientes datos 
para la confección de las visas de trabajo. 

DATOS A ENVIAR A NUESTROS CORREOS DE CONTACTO 

** Nombre completo. 

** # de pasaporte y/o cédula de indetidad. 

** Nacionalidad y país de residencia. 

** Fecha de entrada y salida del país. 
(ES NECESARIO QUE TODOS LOS INTERESADOS EN PARTICIPAR EN NUESTRO EVENTO SE 
INSCRIBAN EN LA PÁGINA DEL EVENTO COMO PARTICIPANTES) 

Vínculo directo: http://postgresql.uci.cu/node/1 




Saludos, 
Ing.Yunior Mesa Reyes 
Postgre-SQL Empresarial. DATEC 
Universidad de las Ciencias Informáticas.Ciudad de la Habana. Cuba. 
«Se tu el cambio que quieres ver en el mundo...El éxito es el fracaso 
superado por la perseverancia» 


[GENERAL] migrate hashname function from 8.1.x to 8.4

2011-01-10 Thread Nicolas Garfinkiel
Hi all,

 

I'm trying to upgrade our pgsql from 8.1 to 8.4, but our system's login uses
the hashname() function in order to get the proper password validation. Now
pgsql's 8.4 hashname function is not compatible with 8.1's function. Do you
have any ideas how I can reproduce 8.1 function in 8.4?

 

Thanks in advance for any help you can give me!

 

Cheers,

Nicolas.



Re: [GENERAL] Remote Connection

2011-01-10 Thread Bob Pawley

Hi Bill

Thanks for answering.

The problem turned out to be the excessive permissions required in Windows 7 
Firewall.


It appears to be working now.

Bob



-Original Message- 
From: Bill Moran

Sent: Monday, January 10, 2011 5:55 AM
To: Bob Pawley
Cc: Postgresql
Subject: Re: [GENERAL] Remote Connection

In response to Bob Pawley rjpaw...@shaw.ca:


Hi

I am attempting to connect from two local interfaces to a remote database.

With one interface (SharpMap developed in C#) I have no problems.

With the other interface (Delphi) I have no problem connecting in design 
mode.


However when I compile Delphi it just hangs, until timeout, without 
opening.


The postgresql log follows. Can someone please interpret  it for me?

Bob

2011-01-07 09:03:55 PSTERROR:  unrecognized configuration parameter 
ssl_renegotiation_limit

2011-01-07 09:03:55 PSTSTATEMENT:  SET ssl_renegotiation_limit=0
2011-01-07 09:04:08 PSTLOG:  could not receive data from client: No 
connection could be made because the target machine actively refused it.



2011-01-07 09:04:08 PSTLOG:  unexpected EOF on client connection
2011-01-07 09:22:58 PSTLOG:  could not receive data from client: No 
connection could be made because the target machine actively refused it.



2011-01-07 09:22:58 PSTLOG:  unexpected EOF on client connection


What version of PostgreSQL are you using and what version does Delphi
think you're using?  It seems to me that the Delphi IDE is connecting
differently than the app it compiles for you, and that said app is
trying to set a configuration parameter that doesn't exist, then aborting
when that fails.

Can't imagine what version you'd be using ... that option seems to have
been around since 8.0 at least.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general 



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unable to write inside TEMP environment variable path

2011-01-10 Thread ilpirata

PostgreSQL 8.3, 8.4 and 9.0 install on Windows seem to be failing for the
same reason (at least in my experience), but with different error messages
For 8.3 and 8.4 the error is An error occurred executing the Microsoft VC++
runtime installer whereas for 9.0 the error is Unable to write inside TEMP
environment variable path

In either case you need to enable Windows Scripting Host. If you don't know
how, the steps are here:
http://1stopit.blogspot.com/2011/01/postgresql-83-and-84-fails-to-install.html

-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Unable-to-write-inside-TEMP-environment-variable-path-tp3315027p3335175.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] How to add template tokens to default fulltextsearch parser

2011-01-10 Thread Ferdinand Smit
Hi,

We use replace strings in our text, but i do not want to match them. There is a 
predefined token
for XML/HTML, but i was wondering if there is an easy solution to add templates 
tokens like
%[something]% to the fulltextsearch parser.

Regards,
Ferdinand

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] migrate hashname function from 8.1.x to 8.4

2011-01-10 Thread Craig Ringer

On 01/11/2011 02:09 AM, Nicolas Garfinkiel wrote:

Hi all,

I’m trying to upgrade our pgsql from 8.1 to 8.4, but our system’s login
uses the hashname() function in order to get the proper password
validation. Now pgsql’s 8.4 hashname function is not compatible with
8.1’s function. Do you have any ideas how I can reproduce 8.1 function
in 8.4?


In what regard is it 'not compatible' ?

Please provide output from 8.1 and 8.4 for one of the samples you're 
using, along with an explanation of what's causing you problems.


--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Using aclitem[] at application layer

2011-01-10 Thread A.M.
Hello,

In an attempt to implement ACLs at the application layer (for resources stored 
outside of the database), I am evaluating using aclitem[] as a column type. All 
the functions I would need seem to be in place: aclcontains, aclexplode, 
aclinsert, aclitemeq, aclitemin, aclitemout, aclremove, but they are 
conspicuously missing from the documentation 
(http://www.mail-archive.com/pgsql-patches@postgresql.org/msg03400.html), so I 
wonder if there are any caveats or hurdles which would make me consider writing 
my own type.

From a cursory examination, it looks like the limitations would be:

1) roles must refer to postgresql roles (that's fine for my case)

2) permission options are hardcoded to arwdDxtXUCTc (not so great)

Are there any other problems I would encounter?

Cheers,
M


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Using aclitem[] at application layer

2011-01-10 Thread Tom Lane
A.M. age...@themactionfaction.com writes:
 In an attempt to implement ACLs at the application layer (for resources 
 stored outside of the database), I am evaluating using aclitem[] as a column 
 type. All the functions I would need seem to be in place: aclcontains, 
 aclexplode, aclinsert, aclitemeq, aclitemin, aclitemout, aclremove, but they 
 are conspicuously missing from the documentation 
 (http://www.mail-archive.com/pgsql-patches@postgresql.org/msg03400.html), so 
 I wonder if there are any caveats or hurdles which would make me consider 
 writing my own type.

Other than the fact that we'd feel free to change the behavior of any or
all of that with no notice?

aclitem is an internal type.  If you depend on its behavior, you'll have
only yourself to blame if your application fails in the future.

(I probably wouldn't bother making this point, if the immediately
preceding message hadn't been from someone whining because we changed
the behavior of hashname() ...)

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] migrate hashname function from 8.1.x to 8.4

2011-01-10 Thread nicolas . garfinkiel
Hi Craig,

Thank you for your reply!

well, what i mean is that hashname() function would return a different value
depending the pgsql version.

Consider this query (note that i'm using some extra implicit cast functions
here):

SELECT password FROM user WHERE password = hashname('AZALEA')
UNION ALL
SELECT hashname('AZALEA')::text;

in 8.1.x it returns:

-588380923
-588380923

whereas in 8.4 this query only returns:

-10546138

And tweaking the query to show the difference more clearly:

SELECT password FROM user WHERE login = 'SIST'
UNION ALL
SELECT hashname('AZALEA')::text;

this returns:

-588380923
-10546138

Am I missing something?

Just a side note: our goal with this upgrade is to improve our system's 
performance
and stability (which 8.1 is not) while not embarking in any kind of refactoring,
as plans are underway to develop a new system. what we are looking for is
just a quick fix, if there's such thing out there!

Any thoughts?

 Original Message --
Date: Tue, 11 Jan 2011 10:25:59 +1100
From: Craig Ringer cr...@postnewspapers.com.au
To: Nicolas Garfinkiel nicolas.garfink...@genesis-manlab.com.ar
CC: pgsql-general@postgresql.org
Subject: Re: [GENERAL] migrate hashname function from 8.1.x to 8.4


On 01/11/2011 02:09 AM, Nicolas Garfinkiel wrote:
 Hi all,

 I?m trying to upgrade our pgsql from 8.1 to 8.4, but our system?s login
 uses the hashname() function in order to get the proper password
 validation. Now pgsql?s 8.4 hashname function is not compatible with
 8.1?s function. Do you have any ideas how I can reproduce 8.1 function
 in 8.4?

In what regard is it 'not compatible' ?

Please provide output from 8.1 and 8.4 for one of the samples you're 
using, along with an explanation of what's causing you problems.

--
Craig Ringer

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] database is growing... 1GB per day basis

2011-01-10 Thread Karayappalli, Raghunath (Raghu)
Hello, my name is raghu. I work for Avaya. We uses postgres as database
in our application. Our application is a jboss based enterprise
application, that does some updates operations based on requests from
client. We use entities and hibernate for data access within our
application.

 

I have couple of questions, as listed:

 

1.   We observe that database is growing very fast - many sets of
files with size more than 1 GB. Please see some sample snippets of the
file lists: 

 

This does not happen regular basis. However, we have a few instances of
this incidence, and pretty much blocked on this. What could be causing
this? What can be done to diagnose/ resolve this issue? We are running
out of disk space in our box quite quickly due to this issue. Any
thoughts please?

 

2.   One of our table has columns for LOB. All other tables are of
primary types (there are a few sting/ varchar types as well). I
understand that postgres maintains large data objects in pg_largeobject.
Is there a way to find the data within those table? How can I find out
the corresponding table information or row corresponding to this large
data maintained/ managed in pg_largeobject? I also hear about
pg_toast... wot is the relation between pg_toast and pg_largeobject?

 

I would appreciate your early response and help very much!

thanks/ regards,

raghu