Tuesday, May 27, 2008

Re: [GENERAL] New MS patent: sounds like PG db rules



Dave Page wrote:
On Tue, May 27, 2008 at 2:59 PM, Justin <justin@emproshunts.com> wrote:   
Dave Page wrote:  Having been involved in lawsuits, i wish it was a laughing manner.  Thinking a patent is unenforceable is dangerous thinking.  MS could target the leaders of the community along with the corporate sponsors.     
 Well as one of those people, working for one of those companies, I'm not going to lose any sleep over it. The fact is that Microsoft do have vaguely sane lawyers and I have little doubt they would do some elementary research before trying to claim that  our 10 year old (probably much older in fact, as I believe there was a rules system in the code inherited from Berkley) feature infringes their 2 year old patent. Whilst it is true it could get expensive if they did try, I don't believe they will as they would ultimately end up with egg on their faces and would likely cost them real money and be the cause of significant bad press.    
I'm not losing any sleep over it either and you may be very right.  But don't bet on the side intelligent/logical thinking to coming out of a lawyer who's on retainer to a big corporation like MS.  Postgresql is luck in the fact US patent laws are still based on the idea first to invent not first to patent which several countries have gone to.


Re: [HACKERS] WITH RECURSIVE patches V0.1 TODO items

> > BTW, does this setting requrie a local GIT server be installed? If so,
> > that might be a problem for me since I don't have resource for that.
>
> Selena was saying that there was a community git server we could use for this.
> I didn't catch who to speak to (Josh?) to set up an account.
>
> And would we all need accounts if we want to push back changes?

In my understanding, yes.

And I think even if we would have accounts on the community git
server, we cannot push (commit) to the repository. Probably all we can
do is, get the diff between someone's pushed data and the origin.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

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

Re: [HACKERS] WITH RECURSIVE patches V0.1 TODO items

On Tue, May 27, 2008 at 10:30:44AM -0400, Gregory Stark wrote:
> "Tatsuo Ishii" <ishii@postgresql.org> writes:
>
> > If contributors are comfortable, let's go with GIT.
> >
> > BTW, does this setting requrie a local GIT server be installed? If
> > so, that might be a problem for me since I don't have resource for
> > that.
>
> Selena was saying that there was a community git server we could use
> for this. I didn't catch who to speak to (Josh?) to set up an
> account.

Peter Eisentraut, as I recall.

> And would we all need accounts if we want to push back changes?

Yep.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

Re: [pgsql-es-ayuda] almacenar en bd o no?

Crispin T. escribió:
> hola tengo un problema resulta que tengo un sistema en java con bd
> postgres 8.2 y todo me va de maravilla pero empieza a preocuparme un
> asunto, resulta que por performance y por no cargar demasiado la bd no
> almacene las fotos de unos inmuebles en al bd pero me resulta
> complicado al momento de hacer backups ya que las imagenes las agarro
> como archivos y pues copiar varios archivos y restaurar varios
> archivos ademas de los datos de la bd se me hace mucho trabajo y mucho
> tiempo pero no me anime a almacenarlos en un tipo oid porque por cada
> inmueble se manejan alrededor de 30 fotos png de 600x500
> aproximadamente, ademas que antes el sistema hera monolitoco (corria
> en una unica pc) pero ahora el negocio crecio y se necesita que corra
> en una lan y bueno nose como hacer que una aplicación java cargue
> archivos que estan en otra pc (no veo seguro compartir la carpeta de
> los archivos) y me estoy animando a guardar las imagenes en la bd
>
> dados los casos ¿que harian ustedes en este caso?
> en el caso de sugerirme que guarde las imagenes en la bd ¿hay forma de
> sacar backup's de solo algunas tablas?
> en caso de no guardar en la bd las imagenes ¿que solucion me sugieren
> para cargar imagenes desde otra pc(sin compartir la carpeta)?
>
> gracias.
>
> Crispin.
Hola!
Para asegurarme de mantener la integridad, yo la metería en una tabla
que tenga solo un campo ID del tipo serial, un campo ID_Inmueble para
relacionarla y el campo imagen.
Entonces, la consulta inicial se haría sobre los datos principales
(dirección, precio, zona, etc) y, si queremos, hacemos la consulta (mas
lenta) de las imágenes.
Opcionalmente, en la tabla principal pondría una imagen muy pequeña como
referencia visual pero las demás 30 fotos sobre la otra tabla...
Creo que es un esquema bastante eficiente (en teoría) y evitas las
referencias que van a ser un dolor de cabeza no solo para las copias,
sino para cualquier mantenimiento que quieras dar a tu sistema...

--
========================
WOJCIK, MARIO A.
========================
Leandro N Alem -Misiones
------------------------
A R G E N T I N A
------------------------
mariowojcik@yahoo.com.ar


--
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?

http://archives.postgresql.org/pgsql-es-ayuda

Re: [HACKERS] WITH RECURSIVE patches V0.1 TODO items

"Tatsuo Ishii" <ishii@postgresql.org> writes:

> If contributors are comfortable, let's go with GIT.
>
> BTW, does this setting requrie a local GIT server be installed? If so,
> that might be a problem for me since I don't have resource for that.

Selena was saying that there was a community git server we could use for this.
I didn't catch who to speak to (Josh?) to set up an account.

And would we all need accounts if we want to push back changes?

--
Gregory Stark
EnterpriseDB

http://www.enterprisedb.com

Ask me about EnterpriseDB's PostGIS support!

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

[SQL] Enumerated (enum) types

Enumerated (enum) types are data types that are comprised of a static, predefined set of values with a specific order. They are equivalent to the enum types in a number of programming languages. An example of an enum type might be the days of the week, or a set of status values for a piece of data.

Declaration of Enumerated Types

Enum types are created using the CREATE TYPE command, for example:

CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');

Once created, the enum type can be used in table and function definitions much like any other type:

Example. Basic Enum Usage

CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');
CREATE TABLE person (
name text,
current_mood mood
);
INSERT INTO person VALUES ('Moe', 'happy');
SELECT * FROM person WHERE current_mood = 'happy';
name | current_mood
------+--------------
Moe | happy
(1 row)

Ordering

The ordering of the values in an enum type is the order in which the values were listed when the type was declared. All standard comparison operators and related aggregate functions are supported for enums. For example:

Example. Enum Ordering

INSERT INTO person VALUES ('Larry', 'sad');
INSERT INTO person VALUES ('Curly', 'ok');
SELECT * FROM person WHERE current_mood > 'sad';
name | current_mood
-------+--------------
Moe | happy
Curly | ok
(2 rows)
SELECT * FROM person WHERE current_mood > 'sad' ORDER BY current_mood;
name | current_mood
-------+--------------
Curly | ok
Moe | happy
(2 rows)
SELECT name FROM person
WHERE current_mood = (SELECT MIN(current_mood) FROM person);
name
-------
Larry
(1 row)

Type Safety

Enumerated types are completely separate data types and may not be compared with each other.

Example. Lack of Casting

CREATE TYPE happiness AS ENUM ('happy', 'very happy', 'ecstatic');
CREATE TABLE holidays (
num_weeks int,
happiness happiness
);
INSERT INTO holidays(num_weeks,happiness) VALUES (4, 'happy');
INSERT INTO holidays(num_weeks,happiness) VALUES (6, 'very happy');
INSERT INTO holidays(num_weeks,happiness) VALUES (8, 'ecstatic');
INSERT INTO holidays(num_weeks,happiness) VALUES (2, 'sad');
ERROR: invalid input value for enum happiness: "sad"
SELECT person.name, holidays.num_weeks FROM person, holidays
WHERE person.current_mood = holidays.happiness;
ERROR: operator does not exist: mood = happiness

If you really need to do something like that, you can either write a custom operator or add explicit casts to your query:

Example. Comparing Different Enums by Casting to Text

SELECT person.name, holidays.num_weeks FROM person, holidays
WHERE person.current_mood::text = holidays.happiness::text;
name | num_weeks
------+-----------
Moe | 4
(1 row)

Implementation Details

An enum value occupies four bytes on disk. The length of an enum value's textual label is limited by the NAMEDATALEN setting compiled into PostgreSQL; in standard builds this means at most 63 bytes.

Enum labels are case sensitive, so 'happy' is not the same as 'HAPPY'. Spaces in the labels are significant, too.

An Alternative Way To Do The Same

Instead of using an enum type we can set up a CHECK CONSTRAINT - this tells postgresql to make sure that the value we are entering is valid.

CREATE TABLE person (
personid int not null primary key,
favourite_colour varchar(255) NOT NULL,
CHECK (favourite_colour IN ('red', 'blue', 'yellow', 'purple'))
);
INSERT INTO person(personid, favourite_colour) VALUES (1, 'red');
INSERT 0 1

Now for something not in the list:

INSERT INTO person(personid, favourite_colour) VALUES (2, 'green');
ERROR: new row for relation "person" violates check constraint "person_favourite_colour_check"

--
Michael Lourant
"All you need is love"

Re: [GENERAL] Annoying messages when copy sql code to psql terminal

"A B" <gentosaker@gmail.com> writes:
> Whenever I use copy-paste to run code in a terminal window that is
> running psql, and the code contains a row like

> IF FOUND THEN

> then I get the words

> ABORT CHECKPOINT COMMIT DECLARE EXECUTE
> ...

Either avoid copying/pasting tabs, or turn off readline
(-n option to psql, I think, but check the manual).

There's probably a way to turn off tab-completion without
disabling readline altogether, but I don't know how offhand.

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

[ADMIN] Postgres will not shutdown?

Hello,

I've had a number of problems with Postgres in passed few days.
First ,I had an issue with a corrupt index. One solution required
that I stop and start postgres so it would read the postgresql.conf
file. It looked like it was stopping but it wasn't. I finally had
to kill the processes. The problem was that postgres didn't thing
the pg_ctl was running. Then I realized I had not set the parameter
that I needed to set quite high enough so I had to stop and restart
it again. It didn't stop again but this time I got the following
message:

# /etc/init.d/cswpostgres stop
Stopping PostgreSQL database...
waiting for server to shut
down...............................................................
failed
pg_ctl: server does not shut down

Can anyone help unravel this?

Thanks in advance,

Carol

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

Re: [BUGS] BUG #4196: Backend crash possible with psql

"Daniel Mihowski" <dmigowski@ikoffice.de> writes:
> Bug reference: 4196
> Logged by: Daniel Mihowski
> Email address: dmigowski@ikoffice.de
> PostgreSQL version: 8.3.1
> Operating system: Windows XP
> Description: Backend crash possible with psql
> Details:

> Hello, dear developers. When accessing the local postgresql server with
> PGAdmin, it closes abnormally. This is my psql window:

This is now believed fixed, and will be in 8.3.2:
http://archives.postgresql.org/pgsql-committers/2008-05/msg00349.php

Thanks for your help in isolating the cause.

regards, tom lane

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

Re: [PATCHES] LOCK_DEBUG documentation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


Tom Lane replied:
>> Documentation patch by Kevin L. McBride explaining LOCK_DEBUG options
>> in detail.

> Should this stuff really go into the SGML documentation, when these
> options will certainly never be enabled anywhere except in developers'
> private builds? A few lines of comments in pg_config_manual.h seems
> a more appropriate solution.

Call me a traditionalist, but I like all the documentation in one place,
even if some of it it seldom used. For the record, these options have
been enabled by myself and others in production systems for debugging
purposes, and the lack of detail in that section while doing so led to
the patch. The docs also has the advantage of being more available,
searchable, and found via the web.

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200805271012
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkg8F04ACgkQvJuQZxSWSsjNiQCffXM6m8N6DGW9fP3LmVvIGMDo
Y30AoJ0fD2G0n1j5g1HdOukFWppd8jgu
=6tFr
-----END PGP SIGNATURE-----

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

Re: [GENERAL] New MS patent: sounds like PG db rules

On Tue, May 27, 2008 at 2:59 PM, Justin <justin@emproshunts.com> wrote:
> Dave Page wrote:
>
> Having been involved in lawsuits, i wish it was a laughing manner. Thinking
> a patent is unenforceable is dangerous thinking. MS could target the
> leaders of the community along with the corporate sponsors.

Well as one of those people, working for one of those companies, I'm
not going to lose any sleep over it. The fact is that Microsoft do
have vaguely sane lawyers and I have little doubt they would do some
elementary research before trying to claim that our 10 year old
(probably much older in fact, as I believe there was a rules system in
the code inherited from Berkley) feature infringes their 2 year old
patent. Whilst it is true it could get expensive if they did try, I
don't believe they will as they would ultimately end up with egg on
their faces and would likely cost them real money and be the cause of
significant bad press.


--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

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

Re: [pgeu-general] Public announcement

On Tue, May 27, 2008 at 09:49:58AM +0200, damien clochard wrote:
> On april 26th, 2008 the French Official Journal published the public
> announcement of PostgreSQL Europe. This was the last step of the
> legal/adminstrative work to create PostgreSQL Europe association.
>
> I('m happy the announce that all legal stuffs are done. The PostgreSQL Europe
> association is now fully and officialy founded.

Yay!

> You can check the public announcement on our brand new wiki :
>
> http://wiki.postgresql.eu/wiki/Image:Postgresql_europe_jo.pdf

Brrr, pdf :)

> Next step is now to search for a bank and open an account for the association.
> If any of you has some experience on managing a bank account for an European
> non-profit , please share with us :-)

I don't have much experience regarding that, it just seems that it would
be wise to have the account in the same country as that of incorporation
(so that would be France, no?).

Of course, the bank must be using PostgreSQL :)

A small tip: make sure that the treasurer is not the only person who can
access the account, that might lead to some inconvenient situations.

Best,

Koen

--
K.F.J. Martens, Sonologic, http://www.sonologic.nl/
Networking, hosting, embedded systems, unix, artificial intelligence.
Public PGP key: http://www.metro.cx/pubkey-gmc.asc
Wondering about the funny attachment your mail program
can't read? Visit http://www.openpgp.org/

Re: [HACKERS] ERRORDATA_STACK_SIZE panic crashes on Windows

Magnus Hagander <magnus@hagander.net> writes:
> Tom Lane wrote:
>> Fortunately there is a way to tell gettext what to do, and accordingly
>> I propose the attached patch. I am not in a position to test it
>> however. Would somebody replicate the failure and confirm this
>> fixes it?

> After some work, I've managed to reproduce it in my test environment for
> Swedish, and I can confirm that the patch fixes the issue.

Thanks.

> Just for kicks, I've applied this patch so you, so you get to be on the
> receiving side of that ;-)

No objection here.

I noticed that you applied the patch to 8.2 as well. It should be
harmless enough, but we weren't having the problem in 8.2 were we?
Or am I just confused?

regards, tom lane

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

Re: [HACKERS] WITH RECURSIVE patches V0.1 TODO items

> "Aidan Van Dyk" <aidan@highrise.ca> writes:
>
> > Something like this is easily done in GIT as well:
> > git fetch ## Fetch any new commits done in the origin to the local repo
> > git merge origin/master ## or any other branch you want..
> > git push ## publish your work for others to fetch
>
>
> I would very much like to start using GIT to do this. The main difference is
> that when a contributor wants to merge back the changes from upstream GIT
> knows which changes upstream correspond to the commits the contributor made.
> So it can avoid a lot of conflicts when the upstream version has subsequent
> changes to the same areas.
>
> The end result is also a lot cleaner. Instead of a lot of commit messages that
> just say "applying patch from Foo" all the original separate commits can be
> preserved.

I don't stick to CVS at all. If contributors are comfortable, let's go
with GIT.

BTW, does this setting requrie a local GIT server be installed? If so,
that might be a problem for me since I don't have resource for that.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

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

[GENERAL] PL/R download

Is the PL/R download still available?  The link is dead from the Postgres site and also at www.joeconway.com.  Is there another location available to download the installer?
 
Thanks,
 
Cindy

Re: [pgsql-es-ayuda] Error fatal en base de datos

El mar, 27-05-2008 a las 17:19 +0200, Javier Felipe Villa escribió:
> Hola a todos,

Hola,

> Tengo instalada una base de datos postgres 8.1 en un servidor con debian.
> Desde hace una semana más o menos al intentar arrancar las aplicaciones que
> conectan con la base de datos me aparece este error en el log del sistema:

Ejecuta

df -h

y envia la salida a la lista.

Saludos,

-- Mauro

> 2008-05-26 12:19:40 CEST PANIC: no se pudo escribir archivo de registro 3,
> segmento 87 en la posición 12623872, largo 16384: No queda espacio en el
> dispositivo
> 2008-05-26 12:19:40 CEST SENTENCIA: update configuracio set
> user_home='/root';
> 2008-05-26 12:19:40 CEST LOG: proceso de servidor (PID 10896) fue terminado
> por una señal 6
> 2008-05-26 12:19:40 CEST LOG: terminando todos los otros procesos de
> servidor activos
> 2008-05-26 12:19:40 CEST LOG: todos los procesos fueron terminados;
> reinicializando
> 2008-05-26 12:19:40 CEST LOG: el sistema de bases de datos fue interrumpido
> en 2008-05-26 12:18:52 CEST
> 2008-05-26 12:19:40 CEST LOG: el registro de checkpoint está en 3/57C0BAB4
> 2008-05-26 12:19:40 CEST LOG: registro de redo en 3/57C0BAB4; registro de
> undo en 0/0; apagado TRUE
> 2008-05-26 12:19:40 CEST LOG: siguiente ID de transacción: 51807360;
> siguiente OID: 17712
> 2008-05-26 12:19:40 CEST LOG: siguiente MultiXactId: 29; siguiente
> MultiXactOffset: 57
> 2008-05-26 12:19:40 CEST LOG: el sistema de bases de datos no fue apagado
> apropiadamente; se está efectuando la recuperación automática
> 2008-05-26 12:19:47 CEST LOG: no se pudo leer el archivo de registro 3,
> segmento 87, posición 12632064: Error de entrada/salida
> 2008-05-26 12:19:47 CEST LOG: no se requiere redo
> 2008-05-26 12:19:47 CEST LOG: el sistema de bases de datos está listo
> 2008-05-26 12:19:47 CEST LOG: el límite para el reciclaje de ID de
> transacciones es 2147484146, limitado por base de datos «postgres»
>
>
> El disco físico no está lleno porque hay más de un 75% de espacio libre y
> entiendo que no es un problema de llenado de los tablespaces de la base de
> datos no? Además todo intento de conectar a la base de datos a través de
> algún cliente de administración termina con error de I/O.
>
> Espero que me podáis echar una mano para aclararme un poco.
>
> Muchas gracias.
>
> --
> TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda

--
TIP 8: explain analyze es tu amigo

[GENERAL] active queries

Hi!

Our company has a long last problem by using libpq in multi-threaded
programs. The libpq usually closes the programs without any error
message or rarely giving the 'Invalid frontend message type 87' error.
When asked you about this error message you gave the reply below. In the
reply there is only one thing which is not clear... What does an
'active' query mean? Or how can we detect active queries on a PGconn?
We have tried PQcancel() and PQreset() functions too, but they didn't
help solving the problem.
Our programs retrieve every result (PQgetResult() and PQclear()
functions) that is pending on the server before reusing a PGconn.

Thank you in advance
Attila Miklosi

P.S.: this is a copy of your reply to 'invalid frontend message type 87'
error message

>"Invalid frontend message" means the server got a message with an
>unexpected first byte, which usually means the server and libpq got
>out of sync about where the message boundaries are. It's been quite
>a long time since we've seen an actual bug of that sort, though.
>The cases that I've heard of recently involve multiple threads in an
>application trying to use the same PGconn without any interlocking.
>You can't have multiple queries active on a single connection, but
>libpq itself doesn't contain any locking to prevent multiple threads
>from trying to use the PGconn at once.
>
>If you're getting this with a single-threaded client, please submit
>a test case to pgsql-bugs.
>
> 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

Monday, May 26, 2008

[GENERAL] Open Source CRM - Options?

Hi,

I am working with a client (a media company) that is re-developing its
web publishing system.

I've already shortlisted potential CMS systems (including several open-
source options, such as Drupal and Joomla).

The brief requires a site that has sophisticated profiling capability,
particularly with respect to the ability to 'personalise' the site;
that is, recognise certain user preferences, and (where possible)
target content to individual user interests etc.

I am looking for examples of open-source CRM (or similar platforms)
used for this kind of profiling/personalisation, and would appreciate
any pointers readers of this newsgroup might be able to offer.

Please reply directly to me at mark.neely@gmail.com

Regards,

Mark

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

Re: [HACKERS] Read Uncommitted

Hannu Krosing <hannu@krosing.net> writes:
> On Mon, 2008-05-26 at 16:55 +0200, Peter Eisentraut wrote:
>> If the data in a table never changes, why would VACUUM or HOT need to touch
>> it? The use case isn't clear to me.

> I guess the use-case is about a long read-write transaction doing
> read-only access to an update-only table and thus blocking vacuum on
> other tables.

... in which case the proposed kluge would result in unstable,
unpredictable answers, so there is still no plausible use-case.

regards, tom lane

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

Re: [HACKERS] ERRORDATA_STACK_SIZE panic crashes on Windows

I wrote:
> Have any Windows-using hackers tried to look into the reports of
> $SUBJECT on 8.3? We have two fresh reports:
> http://archives.postgresql.org/pgsql-bugs/2008-05/msg00106.php
> http://archives.postgresql.org/pgsql-bugs/2008-05/msg00109.php
> and this isn't the first time we've heard of it.

And now we have another report:
http://archives.postgresql.org/pgsql-bugs/2008-05/msg00159.php
for which the complainant was kind enough to supply the requested
details, and they seem to confirm my previous theory:

> What I'm currently thinking is that maybe gettext() isn't on the
> same page as us concerning what encoding it's supposed to produce
> its output in.

After digging around in the source code a bit, the reason why (and why
it's only seen on Windows) became blindingly obvious :-(. On Windows
we specifically allow UTF-8 database encoding to be selected regardless
of the system locale settings. This is (AFAIK) safe for the basic
locale-dependent stuff we do, because that all goes through special
UTF-16-using code paths. But it leaves gettext utterly misinformed
about what it is supposed to do.

Fortunately there is a way to tell gettext what to do, and accordingly
I propose the attached patch. I am not in a position to test it
however. Would somebody replicate the failure and confirm this
fixes it?

regards, tom lane

Re: [pgsql-es-ayuda] Configuración de Postgres en un Server de Hosting

¿ Es Hosting compartido o un VPS ?

Existe mucha diferencia entre uno y otro, yo tuve una situación
similar y resolví todos mis problemas con un VPS ya que tenia el
control del server. Puedes instalar la versión que necesites y tienes
el control total de tus bd´s.

Saludos.

Ricardo Granados


2008/5/25 Luis Alberto Vargas Miranda <luis.vargasm@hotmail.com>:
> Estimados
>
> Actualmente estoy en un Proyecto para un Cliente, el cual no tiene un
> Servidor, y debido a que la aplicación que desarrollaremos está en PHP, este
> Cliente optó por alquilar un Hosting. Este Hosting es el tipico que se
> contrata para webs. Bueno el tema despues de instalar Postgres, deseo
> conectarme desde PgAdmin y me da el siguiente error que aun no he podido
> solucionar:
>
> Access to database denied
> The server doesn't grant access to the database: the server reports
> FATAL: no pg_hba.conf entry for host "200.37.126.89", user "ats_postgres",
> database "postgres", SSL off
> To access a database on a PostgreSQL server, you first have to grant primary
> access to the server for your client (Host Based Authentication). PostgreSQL
> will check the pg_hba.conf file if a pattern that matches your client
> address / username / database is present and enabled before any SQL GRANT
> access control lists are evaluated.
> The initial settings in pg_hba.conf are quite restrictive, in order to avoid
> unwanted security holes caused by unreviewed but mandatory system settings.
> You'll probably want to add something like
> host all all 192.168.0.0/24 md5
> This example grants MD5 encrypted password access to all databases to all
> users on the private network 192.168.0.0/24.
> You can use the pg_hba.conf editor that is built into pgAdmin III to edit
> the pg_hba.conf configuration file. After changing pg_hba.conf, you need to
> trigger a server configuration reload using pg_ctl or by stopping and
> restarting the server process.
>
> Gracias de antemano! Saludos!
>
> Atentamente
> Luis Alberto Vargas Miranda
> ----------------------------------------------
> luis.vargasm@hotmail.com
> (51) (54) - 9690757 (Movistar)
> (51) (54) - 9122312 (Claro)
> (51) (1) - 94001131 (Nextel)
> (51*400*1131) (Nextel Conexión Directa)
> ----------------------------------------------
>
> ________________________________
> Discover the new Windows Vista Learn more!

--
Ing. Ricardo Granados Tiznado
Solar Grupo Industrial, S.A. de C.V.
Mazatlan, Sinaloa, México.
www,solargi.net
--
TIP 5: ¿Has leído nuestro extenso FAQ?

http://www.postgresql.org/docs/faqs.FAQ.html

Re: [pgsql-es-ayuda] Necesito orientacion en servidor postgresql en servidor DELL

El día 26 de mayo de 2008 12:19, Espartano <espartano.mail@gmail.com> escribió:
> 2008/5/26 Edwin Salguero <edwin16@gmail.com>:
>> Voy a provar con la configuracion que me pasaron de postgresql.conf.. y les
>> dare noticias mas tarde.. espero que funcione..
>>
>> Ahora respecto a porque bloqueo.. las tablas.. es un tema bastante extenso
>> que no puedo solucionar solo con un llave...
>>
>> Si alguien tiene algun documento o alguna referencia de control de
>> concurrencia les agradezco.. Gracias.. de antemano..

pero no se supone que por eso ocupamos un gestor de base de datos,
para que el se preocupe del control de concurrencia ????
me intriga tu problema, porque todo me indica que el problema se debe
a una mala implementación y nada mas.
--
TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda

Re: [PERFORM] Symbolic Links to Tablespaces

Once I have assigned tables and indexes to a particular tablespace that
points to a particular location on disk is there a simple way to move
the files to a new location?

Example:
Table xyz is using tablespace xyz_tbl which is located at
/somedir/xyz_tbl on the disk. If I want to move it to a new disk
located at /someotherdir/xyz_tbl/ how can I do that easily?

Do I have to backup all of the tables using the tablespace xyz_tbl, drop
the tables, drop the tablespace, recreate the tablespace with a
different disk location and then finally reload the tables and data? Or
is there an easier way? Is there a move tablespace disk location
command?

Thanks,

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
217.333.0382
http://webservices.uiuc.edu
My e-mail address has changed to lance@illinois.edu

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, May 26, 2008 10:09 AM
To: Campbell, Lance
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Symbolic Links to Tablespaces

"Campbell, Lance" <lance@illinois.edu> writes:
> I have started to define tablespaces on different disks. Is there any
> performance issues related to referencing tablespaces on different
disks
> with symbolic links? By using symbolic links to tablespaces can I
then
> stop the database and move a particular tablespace from one location
to
> another without causing a problem? This would seem to give a lot of
> flexibility to the location of tablespaces.

A tablespace already is a symbolic link --- read
http://www.postgresql.org/docs/8.2/static/storage.html

Putting another one into the path will eat cycles and doesn't seem like
it could buy anything.

regards, tom lane

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

Re: [BUGS] BUG #4177: Dump and restore from Slonified 8.1.11 causes a segfault

On Sat, May 17, 2008 at 08:40:16AM +0000, Githogori Nyangara-Murage wrote:
>
> Either a pg_dumpall or pg_dump of a Slonified database on PostgreSQL 8.1.11
> causes a segfault

When you say "slonified", do you mean "dumped from [some] replica [of
at least one table]" or "dumped from origin"? If its the former, it
will never work.

A

--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/

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

Re: [HACKERS] Read Uncommitted

On Mon, 2008-05-26 at 16:55 +0200, Peter Eisentraut wrote:
> Am Montag, 26. Mai 2008 schrieb Simon Riggs:
> > At the moment, a long running SQL Statement can prevent xmin moving
> > forward, which can result in VACUUM and HOT not being able to remove row
> > versions effectively. My proposal is that a Read Uncommitted transaction
> > would not prevent row removal, which then offers no guarantee that the
> > "correct" answer would be returned. Which is *exactly* what that
> > transaction isolation level was designed for.
> >
> > In many cases, an application designer may be able to tell that a
> > particular query will always return the correct answer. For example, we
> > may query against data which is known not to change, even though other
> > data in the same database cluster may be subject to frequent change.
> > e.g. queries against large insert-only tables.
>
> If the data in a table never changes, why would VACUUM or HOT need to touch
> it? The use case isn't clear to me.

I guess the use-case is about a long read-write transaction doing
read-only access to an update-only table and thus blocking vacuum on
other tables.

--------------
Hannu

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

Re: [GENERAL] function cache effect still happening?

On Mon, May 26, 2008 at 9:49 PM, Fernando Moreno <azazel.7@gmail.com> wrote:
Hi everyone, a few months ago I was still using Postgresql 8.2 and had the problem described here: http://www.postgresql.org/docs/faqs.FAQ.html#item4.19 , that time I solved it using EXECUTE for all sentences accessing temporary tables. Right now I'm using 8.3,  the scenario is a little different but the problem is the same. I have many schemas with the same structure (tables, views and one trigger), and two functions in the public schema which insert and delete data from them, the INSERT and DELETE sentences are hard-coded. Every schema represents a store from the same company.

The idea is that just by changing the search_path value to something like "schema1,public", it's possible to execute the functions and to process data for any schema (one at a time). But the problem is here: through the client app, a user invokes one of these functions on a given schema (schema1), then requests a "store change", actually setting the search_path to use another schema (schema2) and again, executes any of the functions that access the schema tables, BUT the function seems to be still linked to the first schema, so new records are added to the wrong schema and delete operations don't find the right record. EXECUTE will save the day again, but I'd like to know if this is considered a known bug even when it was apparently fixed.


I don't think it can be categorized as a bug! This is happening because all the DML queries are prepared upon first execution, and the plan stores the unique identifiers (OIDs) of the objects and not the names of the objects. Upon changing search_path, the function cache is not flushed, and hence the query plans are still operating on the same objects.

I see two possibilities,

i) Flush function cache (only the query plans, if possible) when changing search_path.
ii) Give users the ability to flush the function cache at will.

I don't think (ii) will have much backing, but (i) does make some sense.

Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device

Re: [pgsql-es-ayuda] tablas grandes

Hola Alejandro,

Podes mandar el explain de ambas consultas y la salida de "show all;" ?

Saludos,
gb.-

On Mon, May 26, 2008 at 9:30 AM, alejandrob <alejandrob@ospsip.org.ar> wrote:
> Amigos y colegas usuarios de postgres
>
> Se me presenta un problema y necesito de su ayuda, les cuento mi situacion :
>
> Tengo tablas de mas de 15 millones de registros, si realizo una consulta por
> un campo que su repetion dentro de la tabla es de 500 veces aprox, la
> respuesta es buena, ahora si consulto por otro valor donde la repeticion es
> 5000/10000 veces ( registros ) , la consulta se demora 10 a 15 minutos,
> tengo postgres 8.1 sobre windows 2003, en un doble xeon de 2. mhz intel con
> 2 gb de ram y discos scsi en raid 5, tiene indices creados por los campos
> que se incluyen en la clausula where, y estuve tocando un poco los archivo
> de configuracion y mejoro un poco pero no mucho.
>
> Por lo que lei me convendria migrar al postgres 8.3 ya que veo que triplica
> su velocidad de respuesta y ya que estamos voy a trasladar el motor a un
> servidor HP G5 quad core 4gb ram con debian.
>
> Ustedes creen que esto que tengo planeado hacer realmente va mejorar la
> situacion, les pregunto esto ya que requiere de una inversion, y ademas
> estas tablas van a seguir creciendo.
>
> Tambien pense en particionar las tablas pero tengo miedo que esto me traiga
> problemas de perdida de datos. ya que podria particionar por una fecha de
> movimientos. y la base se encargaria sola de buscar donde corresponda.
>
> Por ultimo, para manejos de tablas grandes, postgres va o me tendre que
> pasar a oracle u otra base de pago. ?
>
> Ya se que son muchas preguntas, acepto todas las sugerencias, son muy
> bienvenidas, me van a servir de mucho para tomar una desicion.
>
> Muchas gracias
>
> Alejandro
>
>
> --
> TIP 5: ¿Has leído nuestro extenso FAQ?
>

http://www.postgresql.org/docs/faqs.FAQ.html
>

--
Guido Barosio
-----------------------
http://www.globant.com
guido.barosio@globant.com
--
TIP 10: no uses HTML en tu pregunta, seguro que quien responda no podrá leerlo

Re: [pgsql-es-ayuda] recomendacion para BD grande

begin:vcard
fn;quoted-printable:Jenaro Centeno G=C3=B3mez
n;quoted-printable:Centeno G=C3=B3mez;Jenaro
org;quoted-printable:Alimentos La Concordia, S.A. de C.V.;Tecnolog=C3=ADas de la Informaci=C3=B3n
adr;quoted-printable:Col. La Marimba;;Loma de Prados No. 1332;Lagos de Moreno;JAL;47470;M=C3=A9xico
email;internet:jcenteno@aldia.com.mx
title:Coordinador de TI
tel;work:+52 474 741 9200
tel;fax:+52 474 741 9200
x-mozilla-html:FALSE
url:http://www.aldia.com.mx

version:2.1
end:vcard

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIOujr+nACvgizD48RApSoAJsEPRTrkNcKkTU0ol4K77+HHmd1PgCgzpfJ
Ah4CwDEaGAI3BUl7cmpvTVU=
=VpVT
-----END PGP SIGNATURE-----
Mira,

Para cualquier diseño siempre es buena idea seguir las 5 reglas normales o también conocido como Normalización de Bases de Datos, checa esto:

http://es.wikipedia.org/wiki/Clave_for%C3%A1nea

Quizá no las cumplas todas pero al menos con tres de estas cumplidas debes tener un buen diseño.

Saludos.

P.D.: No sería bueno tener una tabla para tipos de documentos (tipodoc) y especificar un poco más la de datos?

Gabriel Ferro escribió:


Maestros, tengo una BD de personas y esta puede ser muy grande (millones de entradas). he construido las siguientes tablas
PERSONAS
 documento character varying(10) NOT NULL,
  tipodoc smallint NOT NULL DEFAULT 13
  nombre character varying(200) NOT NULL,
  sexo character(1),
  datos character varying(255),
  fechanac timestamp without time zone,
  CONSTRAINT personas_pkey PRIMARY KEY (documento, tipodoc)

LOCALIDADES
codprov integer NOT NULL,
coddpto integer NOT NULL,
localidad character varying(200) NOT NULL,
claveloc serial NOT NULL

DEPARTAMENTOS
coddpto integer NOT NULL,
departamento character varying(50),
 codprov integer NOT NULL

PROVINCIAS
 codprov smallint NOT NULL,
  provincia character varying(50),

PERSONALOC
 documento character varying(10) NOT NULL,
  tipodoc smallint NOT NULL,
  claveloc integer NOT NULL

les parece que es bueno tenerlo asi, o habria que buscar otra forma para que no se atoren las consultas?



Yahoo! Deportes Beta
¡No te pierdas lo último sobre el torneo clausura 2008!
Enterate aquí http://deportes.yahoo.com

[pgsql-es-ayuda] tablas grandes

Amigos y colegas usuarios de postgres

Se me presenta un problema y necesito de su ayuda, les cuento mi situacion :

Tengo tablas de mas de 15 millones de registros, si realizo una consulta por
un campo que su repetion dentro de la tabla es de 500 veces aprox, la
respuesta es buena, ahora si consulto por otro valor donde la repeticion es
5000/10000 veces ( registros ) , la consulta se demora 10 a 15 minutos,
tengo postgres 8.1 sobre windows 2003, en un doble xeon de 2. mhz intel con
2 gb de ram y discos scsi en raid 5, tiene indices creados por los campos
que se incluyen en la clausula where, y estuve tocando un poco los archivo
de configuracion y mejoro un poco pero no mucho.

Por lo que lei me convendria migrar al postgres 8.3 ya que veo que triplica
su velocidad de respuesta y ya que estamos voy a trasladar el motor a un
servidor HP G5 quad core 4gb ram con debian.

Ustedes creen que esto que tengo planeado hacer realmente va mejorar la
situacion, les pregunto esto ya que requiere de una inversion, y ademas
estas tablas van a seguir creciendo.

Tambien pense en particionar las tablas pero tengo miedo que esto me traiga
problemas de perdida de datos. ya que podria particionar por una fecha de
movimientos. y la base se encargaria sola de buscar donde corresponda.

Por ultimo, para manejos de tablas grandes, postgres va o me tendre que
pasar a oracle u otra base de pago. ?

Ya se que son muchas preguntas, acepto todas las sugerencias, son muy
bienvenidas, me van a servir de mucho para tomar una desicion.

Muchas gracias

Alejandro


--
TIP 5: ¿Has leído nuestro extenso FAQ?

http://www.postgresql.org/docs/faqs.FAQ.html

Re: [pgsql-es-ayuda] Necesito orientacion en servidor postgresql en servidor DELL

2008/5/26 Edwin Salguero <edwin16@gmail.com>:
> Voy a provar con la configuracion que me pasaron de postgresql.conf.. y les
> dare noticias mas tarde.. espero que funcione..
>
> Ahora respecto a porque bloqueo.. las tablas.. es un tema bastante extenso
> que no puedo solucionar solo con un llave...
>
> Si alguien tiene algun documento o alguna referencia de control de
> concurrencia les agradezco.. Gracias.. de antemano..


http://www.postgresql.org/docs/current/static/mvcc.html


--
"Linux is for people who hate Windows, BSD is for people who love UNIX".
"Social Engineer -> Because there is no patch for human stupidity"
"The Unix Guru's View of Sex unzip ; strip ; touch ; grep ; finger ;
mount ; fsck ; more ; yes ; umount ; sleep."
"Documentation is like sex: when it is good, it is very, very good;
and when it is bad, it is better than nothing."
--
TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda

[GENERAL] function cache effect still happening?

Hi everyone, a few months ago I was still using Postgresql 8.2 and had the problem described here: http://www.postgresql.org/docs/faqs.FAQ.html#item4.19 , that time I solved it using EXECUTE for all sentences accessing temporary tables. Right now I'm using 8.3,  the scenario is a little different but the problem is the same. I have many schemas with the same structure (tables, views and one trigger), and two functions in the public schema which insert and delete data from them, the INSERT and DELETE sentences are hard-coded. Every schema represents a store from the same company.

The idea is that just by changing the search_path value to something like "schema1,public", it's possible to execute the functions and to process data for any schema (one at a time). But the problem is here: through the client app, a user invokes one of these functions on a given schema (schema1), then requests a "store change", actually setting the search_path to use another schema (schema2) and again, executes any of the functions that access the schema tables, BUT the function seems to be still linked to the first schema, so new records are added to the wrong schema and delete operations don't find the right record. EXECUTE will save the day again, but I'd like to know if this is considered a known bug even when it was apparently fixed.

Thanks.

RV: RV: [pgsql-es-ayuda] Consulta Postgres 8.3

Muy bien. Anduvo ok. Tuve que modificar un poco el script bash, pero anduvo.
El único problema es que genera alguna incompatibilidad con el operador de
concatenación ||, pero también encontré la solución por internet.
Lo correcto hubiese sido cambiar los tipos y reestructurar la base, pero es
algo en producción y los programadores me matarían si tienen que revisar
todos los SQL.

ANA

-----Mensaje original-----
De: Gilberto Castillo Martínez [mailto:gilberto.castillo@etecsa.cu]
Enviado el: Lunes, 26 de Mayo de 2008 12:55 p.m.
Para: Ana Smail
Asunto: Re: RV: [pgsql-es-ayuda] Consulta Postgres 8.3

Ana:

Comentarme como te fue después de utilizar la información del enlace que nos
dejaste.

Gilberto.
El lun, 26-05-2008 a las 11:49 -0300, Ana Smail escribió:
> Estoy viendo que otros estan teninedo estos problemas con la 8.3:
> http://people.planetpostgresql.org/peter/index.php?/archives/18-Readdi
> ng-imp
> licit-casts-in-PostgreSQL-8.3.html
>
> -----Mensaje original-----
> De: Gilberto Castillo Martínez [mailto:gilberto.castillo@etecsa.cu]
> Enviado el: Lunes, 26 de Mayo de 2008 11:13 a.m.
> Para: Ana Smail
> CC: pgsql-es-ayuda@postgresql.org
> Asunto: Re: [pgsql-es-ayuda] Consulta Postgres 8.3
>
> Ana:
>
> No se tu caso, pero se me ocurre que si haces coincidir en tipo a
> ambos campo .... no tendrás que realizar cambio alguno.
>
> Si vuelves a analizar el diseño de tus datos ... quizás sea más
> factible esa idea.
>
> Gilberto.
>
> El lun, 26-05-2008 a las 09:57 -0300, Ana Smail escribió:
> > Les hago una consulta:
> > Tengo un query que en la versión 8.2 no necesitaba casteo de tipo y
> > ahora cuando cambio a la version 8.3 si lo necesita:
> > En la version 8.2:
> > SELECT *
> > FROM T1 d
> > WHERE d.campo1 NOT IN
> > (SELECT conf.campo2
> > FROM T2 conf
> > WHERE conf.nombre = 'Documentacion.EstadoArchivado'
> > OR conf.nombre = 'Documentacion.EstadoAcumulado')
> >
> > En la version 8.3:
> > SELECT *
> > FROM T1 d
> > WHERE d.campo1::character varying NOT IN (SELECT conf.campo2 FROM T2
> > conf WHERE conf.nombre = 'Documentacion.EstadoArchivado'
> > OR conf.nombre = 'Documentacion.EstadoAcumulado')
> >
> > Ya que campo1 es un integer y campo2 un character varying.
> > Pregunta: hay forma de no tener que cambiar todos los querys y que
> > los casteos sean automáticos?
> >
> > ANA
> >
> > --
> > TIP 5: ¿Has leído nuestro extenso FAQ?
> >

http://www.postgresql.org/docs/faqs.FAQ.html
> >
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.24.1/1466 - Release Date:
> 25/05/2008
> 06:49 p.m.
>
>
> --
> TIP 10: no uses HTML en tu pregunta, seguro que quien responda no
> podrá leerlo
>

--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.24.1/1466 - Release Date: 25/05/2008
06:49 p.m.


--
TIP 9: visita nuestro canal de IRC #postgresql-es en irc.freenode.net

Re: [BUGS] BUG #4196: Backend crash possible with psql

Oh, one other thing: if the theory about gettext delivering the "wrong"
encoding is correct, then the error messages going into the postmaster
log should be in WIN1252 encoding, rather than UTF8 which is the
intended behavior when server_encoding is UTF8. The log snippet in your
bug report was UTF8, but that might have gotten converted somewhere
along the line. Can you confirm which encoding is actually present in
the log file?

regards, tom lane

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

Re: [BUGS] BUG #4196: Backend crash possible with psql

Hello, Tom,

Tom Lane schrieb:
>
> Yeah, that's what I think too. Specifically, we expect the gettext
> package to deliver translated error messages in the server_encoding,
> but it seems that's not what we're getting on Windows. Without having
> dug into the gettext code, I wonder whether it is looking at lc_ctype
> and thinking it should return WIN1252 strings.
>
> Another interesting question is how initdb allowed you to select the
> above combination of settings. 8.3 is supposed to enforce that
> server_encoding is the same as the encoding implied by lc_ctype,
> which is evidently not the case here.
Why shouldn't this be possible? It must be possible to store the data in
UTF-8, and of course, to use this a the server encoding. The characters
used should be collated by German and use the german upper/lower
conventions. Looks perfectly sane to me.
> I recall we were tinkering with
> that code before 8.3 release, but I guess it's still not right :-(
>
> regards, tom lane
>
With best regards,
Daniel Migowski

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

Re: [pgsql-es-ayuda] Necesito orientacion en servidor postgresql en servidor DELL

Voy a provar con la configuracion que me pasaron de postgresql.conf.. y les dare noticias mas tarde.. espero que funcione..

Ahora respecto a porque bloqueo.. las tablas.. es un tema bastante extenso que no puedo solucionar solo con un llave...

Si alguien tiene algun documento o alguna referencia de control de concurrencia les agradezco.. Gracias.. de antemano..


--
Edwin Salguero C.
70738223
http://www.kernel.com.bo

Re: [pgsql-es-ayuda] recomendacion para BD grande

2008/5/26 Gabriel Ferro <gabrielrferro@yahoo.com.ar>:
> Aclarando que las tablas que les pase no estan completas ya que no estan
> algunos campos extras que estoy obligado a usar porque en realidad estoy
> pasando archivos XLS y DBF con distintas estructuras,tratando de unificar
> todos los padrones y otros datos que tenemos por todos lados
> Vamos por partes:
> -En efecto Nombre tiene los apellidos y los nombres, no me sirven de clave
> porque Martinez Pedro hay miles.
> -Lo de BD operativo no te entiendo, si te refieres a que si se usara o solo
> es experimental, si, la usaremos.
> -autoincrementable como clave: pienso que es mejor buscar usando las claves
> primarias y como las busquedas son por nombres o por documento (doc+tipodoc)
> use lo ultimo como clave ya que es irrepetible.
> - las otras tablas tienen clave al resumirlas no las puse, se las paso
> completas
>
> PERSONAS
> documento character varying(10) NOT NULL,
> tipodoc smallint NOT NULL DEFAULT 13
> nombre character varying(200) NOT NULL,
> sexo character(1),
> datos character varying(255),
> fechanac timestamp without time zone,
> CONSTRAINT personas_pkey PRIMARY KEY (documento, tipodoc),
> CONSTRAINT personas_tipodoc_fkey FOREIGN KEY (tipodoc)
> REFERENCES analisis.docu (clave) MATCH SIMPLE
> ON UPDATE NO ACTION ON DELETE NO ACTION
>
> LOCALIDADES
> codprov integer NOT NULL,
> coddpto integer NOT NULL,
> localidad character varying(200) NOT NULL,
> claveloc serial NOT NULL,
> CONSTRAINT localidades_pkey PRIMARY KEY (claveloc)
>
> DEPARTAMENTOS
> coddpto integer NOT NULL,
> departamento character varying(50),
> codprov integer NOT NULL,
> CONSTRAINT departamentos_pkey PRIMARY KEY (codprov, coddpto),
> CONSTRAINT departamentos_codprov_fkey FOREIGN KEY (codprov)
> REFERENCES analisis.provincias (codprov) MATCH SIMPLE
> ON UPDATE NO ACTION ON DELETE NO ACTION
>
> PROVINCIAS
> codprov smallint NOT NULL,
> provincia character varying(50),
> CONSTRAINT provincias_pkey PRIMARY KEY (codprov)
>
> PERSONALOC
> documento character varying(10) NOT NULL,
> tipodoc smallint NOT NULL,
> claveloc integer NOT NULL
> CONSTRAINT personaloc_pkey PRIMARY KEY (tipodoc, documento,
> claveloc),
> CONSTRAINT personaloc_claveloc_fkey FOREIGN KEY (claveloc)
> REFERENCES analisis.localidades (claveloc) MATCH SIMPLE
> ON UPDATE NO ACTION ON DELETE NO ACTION
>
> Saludos
>
> ________________________________
> Yahoo! Encuentros
> Ahora encontrar pareja es mucho más fácil, probá el nuevo Yahoo! Encuentros.
> Visitá http://yahoo.cupidovirtual.com/servlet/NewRegistration

-En efecto Nombre tiene los apellidos y los nombres, no me sirven de clave
porque Martinez Pedro hay miles. --> En ningun caso mi propuesta
siquiera fue por ese lado (seria bastante poco amistoso de mi parte
tentar de darte una solucion de ese tipo)... solo era la duda porque
generalmente se sepraran para agilizar las busquedas ...

-autoincrementable como clave: pienso que es mejor buscar usando las
claves primarias y como las busquedas son por nombres o por documento
(doc+tipodoc) use lo ultimo como clave ya que es irrepetible. -->
Como ? buscaras solo por clave??? entiendo que las busqueda sobre esa
tabla seran por cualquier campo o sea nombre, sexo, edad etc... una
cosa son las busquedas y otra son los insert de datos, tal como te
comente al parecer PG tiene bastante optimizado el tema de calculo de
autoincrementables por lo que pasa a ser una buena tecnica para
administrar los tiempo de ingreso de datos...

- Respecto a si es una BD operativa me referia a que no estas
haciendo un DataWareHouse o DataMart era solo por eso...
Solo eso puedo aportarte por el momento yo me iria por el lado de
claves autoincrementables despues las busquedas las puedes optimizar
analizando colocando indices donde corresponda, etc etc...
Ahh y trata de separar tu campo nombre en el futuro puede evitarte
dolores de cabeza...
Slds.

--
----------------------
Slds.
jchavez
linux User #397972 on http://counter.li.org/
--
TIP 7: no olvides aumentar la configuración del "free space map"

Re: [BUGS] BUG #4196: Backend crash possible with psql

Daniel Migowski <dmigowski@ikoffice.de> writes:
> client_encoding: WIN1252
> server_encoding: UTF8
> lc_collate: German_Germany.1252
> lc_ctype: German_Germany.1252
> lc_messages: German_Germany

Thanks for the info --- we have been unable to get these values from
previous complainants, so this is a real help.

> Please let me know if you need more info. For me it looks like the
> server reads the localized error messages in system encoding (win1252),
> but assumes they are in utf8 in the server.

Yeah, that's what I think too. Specifically, we expect the gettext
package to deliver translated error messages in the server_encoding,
but it seems that's not what we're getting on Windows. Without having
dug into the gettext code, I wonder whether it is looking at lc_ctype
and thinking it should return WIN1252 strings.

Another interesting question is how initdb allowed you to select the
above combination of settings. 8.3 is supposed to enforce that
server_encoding is the same as the encoding implied by lc_ctype,
which is evidently not the case here. I recall we were tinkering with
that code before 8.3 release, but I guess it's still not right :-(

regards, tom lane

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

Re: [pgsql-es-ayuda] recomendacion para BD grande

Aclarando que las tablas que les pase no estan completas ya que no estan algunos campos extras que estoy obligado a usar porque en realidad estoy pasando archivos XLS y DBF con distintas estructuras,tratando de unificar todos los padrones y otros datos que tenemos por todos lados
Vamos por partes:
-En efecto Nombre tiene los apellidos y los nombres, no me sirven de clave porque Martinez Pedro hay miles.
-Lo de BD operativo no te entiendo, si te refieres a que si se usara o solo es experimental, si, la usaremos.
-autoincrementable como clave: pienso que es mejor buscar usando las claves primarias y como las busquedas son por nombres o por documento (doc+tipodoc) use lo ultimo como clave ya que es irrepetible.
- las otras tablas tienen clave al resumirlas no las puse, se las paso completas

  PERSONAS
 documento character varying(10) NOT NULL,
  tipodoc smallint NOT NULL DEFAULT 13
  nombre character varying(200) NOT NULL,
  sexo character(1),
  datos character varying(255),
  fechanac timestamp without time zone,
  CONSTRAINT personas_pkey PRIMARY KEY (documento, tipodoc),
  CONSTRAINT personas_tipodoc_fkey FOREIGN KEY (tipodoc)
      REFERENCES analisis.docu (clave) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION

LOCALIDADES
codprov integer NOT NULL,
coddpto integer NOT NULL,
localidad character varying(200) NOT NULL,
claveloc serial NOT NULL,
CONSTRAINT localidades_pkey PRIMARY KEY (claveloc)

DEPARTAMENTOS
coddpto integer NOT NULL,
departamento character varying(50),
 codprov integer NOT NULL,
CONSTRAINT departamentos_pkey PRIMARY KEY (codprov, coddpto),
CONSTRAINT departamentos_codprov_fkey FOREIGN KEY (codprov)
      REFERENCES analisis.provincias (codprov) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION

PROVINCIAS
 codprov smallint NOT NULL,
 provincia character varying(50),
 CONSTRAINT provincias_pkey PRIMARY KEY (codprov)

PERSONALOC
 documento character varying(10) NOT NULL,
  tipodoc smallint NOT NULL,
  claveloc integer NOT NULL
            CONSTRAINT personaloc_pkey PRIMARY KEY (tipodoc, documento, claveloc),
            CONSTRAINT personaloc_claveloc_fkey FOREIGN KEY (claveloc)
               REFERENCES analisis.localidades (claveloc) MATCH SIMPLE
               ON UPDATE NO ACTION ON DELETE NO ACTION

Saludos



Yahoo! Encuentros
Ahora encontrar pareja es mucho más fácil, probá el nuevo Yahoo! Encuentros.
Visitá http://yahoo.cupidovirtual.com/servlet/NewRegistration

Re: [BUGS] BUG #4196: Backend crash possible with psql

Hello Tom,

Tom Lane schrieb:
> Please show the values you are using for these database
> parameters:
> client_encoding
> server_encoding
> lc_collate
> lc_ctype
> lc_messages
client_encoding: WIN1252
server_encoding: UTF8
lc_collate: German_Germany.1252
lc_ctype: German_Germany.1252
lc_messages: German_Germany

Please let me know if you need more info. For me it looks like the
server reads the localized error messages in system encoding (win1252),
but assumes they are in utf8 in the server.

With best regards,
Daniel Migowski

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

Re: [PERFORM] I/O on select count(*)

"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> Decibel! wrote:
>> Also, Simon and Tom had an idea at PGCon: Don't set hint-bits in the
>> back-end if the page isn't already dirty.

> Or even better: set the hint-bits, but don't dirty the page.

Which in fact is what Simon suggested, not the other thing.

regards, tom lane

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

Re: [GENERAL] Using "ident sameuser" with Mac OS X Leopard

Hi!

Damn, I'm so stupid. All it needed was a restart. A reload was not
enough. :( Sorry, guys.

Yours

Miguel Arroz

On 2008/05/26, at 16:17, Miguel Arroz wrote:

> Hi!
>
> I'm sorry for the long delay, I have been really busy here.
>
> Yes, it worked before. I was checking my server backups before
> upgrading to Leopard, and it was working with ident sameuser. On
> Leopard, with the exact same configuration, it doesn't.
>
> Leopard appears to support that, so I believe it's a Postgresql bug.
>
> Yours
>
> Miguel Arroz
>
> On 2008/05/19, at 21:38, Tom Lane wrote:
>
>> Miguel Arroz <arroz@guiamac.com> writes:
>>> I can't seem to make the "ident sameuser" authentication method
>>> work on Mac OS X Leopard (or "ident" with a specified mapping). It
>>> seems Apple removed identd from the system, I can't find it and
>>> nothing is listening on port 113. Any ideia how to make this work on
>>> Leopard?
>>
>> You sure it worked before? I don't see much sign of identd on Tiger
>> either.
>>
>> I believe Darwin supports ident-over-unix-sockets, for which you
>> don't need an ident daemon.
>>
>> 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
>
> http://www.survs.com - Asking for you
>
>
>
>
>
>
>

http://www.survs.com - Asking for you

Re: [pgsql-es-ayuda] recomendacion para BD grande

On Mon, May 26, 2008 at 4:17 PM, Javier Chávez B. <jchavezb@gmail.com> wrote:
> Gabriel:
> Dajas el campo nombre como uno solo me refiero contendra nombres y
> apellidos??? por otro lado estamos hablando de una BD a nivel
> operativo ??? finalmente no es mejor tener un campo autoincrementable
> como clave primaria ?? segun lo que me comento alvaro hace un tiempo
> PG es bastante eficiente en administrar ese tipo de campos y aumentas
> de paso el desempeño ...
> ademas dejarias tu tabla solo con una clave primaria.
> Que contiene el campo datos??? y las otras tablas porque no tiene
> Clave primaria???
> Slds.
>
>
> 2008/5/26 Gabriel Ferro <gabrielrferro@yahoo.com.ar>:
>>
>> Maestros, tengo una BD de personas y esta puede ser muy grande (millones de
>> entradas). he construido las siguientes tablas
>> PERSONAS
>> documento character varying(10) NOT NULL,
>> tipodoc smallint NOT NULL DEFAULT 13
>> nombre character varying(200) NOT NULL,
>> sexo character(1),
>> datos character varying(255),
>> fechanac timestamp without time zone,
>> CONSTRAINT personas_pkey PRIMARY KEY (documento, tipodoc)
>>
>> LOCALIDADES
>> codprov integer NOT NULL,
>> coddpto integer NOT NULL,
>> localidad character varying(200) NOT NULL,
>> claveloc serial NOT NULL
>>
>> DEPARTAMENTOS
>> coddpto integer NOT NULL,
>> departamento character varying(50),
>> codprov integer NOT NULL
>>
>> PROVINCIAS
>> codprov smallint NOT NULL,
>> provincia character varying(50),
>>
>> PERSONALOC
>> documento character varying(10) NOT NULL,
>> tipodoc smallint NOT NULL,
>> claveloc integer NOT NULL
>>
>> les parece que es bueno tenerlo asi, o habria que buscar otra forma para que
>> no se atoren las consultas?
>>
>> ________________________________
>> Yahoo! Deportes Beta
>> ¡No te pierdas lo último sobre el torneo clausura 2008!
>> Enterate aquí http://deportes.yahoo.com
>
>
>
> --
> ----------------------
> Slds.
> jchavez
> linux User #397972 on http://counter.li.org/
>

--
----------------------
Slds.
jchavez
linux User #397972 on http://counter.li.org/


Disculpen por el TOP POSTING se me paso!!! estaba distraido!!
Slds.
J.
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [GENERAL] Using "ident sameuser" with Mac OS X Leopard

Hi!

I'm sorry for the long delay, I have been really busy here.

Yes, it worked before. I was checking my server backups before
upgrading to Leopard, and it was working with ident sameuser. On
Leopard, with the exact same configuration, it doesn't.

Leopard appears to support that, so I believe it's a Postgresql bug.

Yours

Miguel Arroz

On 2008/05/19, at 21:38, Tom Lane wrote:

> Miguel Arroz <arroz@guiamac.com> writes:
>> I can't seem to make the "ident sameuser" authentication method
>> work on Mac OS X Leopard (or "ident" with a specified mapping). It
>> seems Apple removed identd from the system, I can't find it and
>> nothing is listening on port 113. Any ideia how to make this work on
>> Leopard?
>
> You sure it worked before? I don't see much sign of identd on Tiger
> either.
>
> I believe Darwin supports ident-over-unix-sockets, for which you
> don't need an ident daemon.
>
> 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

http://www.survs.com - Asking for you

Re: [pgsql-es-ayuda] recomendacion para BD grande

Gabriel:
Dajas el campo nombre como uno solo me refiero contendra nombres y
apellidos??? por otro lado estamos hablando de una BD a nivel
operativo ??? finalmente no es mejor tener un campo autoincrementable
como clave primaria ?? segun lo que me comento alvaro hace un tiempo
PG es bastante eficiente en administrar ese tipo de campos y aumentas
de paso el desempeño ...
ademas dejarias tu tabla solo con una clave primaria.
Que contiene el campo datos??? y las otras tablas porque no tiene
Clave primaria???
Slds.


2008/5/26 Gabriel Ferro <gabrielrferro@yahoo.com.ar>:
>
> Maestros, tengo una BD de personas y esta puede ser muy grande (millones de
> entradas). he construido las siguientes tablas
> PERSONAS
> documento character varying(10) NOT NULL,
> tipodoc smallint NOT NULL DEFAULT 13
> nombre character varying(200) NOT NULL,
> sexo character(1),
> datos character varying(255),
> fechanac timestamp without time zone,
> CONSTRAINT personas_pkey PRIMARY KEY (documento, tipodoc)
>
> LOCALIDADES
> codprov integer NOT NULL,
> coddpto integer NOT NULL,
> localidad character varying(200) NOT NULL,
> claveloc serial NOT NULL
>
> DEPARTAMENTOS
> coddpto integer NOT NULL,
> departamento character varying(50),
> codprov integer NOT NULL
>
> PROVINCIAS
> codprov smallint NOT NULL,
> provincia character varying(50),
>
> PERSONALOC
> documento character varying(10) NOT NULL,
> tipodoc smallint NOT NULL,
> claveloc integer NOT NULL
>
> les parece que es bueno tenerlo asi, o habria que buscar otra forma para que
> no se atoren las consultas?
>
> ________________________________
> Yahoo! Deportes Beta
> ¡No te pierdas lo último sobre el torneo clausura 2008!
> Enterate aquí http://deportes.yahoo.com

--
----------------------
Slds.
jchavez
linux User #397972 on http://counter.li.org/
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [BUGS] BUG #4196: Backend crash possible with psql

"Daniel Mihowski" <dmigowski@ikoffice.de> writes:
> Description: Backend crash possible with psql

We've seen several similar reports, but the conditions that cause it are
not clear. Please show the values you are using for these database
parameters:
client_encoding
server_encoding
lc_collate
lc_ctype
lc_messages

regards, tom lane

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

Re: [PERFORM] Symbolic Links to Tablespaces

"Campbell, Lance" <lance@illinois.edu> writes:
> I have started to define tablespaces on different disks. Is there any
> performance issues related to referencing tablespaces on different disks
> with symbolic links? By using symbolic links to tablespaces can I then
> stop the database and move a particular tablespace from one location to
> another without causing a problem? This would seem to give a lot of
> flexibility to the location of tablespaces.

A tablespace already is a symbolic link --- read
http://www.postgresql.org/docs/8.2/static/storage.html

Putting another one into the path will eat cycles and doesn't seem like
it could buy anything.

regards, tom lane

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

[lapug] Provisions for Audio-Recording

Selena asked that record this months LAPUG meeting.
http://pugs.postgresql.org/node/390#comment-11

Does anyone have any equipment that they would like to volunteer to
assist? If not, I think I have a 5$ desktop mic and a laptop with
auto recording software.

--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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

[pgsql-es-ayuda] recomendacion para BD grande


Maestros, tengo una BD de personas y esta puede ser muy grande (millones de entradas). he construido las siguientes tablas
PERSONAS
 documento character varying(10) NOT NULL,
  tipodoc smallint NOT NULL DEFAULT 13
  nombre character varying(200) NOT NULL,
  sexo character(1),
  datos character varying(255),
  fechanac timestamp without time zone,
  CONSTRAINT personas_pkey PRIMARY KEY (documento, tipodoc)

LOCALIDADES
codprov integer NOT NULL,
coddpto integer NOT NULL,
localidad character varying(200) NOT NULL,
claveloc serial NOT NULL

DEPARTAMENTOS
coddpto integer NOT NULL,
departamento character varying(50),
 codprov integer NOT NULL

PROVINCIAS
 codprov smallint NOT NULL,
  provincia character varying(50),

PERSONALOC
 documento character varying(10) NOT NULL,
  tipodoc smallint NOT NULL,
  claveloc integer NOT NULL

les parece que es bueno tenerlo asi, o habria que buscar otra forma para que no se atoren las consultas?



Yahoo! Deportes Beta
¡No te pierdas lo último sobre el torneo clausura 2008!
Enterate aquí http://deportes.yahoo.com

Re: [pgsql-es-ayuda] almacenar en bd o no?

--- El lun 26-may-08, Crispin T. <cris.emis@gmail.com> escribió:
De: Crispin T. <cris.emis@gmail.com>
Asunto: [pgsql-es-ayuda] almacenar en bd o no?
A: pgsql-es-ayuda@postgresql.org
Fecha: lunes, 26 mayo, 2008, 1:29 am

hola tengo un problema resulta que tengo un sistema en java con bd postgres 8.2 y todo me va de maravilla pero empieza a preocuparme un asunto, resulta que por performance y por no cargar demasiado la bd no almacene las fotos de unos inmuebles en al bd pero me resulta complicado al momento de hacer backups ya que las imagenes las agarro como archivos y pues copiar varios archivos y restaurar varios archivos ademas de los datos de la bd se me hace mucho trabajo y mucho tiempo pero no me anime a almacenarlos en un tipo oid porque por cada inmueble se manejan alrededor de 30 fotos png de 600x500 aproximadamente, ademas que antes el sistema hera monolitoco (corria en una unica pc) pero ahora el negocio crecio y se necesita que corra en una lan y bueno nose como hacer que una aplicación java cargue archivos que estan en otra pc (no veo seguro compartir la carpeta de los archivos) y me estoy animando a guardar las imagenes en la bd

dados los casos ¿que harian ustedes en este caso?
en el caso de sugerirme que guarde las imagenes en la bd ¿hay forma de sacar backup's de solo algunas tablas?
en caso de no guardar en la bd las imagenes ¿que solucion me sugieren para cargar imagenes desde otra pc(sin compartir la carpeta)?

gracias.


Crispin.
--
Solo alcanzaras el conocimiento conociendo la ignorancia.
<<Pronto mi nuevo blog>>


***********************************************************
Carlos Márquez
***********************************************************

--- El lun 26-may-08, Crispin T. <cris.emis@gmail.com> escribió:
De: Crispin T. <cris.emis@gmail.com>
Asunto: [pgsql-es-ayuda] almacenar en bd o no?
A: pgsql-es-ayuda@postgresql.org
Fecha: lunes, 26 mayo, 2008, 1:29 am

hola tengo un problema resulta que tengo un sistema en java con bd postgres 8.2 y todo me va de maravilla pero empieza a preocuparme un asunto, resulta que por performance y por no cargar demasiado la bd no almacene las fotos de unos inmuebles en al bd pero me resulta complicado al momento de hacer backups ya que las imagenes las agarro como archivos y pues copiar varios archivos y restaurar varios archivos ademas de los datos de la bd se me hace mucho trabajo y mucho tiempo pero no me anime a almacenarlos en un tipo oid porque por cada inmueble se manejan alrededor de 30 fotos png de 600x500 aproximadamente, ademas que antes el sistema hera monolitoco (corria en una unica pc) pero ahora el negocio crecio y se necesita que corra en una lan y bueno nose como hacer que una aplicación java cargue archivos que estan en otra pc (no veo seguro compartir la carpeta de los archivos) y me estoy animando a guardar las imagenes en la bd

dados los casos ¿que harian ustedes en este caso?
en el caso de sugerirme que guarde las imagenes en la bd ¿hay forma de sacar backup's de solo algunas tablas?
en caso de no guardar en la bd las imagenes ¿que solucion me sugieren para cargar imagenes desde otra pc(sin compartir la carpeta)?

gracias.


Crispin.
--
Solo alcanzaras el conocimiento conociendo la ignorancia.
<<Pronto mi nuevo blog>>


Yo he tenido ese problema

He optado por tener archivos (sean estos imágenes o documentos) dentro de la BD.

Con los tipo "lo" tuve problemas porque las funciones lo_unlink(blb_archivo), lo_export(blb_archivo, s_ruta) y lo_import(s_ruta) solo funcionan en el servidor, es decir tu sistema debiera funcionar en la PC donde corre la BD. no me pareció adecuado y todavía no se para que serviría esto, si alguno de los expertos (en esta lista hay varios) pudiera hacer llegar algún dato al respecto seria magnifico.

AL final opte por usar el tipo bytea, yo programo con Power Builder, y utilice funciones propias de este lenguaje para convertir el archivo a este formato.

Para mostrarlo debo convertirlo a archivo nuevamente y colocarlo en un objeto OLE, pero esto es una particularidad de este lenguaje. En JAVA tengo entendido, (por allí he leido) que existen funciones que convierten archivos a bytea y viceversa, el asunto seria que averigües como mostrarlos.

Quiza el JAVA si pueda mostar el campo bytea, en todo caso deberas bajar el archivo (en la PC cliente) para mostarlo.



***********************************************************
Carlos Márquez
***********************************************************





Yahoo! Deportes Beta
¡No te pierdas lo último sobre el torneo clausura 2008!
Entérate aquí http://deportes.yahoo.com

Re: [PERFORM] "Big O" notation for postgres?

Gregory Stark wrote:
> "Richard Huxton" <dev@archonet.com> writes:
>
>
>> Jonah H. Harris wrote:
>>
>>> On Wed, May 21, 2008 at 10:10 AM, H. Hall wrote:
>>>
>>>> Does anyone know if there is a source that provides "Big O" notation for
>>>> postgres's aggregate functions and operations? For example is count(*) =
>>>> O(1) or O(n)?
>>>>
>>> I don't know of any document containing the complexity of each
>>> aggregate, but it's sometimes left as a comment in the souce code.
>>>
>> Recent max() and min() can be O(n) or O(1) depending on the where-clause and
>> presence of an index too, just to muddy the waters.
>>
When I first read the above from Jonah I just assumed some Postgres
magic was producing O(1). After seeing this again, I believe that
Postgres must be doing something like the following for max and min:
Max: ORDER BY colName DESC LIMIT 1
Min: ORDER BY coName ASC LIMIT 1

Thus Jonah's caveat about using an index. If postgres is using an index
as in the above then the Max and Min functions would both be O(log N) ,
this is log base2 of N, which is the time it takes to search a balanced
binary tree, not O(1) which implies a constant time to perform,
regardless of the size of the dataset N.

>
> Hm, true. But excluding those special cases all Postgres aggregate functions
> will be O(n) unless they're doing something very odd. None of the built-in
> functions (except min/max as noted) do anything odd like that.
>
> The reason way is because of the basic design of Postgres aggregate functions.
> They are fed every tuple one by one and have to keep their state in a single
> variable. Most of the aggregate functions like count(*) etc just keep a static
> non-growing state and the state transition function is a simple arithmetic
> operation which is O(1). So the resulting operation is O(n).
>
> Actually one exception would be something like
>
> CREATE AGGREGATE array_agg(anyelement) (SFUNC = array_append, STYPE = anyarray, INITCOND='{}');
>
> Since the state variable has to keep accumulating more and more stuff the
> array_append becomes more and more expensive (it has to generate a new array
> so it has to copy the existing stuff). So actually it woul dbe O(n^2).
>
> The only builtin aggregate which looks like it falls in this category would be
> xmlagg()
>
>
Functions with O(N^2) scale very badly of course.

It would be very handy if the Planner could kick out Big O with its
estimates. This would allow one to quickly tell how a query scales with
a large number of rows.

Thanks,
HH

--
H. Hall
ReedyRiver Group LLC
http://www.reedyriver.com


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

Re: [BUGS] BUG #4199: Can't connecto to server with pgAdmin after installation

On Mon, May 26, 2008 at 11:23 AM, Nikolay Komarov <postgres@komarov.info> wrote:
>
> The following bug has been logged online:
>
> Bug reference: 4199
> Logged by: Nikolay Komarov
> Email address: postgres@komarov.info
> PostgreSQL version: 8.2.7
> Operating system: Windows Vista Home Premium Russian
> Description: Can't connecto to server with pgAdmin after installation
> Details:
>
> Just installed the Postgre, launched pgAdmin III, try to connect to the
> localhost server with a proper password, receive error messages:
>
> FATAL: cannot open the logfile!
>
> and the other one:
>
> can't open file
> c:\Users\Николай\AppData\Roaming\postgresql\pgpass.conf (error 3:
> system cannon find path specified)
>
> after showing this, Vista closes pgAdmin III reporting that it made an
> error.
>
> I tried to launch pgAdmin without AND with admin privileges - same result.

Please test pgAdmin 1.8.2. There were some bug fixes in this area.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

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

[lapug] Food for May's LAPUG Meeting

Would anyone(s) like to volunteer buying and bring food for this
Friday's Pug meeting at Cal Poly? If not, I can look for something
local to pickup (I will make sure the pizza doens't have clams in the
shell this time :-) ).

I expect we will have about 6-7 PUGers.
Moo, how many CS students to you expect to show up?

--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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

Re: [BUGS] BUG #4198: The bugreport form has an encoding problem

On Mon, May 26, 2008 at 10:01 AM, Daniel Migowski <dmigowski@ikoffice.de> wrote:
>
> The following bug has been logged online:
>
> Bug reference: 4198
> Logged by: Daniel Migowski
> Email address: dmigowski@ikoffice.de
> PostgreSQL version: n/a
> Operating system: Windows XP
> Description: The bugreport form has an encoding problem
> Details:
>
> Entered Umlauts aren't correctly received by your script responsible for the
> form at:
>
>

http://www.postgresql.org/support/submitbug
>
> This might be a problem for entering encoding related problems, which i
> tried to do a few minutes ago.
>
> The Input I pasted had in fact nice umlauts displayed, but the response
> email from you showed them as 2-char-ASCII representation of the UTF-8 char.

Looks OK for me, but maybe Gmail is fixing it up.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

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

Re: [HACKERS] Read Uncommitted

Am Montag, 26. Mai 2008 schrieb Simon Riggs:
> At the moment, a long running SQL Statement can prevent xmin moving
> forward, which can result in VACUUM and HOT not being able to remove row
> versions effectively. My proposal is that a Read Uncommitted transaction
> would not prevent row removal, which then offers no guarantee that the
> "correct" answer would be returned. Which is *exactly* what that
> transaction isolation level was designed for.
>
> In many cases, an application designer may be able to tell that a
> particular query will always return the correct answer. For example, we
> may query against data which is known not to change, even though other
> data in the same database cluster may be subject to frequent change.
> e.g. queries against large insert-only tables.

If the data in a table never changes, why would VACUUM or HOT need to touch
it? The use case isn't clear to me.

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

[GENERAL] PostgreSQL full text vs. MySQL

Hey all,

I have been a MySQL user for a number of years,
but just read about PostgreSQL version 8.3 and was
especially intrigued and interested in the full
text search implementation using lexemes.

I'm currently doing the specs for a PHP app that
will involve up to the millions records to search,
and it will need full text capability.

I am wondering if I could get some opinions on
PostgreSQL's full text versus MySQL's and
specifically I have not been able to find
documentation that MySQL supports lexeme type full
text, able to locate root words the way PostgreSQL
8.3 does.

Is this the case? I could certainly justify the
switch to PostgreSQL if I can make a solid case to
the client for doing so.

I realize this is a PostgreSQL list, so let's try
to be fair ;)

Thanks!
--
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison, WI 53703
608-250-2720
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and versatile
PHP/MySQL, AJAX & DHTML development framework.
http://phpenguin.bigskypenguin.com/

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

RV: [pgsql-es-ayuda] Consulta Postgres 8.3

Estoy viendo que otros estan teninedo estos problemas con la 8.3:
http://people.planetpostgresql.org/peter/index.php?/archives/18-Readding-imp
licit-casts-in-PostgreSQL-8.3.html

-----Mensaje original-----
De: Gilberto Castillo Martínez [mailto:gilberto.castillo@etecsa.cu]
Enviado el: Lunes, 26 de Mayo de 2008 11:13 a.m.
Para: Ana Smail
CC: pgsql-es-ayuda@postgresql.org
Asunto: Re: [pgsql-es-ayuda] Consulta Postgres 8.3

Ana:

No se tu caso, pero se me ocurre que si haces coincidir en tipo a ambos
campo .... no tendrás que realizar cambio alguno.

Si vuelves a analizar el diseño de tus datos ... quizás sea más factible esa
idea.

Gilberto.

El lun, 26-05-2008 a las 09:57 -0300, Ana Smail escribió:
> Les hago una consulta:
> Tengo un query que en la versión 8.2 no necesitaba casteo de tipo y
> ahora cuando cambio a la version 8.3 si lo necesita:
> En la version 8.2:
> SELECT *
> FROM T1 d
> WHERE d.campo1 NOT IN
> (SELECT conf.campo2
> FROM T2 conf
> WHERE conf.nombre = 'Documentacion.EstadoArchivado'
> OR conf.nombre = 'Documentacion.EstadoAcumulado')
>
> En la version 8.3:
> SELECT *
> FROM T1 d
> WHERE d.campo1::character varying NOT IN (SELECT conf.campo2 FROM T2
> conf WHERE conf.nombre = 'Documentacion.EstadoArchivado'
> OR conf.nombre = 'Documentacion.EstadoAcumulado')
>
> Ya que campo1 es un integer y campo2 un character varying.
> Pregunta: hay forma de no tener que cambiar todos los querys y que los
> casteos sean automáticos?
>
> ANA
>
> --
> TIP 5: ¿Has leído nuestro extenso FAQ?
>

http://www.postgresql.org/docs/faqs.FAQ.html
>

--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.24.1/1466 - Release Date: 25/05/2008
06:49 p.m.


--
TIP 10: no uses HTML en tu pregunta, seguro que quien responda no podrá leerlo