Wednesday, July 2, 2008

Re: [GENERAL] Memory use in 8.3 plpgsql with heavy use of xpath()

>> I think this should fix it.
>>
>> Kris Jurka
>
> It looks like xml.c source has changed considerably since 8.3 (looking at
> revision 1.68.2.2 from the 8.3.3. release). Do you know where/if this
> patch would apply to the 8.3 branch?

I diff'ed 1.74 and 1.68.2.2, and I'm guessing this new line could be added
after line 3203 in 1.68.2.2? I'll give that a try...

-- 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] Memory use in 8.3 plpgsql with heavy use of xpath()

"Matt Magoffin" <postgresql.org@msqr.us> writes:
> It looks like xml.c source has changed considerably since 8.3

No, hardly at all actually, but this patch happens to be right next door
to one of the lines that did change. cstring_to_text() replaces some
grottier stuff that used to be used for the same purpose.

In a few minutes I'm going to verify whether Kris' fix makes the leak go
away for me, and commit to CVS if so.

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] Memory use in 8.3 plpgsql with heavy use of xpath()

>> I'm able to duplicate the memory leak in this function with the current
>> Fedora 8 libxml2 (2.6.32). The leak is definitely inside libxml2
>> itself, because the bloat shows up here:
>>
>
> I think this should fix it.
>
> Kris Jurka

It looks like xml.c source has changed considerably since 8.3 (looking at
revision 1.68.2.2 from the 8.3.3. release). Do you know where/if this
patch would apply to the 8.3 branch?

-- 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: [HACKERS] [WIP] patch - Collation at database level

Gregory Stark <stark@enterprisedb.com> writes:
> Out of curiosity, what is a "user-defined collation"? Are there SQL statements
> to go around declaring what order code points should be sorted in? That seems
> like it would be... quite tedious!

Hm, that's a good point. SQL99 has

<collation definition> ::=
CREATE COLLATION <collation name> FOR
<character set specification>
FROM <existing collation name>
[ <pad characteristic> ]

<existing collation name> ::= <collation name>

<pad characteristic> ::=
NO PAD
| PAD SPACE

which seems pretty stupid if you ask me --- all the mechanism required
to manage a new object type, just to enable PAD SPACE or not?
(Especially when PAD SPACE itself is an utterly broken, useless concept
... but I digress.) You might as well just provide all the standard
collations in both variants and be done with it.

The statement looks the same in last year's 200n draft, so it's not
like they were just about to add some more capability.

We might be best off to treat collations like index access methods,
ie, they're theoretically add-able but there's no infrastructure for
managing them, and what's expected is that all the ones you need are
created by initdb.

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

[PATCHES] WITH RECURSIVE updated to CVS TIP

Folks,

Please find patch enclosed, including some documentation.

Can we see about getting this in this commitfest?

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

Re: [HACKERS] [GENERAL] pg crashing

Magnus Hagander <magnus@hagander.net> writes:
>> below this is going to convert \ to /, wouldn't it be clearer to
>> describe the path prefix as Global/PostgreSQL: in the first place?

> Eh, that shows another bug I think. It should *not* convert the \ in
> "Global\", because that one is is interpreted by the Win32 API call!

I was wondering about that. What are the implications of that?

> I think it should be per this patch. Seems right?

Pls fix the comment on the malloc, too.

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: [GENERAL] Memory use in 8.3 plpgsql with heavy use of xpath()

Index: src/backend/utils/adt/xml.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/utils/adt/xml.c,v
retrieving revision 1.74
diff -c -r1.74 xml.c
*** src/backend/utils/adt/xml.c 12 May 2008 00:00:51 -0000 1.74
--- src/backend/utils/adt/xml.c 2 Jul 2008 22:22:57 -0000
***************
*** 3160,3165 ****
--- 3160,3166 ----
{
str = xmlXPathCastNodeToString(cur);
result = (xmltype *) cstring_to_text((char *) str);
+ xmlFree(str);
}

return result;
On Wed, 2 Jul 2008, Tom Lane wrote:

> "Matt Magoffin" <postgresql.org@msqr.us> writes:
>> Below is a test case that simulates the use of xpath() within a plpgsql
>> function in my application.
>
> I'm able to duplicate the memory leak in this function with the current
> Fedora 8 libxml2 (2.6.32). The leak is definitely inside libxml2
> itself, because the bloat shows up here:
>

I think this should fix it.

Kris Jurka

Re: [pgus-board] Checking about call

On Wed, 2008-07-02 at 16:49 -0400, Michael Alan Brewer wrote:
> Recommended addition to tonight's discussion agenda (if we are meeting
> tonight): Flyer for OSCON, etc... (per JD's email from earlier)

O.k. current agenda:

The vision statement:

I would like to see this on the site. I believe it represents our
organization (especially with Michael's edits) in a very well thought
out way. It is also complementary and supportive of the mission. I
imagine it would go under /about

The Bylaws (I heard from Greg today):

Joshua:

I apologize for the delay. I've had several unexpected work rushes so
I've recruited a younger associate to assist who has experience with tax
exemption applications so we'll be getting your project done as follows:
I plan to have the bylaws and organizational minutes to you by tomorrow;
we also need to do a conflict of interest policy, and it is my
understanding that board members will be eligible for grants so we will
include provisions for dealing with that (e.g., disinterested persons
approving); and we are also working on the 1023 application, which I
hope we can have as a draft for you to review by the end of next week.
Again, I appreciate your patience and apologize for taking so long to
get this to you. Greg.

Flyer for OSCON (and LWE):

How has time to create this? I can do wording easily enough but I am not
much of a designer.


Joshua D. Drake


P.S. I will be calling everyone at 8:00PM PST. Michael please send me
your number again. I promise to put you in my contacts this time.

>
> ---Michael Brewer
> mbrewer@gmail.com
>


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

Re: [HACKERS] Working on native Windows x64 version of PostgreSQL

On Wed, Jul 2, 2008 at 10:41 PM, Ken Camann <kjcamann@gmail.com> wrote:
> Hi everyone.
>
> For those who have seen my other thread, I have decided to take the
> plunge: I am going to try to get PostgreSQL to compile as a native
> Windows x64 application (so that it will be able to interface with x64
> DLLs) and I will contribute my changes to the community.

:-)

> As you know, many of the extra postgres features rely on external
> libraries available from gnuwin32, so these must also be converted to
> x64 DLLs or they won't work. I will be starting small, disabling all
> these extra features and only trying to build the core functionality.

That's perfectly reasonable.

> I plan to work on this in a few stages, submitted as work in progress
> patches, because I think this will require a lot of changes. The
> first stage is very simple though; I will be modifying the Perl
> scripts in the src/tools/msvc directory to support the x64 compiler.
> I am using Microsoft Visual C 2008, but I will try to ensure
> everything works with Visual C 2005 (no previous versions have an x64
> compiler, so there are only 2 platforms to support).

I would suggest generating just VC2k5 project files, and then
modifying the build scripts to upgrade them first if required. We do
something similar with wxWidgets for pgAdmin's use - albeit converting
VC++6 files to 2k5 - using the /upgrade option in vcbuild.exe. I
assume something similar is feasible for 2k5 -> 2k8.

Regards, Dave

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

--
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] como lenvantar pgsql 8.3 en linux ?

On 7/2/08, Carlos Mendez <lucas1850@gmail.com> wrote:
>
> $ /usr/local/pgsql/bin/pg_ctl start // tampoco
>
> como se levanta el servicio de postgresql?

$ /usr/local/pgsql/bin/pg_ctl -D /ruta/al/directorio/data start

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 10: no uses HTML en tu pregunta, seguro que quien responda no podrá leerlo

[HACKERS] Working on native Windows x64 version of PostgreSQL

Hi everyone.

For those who have seen my other thread, I have decided to take the
plunge: I am going to try to get PostgreSQL to compile as a native
Windows x64 application (so that it will be able to interface with x64
DLLs) and I will contribute my changes to the community.

As you know, many of the extra postgres features rely on external
libraries available from gnuwin32, so these must also be converted to
x64 DLLs or they won't work. I will be starting small, disabling all
these extra features and only trying to build the core functionality.

I plan to work on this in a few stages, submitted as work in progress
patches, because I think this will require a lot of changes. The
first stage is very simple though; I will be modifying the Perl
scripts in the src/tools/msvc directory to support the x64 compiler.
I am using Microsoft Visual C 2008, but I will try to ensure
everything works with Visual C 2005 (no previous versions have an x64
compiler, so there are only 2 platforms to support).

While this is the simplest change, it may need the most review. I am
a good C programmer but I barely know Perl. That has its advantages;
it will ensure I stick to the style currently used since I have no
other habits.

-Ken

--
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] como lenvantar pgsql 8.3 en linux ?

Lee por favor en el archivo INSTALL la sección _Short Version_ a ver
si te faltó algún paso de los indicados allí

Si lograste compilar, y si ya creaste el usuario postgres, creaste el
directorio en donde vas a queder almacenar los archivos de la base de
datos, le otorgaste la propiedad de dicho directorio al usuario
postgres, e inicialisaste el espacio de datos en dicho directorio con
initdb, entonces deberías levantar el postmaster sin problemas con el
usuario postgres:

$ /usr/local/pgsql/bin/postgres -D path_a_tu_directorio_inicializado
>logfile 2>&1 &

----
Neil Peter Braggio
pbraggio@gmail.com


2008/7/3 Carlos Mendez <lucas1850@gmail.com>:
> hola, que tal,
>
> supongo que esto es muy sencillo pero hasta ahora no he podido levantar el
> pgsql, esta compilado e instalado en /usr/local/pgsql lo intente con
> postgres start, postmaster start, pg_ctl start y nada, ayer funcionaba
> perfectametne cree un usuario con password, y hoy al querer usar el
> PhpPgAdmin no entraba con el usuario, entonces pense que era porque no
> levante el servicio como se hace con el apache,
> hice:
> $ /usr/local/pgsql/bin/postgres start // no funciono
> $ /usr/local/pgsql/bin/postmaster start // no funciono
> $ /usr/local/pgsql/bin/pg_ctl start // tampoco
>
> como se levanta el servicio de postgresql?
> gracias de antemano por la ayuda,
> saludos.
>
--
TIP 8: explain analyze es tu amigo

Re: [pgsql-es-ayuda] mineria de datos

Yo tengo mucho material pero esta en Portugues, ya que estoy haciendo
un master en ello ... que precisas especificamente??? ... no ofrezco
enviar a la lista el material porque es un libro entero, si quieres te
puedo mandar al correo personal, respecto a herramientas la gran
mayoria son pagas porque la idea es que tu tienes grandes recipientes
de datos (en este caso PG) y analizas un problema tiras variables (
obtienes variables desde la BD) corres un algoritmo llamese Red
Neuronal, Arbol de decision, etc ( depende si quieres descubrir o
clasificar) y puedes realizar analisis estadistico.
Los que estan mas avanzados ( al menos mi experiencia aqui en Europa
en gral. ) son SAS, Matlab, pero puedes experimentar con R ( que es
libre) o con weka que tiene implementados algunos algoritmos para DM (
Data Minning) ...
Si quieres los apuntes y no entiendes ciertas palabras yo te ayudo,
esta area dentro del Analisis es increible... espero haberte ayudado
un poco..
Slds.
J.

On Wed, Jul 2, 2008 at 9:53 PM, Danier Marante Jacas
<djacas@estudiantes.uci.cu> wrote:
> Amigos quisiera que me ayudaran con documentación o algo por el estilo de minería de datos y herramientas usadas en postgresql.
> Saludos y gracias por adelantado. Danier
> --
> TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?
>

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

--
----------------------
Slds.
jchavez
linux User #397972 on http://counter.li.org/
--
TIP 5: ¿Has leído nuestro extenso FAQ?

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

Re: [HACKERS] Commitfest status?

On Tuesday 01 July 2008 17:38:28 Josh Berkus wrote:
> On Tue, 01 Jul 2008 16:19:39 -0400
>
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Well, it's July 1, and time for another commit fest to begin.
> > Do we have all the submitted patches queued up at
> > http://wiki.postgresql.org/wiki/CommitFest:2008-07 ?
>
> I think Bruce and I have added everything submitted to June 29. I've
> been offline for 36 hours, though, so I'm scanning hackers and patches
> now. Help welcomed -- I'm on dial-up and it's slow.
>
> Time for people to start volunteering to review stuff! I'll start
> round-robin after a few days. So put your names on the stuff you know
> you can review now.
>

Note that Robert Lor has an updated patch for the dtrace probes that we have
seen over here @ omniti, but I don't think he has posted it yet, so it isn't
reflected in the wiki... Robert, care to post that?

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

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

Re: [pgadmin-support] user data types

On Wed, 2008-07-02 at 12:46 +0100, Raymond O'Donnell wrote:
> On 02/07/2008 11:38, Olaf Frączyk wrote:
>
> > In the object tree I can't find it. (There are Tables, Functions,
> > Sequences etc. but no Types)
>
> You need to go to File -> Options -> Display and check "Types".
Thanks.
Somebody made a mistake in Polish translation and in place of "Types" I
have "Obiekty" -> "Objects" in English.
Now I set English as GUI language and everything is OK :)

Regards,

Olaf
--
Olaf Frączyk <olaf@cbk.poznan.pl>


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

Re: [pgsql-es-ayuda] no repetir nombre

Gunnar Wolf escribió:

> En algunos países mal planeados, hemos tenido tantas identificaciones
> "únicas" en la historia que... ni nos preocupamos por aprenderla ;-)
> Además, por errores aún más estúpidos, por alguna razón algunas
> personas (como yo) fuimos registrados con más de una Clave Única de
> Registro Poblacional (en mi caso, WOIG760426HDFLSN02 y
> WOIG760426HDFLSN02).

Hmm, pero estos dos son iguales!

Me queda clara la moraleja de la historia en todo caso :-) Mi
identificador ínico nacional es 13.028.508-2, obviamente mucho más fácil
de memorizar. (Los niños que nacen hoy tienen uno del orden de los 21
millones ... obviamente tener una población chica ayuda a que el número
no sea muy grande).

--
Alvaro Herrera

http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [pgus-board] Checking about call

On Wed, 2008-07-02 at 16:49 -0400, Michael Alan Brewer wrote:
> Recommended addition to tonight's discussion agenda (if we are meeting
> tonight): Flyer for OSCON, etc... (per JD's email from earlier)

Added, yes I can do a call. I am going to figure out how to do a three
way from my cell phone.

Joshua D. Drake


>
> ---Michael Brewer
> mbrewer@gmail.com
>


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

[pgsql-es-ayuda] mineria de datos

Amigos quisiera que me ayudaran con documentación o algo por el estilo de minería de datos y herramientas usadas en postgresql.
Saludos y gracias por adelantado. Danier
--
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?

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

Re: [pgus-board] Checking about call

Recommended addition to tonight's discussion agenda (if we are meeting
tonight): Flyer for OSCON, etc... (per JD's email from earlier)

---Michael Brewer
mbrewer@gmail.com

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

[pgadmin-hackers] SVN Commit by dpage: r7387 - trunk/pgadmin3/pgadmin/ui

Author: dpage

Date: 2008-07-02 21:37:41 +0100 (Wed, 02 Jul 2008)

New Revision: 7387

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=7387&view=rev

Log:
Correct default value for role inheritance.


Modified:
trunk/pgadmin3/pgadmin/ui/dlgRole.xrc
trunk/pgadmin3/pgadmin/ui/xrcDialogs.cpp

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

Re: [pgus-board] Checking about call

On Wed, 2008-07-02 at 13:45 -0400, Michael Alan Brewer wrote:
> Tuesday turned out not to work for some of y'all; does tonight (at
> 8PM your [West-coast] time) work?
>

The current open issues are:

The vision statement:

I would like to see this on the site. I believe it represents our
organization (especially with Michael's edits) in a very well thought
out way. It is also complementary and supportive of the mission. I
imagine it would go under /about

The Bylaws (I heard from Greg today):

Joshua:

I apologize for the delay. I've had several unexpected work rushes so
I've recruited a younger associate to assist who has experience with tax
exemption applications so we'll be getting your project done as follows:
I plan to have the bylaws and organizational minutes to you by tomorrow;
we also need to do a conflict of interest policy, and it is my
understanding that board members will be eligible for grants so we will
include provisions for dealing with that (e.g., disinterested persons
approving); and we are also working on the 1023 application, which I
hope we can have as a draft for you to review by the end of next week.
Again, I appreciate your patience and apologize for taking so long to
get this to you. Greg.

Sincerely,

Joshua D. Drake

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

Re: [HACKERS] A Windows x64 port of PostgreSQL

On Wed, Jul 2, 2008 at 8:32 PM, Ken Camann <kjcamann@gmail.com> wrote:
> I'd really like to help out with this, but I'm not sure I can work on
> a patch even if I change these things for myself. Fixing this code
> would touch a lot of important internals in postgres (albeit in a
> small way), so my patch would probably not be accepted. I assume this
> kind of thing has to be done by someone a little closer to the project
> because it would modify so many things.

We don't work like that - anyone can have a patch accepted for any
part of the code, no matter how much previous experience they have.
One of the most complex patches we've ever dealt with (HOT) was
largely written by a new contributor.

> So I'm not really sure what to do. I've never contributed to anything
> before, and I've actually never even used CVS. I will probably start
> making changes for myself, but before I do I'd like to know if I
> should bother doing it in such a way that might be useful to the
> community.

You might prefer to learn git rather than CVS - it will probably make
life easier to keep your work in sync with CVS head through the use of
the git mirror.

Contributing is simple though. First, read the FAQ
(http://wiki.postgresql.org/wiki/Developer_FAQ). Then, tell us you're
working on the project, and start coding. Try to break the work down
into logical sections to aid reviewing and discussion. Post WIP
patches for people to look over, and don't be afraid to ask if you're
not sure about something.

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

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

Re: [pgus-general] Draft bylaws are now available

On Wed, 2008-07-02 at 13:05 -0700, Richard Broersma wrote:
> On Mon, Jun 16, 2008 at 10:58 AM, Joshua D. Drake <jd@commandprompt.com> wrote:
>
> Josh, How are thing progressing with USPA bylaws?

I actually just got word today from Greg (our attorney). I should have a
copy next week.

Sincerely,

Joshua D. Drake


>
>
> --
> Regards,
> Richard Broersma Jr.
>
> Visit the Los Angles PostgreSQL Users Group (LAPUG)
> http://pugs.postgresql.org/lapug
>


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

Re: [pgsql-es-ayuda] no repetir nombre

2008/7/2 Gunnar Wolf <gwolf@gwolf.org>:
> Alvaro Herrera dijo [Wed, Jul 02, 2008 at 12:48:36PM -0400]:
>> ¿No se la saben de memoria? Vaya. Acá todo el mundo se sabe al menos
>> la propia (yo personalmente me sé la mía, la de mi esposa, mi padre y mi
>> madre).
>>
>> Supongo que no es asunto tuyo hacer un cambio social para que cada uno
>> se las aprenda :-)
>
> En algunos países mal planeados, hemos tenido tantas identificaciones
> "únicas" en la historia que... ni nos preocupamos por aprenderla ;-)
> Además, por errores aún más estúpidos, por alguna razón algunas
> personas (como yo) fuimos registrados con más de una Clave Única de
> Registro Poblacional (en mi caso, WOIG760426HDFLSN02 y
> WOIG760426HDFLSN02). Pero claro, el CURP se usa aún relativamente
> poco, es mucho más común identificarte por el RFC (WOIG760427PC2), que
> -como fue creado hace muuuchos años, supongo que antes de que hubiera
> coordinación entre los Estados- registra demasiados duplicados. Pero
> bueno, el que llevo siempre conmigo (porque siempre pueden pedirte ver
> la identificación) es el registro electoral (clave WLISGN76042709H901
> folio 0000107555904 credencial 0359050023001 - En diferentes lugares
> he visto que usen los tres distintos números, no me pregunten la
> razón). Y claro, ahora que puse acá todos mis números, cualquierda de
> ustedes puede suplantar mi personalidad.
>
> Bah.
>
> --
> Gunnar Wolf - gwolf@gwolf.org - (+52-55)5623-0154 / 1451-2244
> PGP key 1024D/8BB527AF 2001-10-23
> Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
> --
> TIP 2: puedes desuscribirte de todas las listas simultáneamente
> (envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)
>

WOIG760426HDFLSN02 --> Ups grande ID por eso no se lo aprende nadie :0( ...


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

Re: [PATCHES] Explain XML patch v2

Peter Eisentraut wrote:
> Am Mittwoch, 2. Juli 2008 schrieb Tom Raney:
>
>> This is an update to my EXPLAIN XML patch submitted a few days ago.
>>
>
> Could you explain how you came up with the XML schema design? I suppose you
> just made something up that went along with the existing XML output.
>
Yes, it is based on the existing output.
> I would like to see more integration with the spirit of the existing XML
> functionality. For example, instead of things like
>
> "<runtime ms=\"%.3f\" />\n"
>
> we ought to be using XML Schema data types for time intervals and so on.
>
The DTD provides only rudimentary document validation but it has no
support for type checking. So, it may make sense to move to the more
rigorous XML Schema. There is a 'duration' data type that could be used
for the instance listed above. Or, we could define our own.
> We might also want to use an XML namespace.
>
Taking the 'ms' field listed above:
xmlns="http://www.postgresql.org/v8.4/ms" or something like this?
> Table and index names should be escaped using the existing escape mechanism
> for identifiers. There might also be encoding issues.
>
That's a good point. Or, wrap them with CDATA.
> It would also be interesting if EXPLAIN could optionally be a function that
> returns a datum of type XML, to allow further processing.
>
> Any thoughts on these issues?
>
I am in the process of writing a parser of this XML output for the Red
Hat Visual Explain tool. I want to see what surprises come up during
implementation.

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

Re: [pgus-general] Draft bylaws are now available

On Mon, Jun 16, 2008 at 10:58 AM, Joshua D. Drake <jd@commandprompt.com> wrote:

Josh, How are thing progressing with USPA bylaws?


--
Regards,
Richard Broersma Jr.

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

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

Re: [GENERAL] Memory use in 8.3 plpgsql with heavy use of xpath()

> I looked through the libxml2 sources a little bit but couldn't
> immediately find the problem. I'm fairly confident though that
> this could be reproduced outside Postgres, by replicating the sequence
> of libxml2 calls we make in xpath(). The next step should probably be
> to build a reproducer program and submit it to the libxml authors,
> or maybe run it under a debugging malloc package that could help
> identify where the leak is. Anyone want to do that?

Ugh, I'd love to give that a shot but that is a bit outside my comfort zone.

-- 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: [pgsql-es-ayuda] Seleccionar un esquema diferente al publico

Gracias amigos voy a probar sus recomendaciones y les cuento como me va, de antemano gracias a todos por responder.


> Subject: Re: [pgsql-es-ayuda] Seleccionar un esquema diferente al publico
> From: gilberto.castillo@etecsa.cu
> To: fsigu@hotmail.com
> Date: Wed, 2 Jul 2008 14:11:01 -0400
>
> Fernando:
>
> Echa un vistazo acá.
>
> Trabajando con esquemas.
> En ocasiones queremos llamar una tabla que está en un esquema
> determinado, pero sin poner el prefijo del esquema por ejemplo: select *
> from esquema1.tabla1; sino poner solamente select * from tabla1, para
> esto se puede decirle al usuario logeado el orden en que va a buscar en
> los esquemas:
>
> SET search_path TO esquema1,public;
>
> Para hacerlo permanente ponemos
>
> ALTER USER test SET search_path TO esquema1,public;
>
> Saludos,
> Gilberto.
>
> El mié, 02-07-2008 a las 16:01 +0000, Fernando Siguenza escribió:
> > Amigos , tengo unproblema he creado un esquema con nombre master,
> > donde tengomis tablas, me intento conectar con Npgsql y c#, pero no se
> > como perdefinir el esquema a usar en la cadena de conexion.
> > Para que me funcione tengo que poner el esquema en el select algo asi,
> > select * from master.clientes
> > pero lo que quiero es evitar eso y poder predefinir por default que el
> > esquema sea el master, y solo poner en la copnsulta select * from
> > clientes.
> > Alguien que me pueda ayudar, en la cadena de conexion he intentado
> > poner el parametro Schema=master, pero no funciona.
> >
> > Saludos
> >
> >
> > ______________________________________________________________________
> > Do more with your photos with Windows Live Photo Gallery. Get Windows
> > Live-Free
>


Do more with your photos with Windows Live Photo Gallery. Get Windows Live-Free

Re: [HACKERS] Commitfest status?

On Tue, Jul 1, 2008 at 4:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Well, it's July 1, and time for another commit fest to begin.
> Do we have all the submitted patches queued up at
> http://wiki.postgresql.org/wiki/CommitFest:2008-07 ?

we noticed the libpq events (hooks) patch was missing...so we duly added it :-).

merlin

--
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] Auto-explain patch

> Its certainly not useful to *me* in its current form. It would
> produce way to much (usless) output. However if it were tied to
> log_min_duration_statement so I get auto explains for long running
> queries... That would be very useful indeed. Even if it has to
> explain everything just to toss out the explain if it did not meet
> log_min_duration_statement. Unless I missed something and thats
> exactly what it does?

Thanks for the feedback. I agree, it does need a way to limit the
output, and target just the slow-running queries.

I also remember now the problem I had last time:- since this debug
output is produced at a lower level than the other statement logging
(so it can explain *all* SQL executed, not just top-level statements), it
is difficult to control using the normal statement logging parameters.

It would be easy to add another parameter, debug_explain_min_duration,
specific to this option, to limit it to slow low-level queries.

This would allow setting debug_explain_min_duration to be smaller than
log_min_duration_statement, which makes sense, since the latter
controls logging of top-level statements which may result in multiple
low-level queries.

Doing it this way would mean instrumenting all queries, but only
explaining the slow ones, when debug_explain_plan is on.
I'll have a play and see how it goes...

Regards, Dean

_________________________________________________________________
Live Search Charades - guess correctly and find hidden videos
http://www.searchcharades.com/
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Re: [PATCHES] Explain XML patch v2

On Wed, Jul 02, 2008 at 09:01:18AM -0700, David Fetter wrote:
> On Wed, Jul 02, 2008 at 05:57:29PM +0200, Peter Eisentraut wrote:
> > It would also be interesting if EXPLAIN could optionally be a
> > function that returns a datum of type XML, to allow further
> > processing.
>
> It would be better to have a function which allows people to plug in
> their own serialization. A JSON or YAML one, for example, would be
> much lighter weight on both ends.

+1 for either of these.

-dg

--
David Gould daveg@sonic.net 510 536 1443 510 282 0869
If simplicity worked, the world would be overrun with insects.

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

Re: [pgsql-es-ayuda] no repetir nombre

William:

No sé cuento cueste un escaner para tomar las huellas .... Ohhhhhhhh...
pero esa idea me gusta, solo le aportaría en mi caso tomar una foto la
cual se visualizaría en el auto completar y creo, que ya vamos
acorralado el problemilla.

Hmmmm .... como diría Alvaro ... ideas hay de sobra ahora que José
escoja.

Gilberto.
El mié, 02-07-2008 a las 14:21 -0500, William Diaz Pabón escribió:
> Hola.
>
> Si la idea es hacer un trabajo para tratar de contrarestar las
> inconsistencias en tu BD, y se tiene el problema de que las personas
> no portan su cedula, ni se saben de memoria el numero yo personalmente
> solucionaria el problema inclullendo en la BD algo que ellos siempre
> tienen con sigo y en la mayoria de los casos serian los dedos (en
> algunas personas como ami, nos hacen falta algunos), registrar con un
> huellador la huella del pasiente en la BD y asociarlo a un registro
> decliente que contenga preferiblemente los apellidos y nombres por
> separado (por ejemplo primer_nombre, segundo_nombre, primer_apellido,
> segundo_apellido) y en el momento de implementar esta solución,
> rellenar el formulario lo mas completamente posible y con inf real.
>
> Asi creo yo que seria lo mas acertado posible en este caso tan
> particular de tu ciudad.
> > > Date: Wed, 2 Jul 2008 12:48:36 -0400
> > > From: alvherre@commandprompt.com
> > > To: josefermin54@hotmail.com
> > > CC: jaleman@layconsa.com.pe; pgsql-es-ayuda@postgresql.org
> > > Subject: Re: [pgsql-es-ayuda] no repetir nombre
> > >
> > > José Fermín Francisco Ferreras escribió:
> > > > Gracias a los q han contestado, resulta q aquí
> (República
> > Dominicana)
> > > > cada persona tiene su Cédula d identificación personal,
> pero, aquí
> > en
> > > > mi país se da con mucha frecuencia q la gente no lleva
> la cédula
> > > > consigo y mucho menos se la sabe de memoria y entonces
> ese campo
> > se
> > > > quedará vacio por esa razón. Cómo laboro en un Hospital
> imaginense
> > > > ellos requieren q se trabaje lo mas pronto posible con
> ese
> > paciente.
> > >
> > > ¿No se la saben de memoria? Vaya. Acá todo el mundo se
> sabe al menos
> > > la propia (yo personalmente me sé la mía, la de mi esposa,
> mi padre
> > y mi
> > > madre).
> > >
> > > Supongo que no es asunto tuyo hacer un cambio social para
> que cada
> > uno
> > > se las aprenda :-)
> > >
> > > --
> > > Alvaro Herrera http://www.CommandPrompt.com/
> > > PostgreSQL Replication, Consulting, Custom Development,
> 24x7 support
> >
> >
> >
>
>
>
> --
> Cordialmente.
>
>
> William Diaz Pabón
> Gerente de Tecnología
> InfoTech Soluciones Ltda.
> Cel: 3173314172 - 3156396316
> Tunja - Boyacá - Colombia

--
TIP 8: explain analyze es tu amigo

Re: [HACKERS] A Windows x64 port of PostgreSQL

On Wed, Jul 2, 2008 at 9:09 AM, Bernd Helmle <mailings@oopsware.de> wrote:
> --On Mittwoch, Juli 02, 2008 07:39:29 -0400 Ken Camann <kjcamann@gmail.com>
> wrote:
>
>> I assume it would only really matter if you did this to
>> a pointer, and perhaps that is happening somewhere (but I doubt it
>> since postgres runs fine on 64-bit POSIX OSes). These would be easy
>> to fix, but very annoying given the number of them.
>
> At least, every Datum depends on something like that, see
> src/include/postgres.h:
>
> sizeof(Datum) == sizeof(long) >= sizeof(void *) >= 4

Oh I see. Between this and looking again at the warning list, I see
that it will probably take a lot more work than I thought. There are
about 450 occurrences of the assumption that sizeof(size_t) ==
sizeof(int). Many of them come from string functions, but many are in
important files like the tuplestore.c, bufpage.c, etc. I assume these
these would need to be checked very carefully, and probably by someone
who understands the internals better than I do.

I'd really like to help out with this, but I'm not sure I can work on
a patch even if I change these things for myself. Fixing this code
would touch a lot of important internals in postgres (albeit in a
small way), so my patch would probably not be accepted. I assume this
kind of thing has to be done by someone a little closer to the project
because it would modify so many things. On the other hand, if I just
do this for myself and don't share it then I lose x64 support again
when 8.4 comes out...and I really want the on-disk bitmap indices and
better partitioning (if the latter ends up coming).

So I'm not really sure what to do. I've never contributed to anything
before, and I've actually never even used CVS. I will probably start
making changes for myself, but before I do I'd like to know if I
should bother doing it in such a way that might be useful to the
community.

Thanks,
Ken

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

[pgsql-es-ayuda] como lenvantar pgsql 8.3 en linux ?

hola, que tal,

supongo que esto es muy sencillo pero hasta ahora no he podido levantar el pgsql, esta compilado e instalado en /usr/local/pgsql lo intente con postgres start, postmaster start, pg_ctl start y nada, ayer funcionaba perfectametne cree un usuario con password, y hoy al querer usar el  PhpPgAdmin no entraba con el usuario, entonces pense que era porque no levante el servicio como se hace con el apache,
hice:
$ /usr/local/pgsql/bin/postgres start     // no funciono
$ /usr/local/pgsql/bin/postmaster start     // no funciono
$ /usr/local/pgsql/bin/pg_ctl start     // tampoco

como se levanta el servicio de postgresql?
gracias de antemano por la ayuda,
saludos.

Re: [pgsql-es-ayuda] Re[2]: [pgsql-es-ayuda] Recomendación para desarrollar aplicación que necesita datos de dos bases distintas

José Luis:

Gracias .... Ahhhhh ya cojo el thread ... yo haría una salva de la BD o
de la Tabla que me interesa y la trasporto al otro servidor.

O se me ocurre pasarlo todo a una nueva versión de postgres y comenzar
las nuevas cosa allí junto a toda la data anterior.

Bueno es tan solo una idea de reunificar y reutilizar la información de
la data.

Gilberto.
El mié, 02-07-2008 a las 16:11 -0300, Jose Luis Balle escribió:
> Si las conozco, muchas gracias Gilberto.
> No obstante desde el punto de vista de la documentación, orden,
> estructura, conformación de la base de datos, a "mi" manera de ver,
> cada cosa iría en un esquema que indique de que se trata, en el
> público solo aquellas tablas genericas, compartidas por cualquier
> aplicación, ej: paises, provincias, tipo_de_documento, etc. pero solo
> a nivel teorico, es como un grano en la frente, en la práctica las
> tablas pueden estar todas en el esquema público con un prefijo en el
> nombre y ya. Pero para eso están los esquemas.
> De todas formas, no es el punto del thread que inició Laura.
> Resumiendo, Laura:
> - Puedes usar un schema "encuestas" en la base de datos "academicos".
> - Puedes usar dblink en la base de datos "encuestas" para crear una
> vista a las tablas de la base de datos "academicos", aunque esta es
> desaconsejada por gente del foro que tiene muchas experiencia como
> Alvaro.
> - Puedes crear las tablas en la base de datos "estadísticas" y correr
> un script de sincronización. (menos recomendable aún)
> Saludos.
> José Luis
>
> El día 2 de julio de 2008 15:08, Gilberto Castillo Martínez
> <gilberto.castillo@etecsa.cu> escribió:
> > José Luis:
> >
> > Te dejo unas notas de como trabajar con esquemas si interferir en las
> > aplicaciones... espero te ayude.
> >
> > Trabajando con esquemas.
> > En ocasiones queremos llamar una tabla que está en un esquema
> > determinado, pero sin poner el prefijo del esquema por ejemplo: select *
> > from esquema1.tabla1; sino poner solamente select * from tabla1, para
> > esto se puede decirle al usuario logeado el orden en que va a buscar en
> > los esquemas:
> >
> > SET search_path TO esquema1,public;
> >
> > Para hacerlo permanente ponemos
> >
> > ALTER USER test SET search_path TO esquema1,public;
> >
> > Saludos,
> > Gilberto.
> >
> > El mié, 02-07-2008 a las 12:31 -0300, Jose Luis Balle escribió:
> >> Desordenar en el sentido de que la base de datos original no contempla
> >> esquemas, es como si a la base de datos recursos humanos que reside en
> >> el esquema publico le pongo un esquema inspecciones para poder tomar
> >> los datos del personal.
> >> Por ahí me cuesta tomar el esquema público como un esquema más, no se,
> >> pero para utilizar esquemas y que quede prolijo (algo muy subjetivo)
> >> el diseño debería haber arrancado con esquemas, si ya tiene todo
> >> armado en el público cuando las tablas no son de acceso publico... en
> >> fin, algo muy subjetivo y tal vez no viene al caso.
> >>
> >> El día 2 de julio de 2008 12:02, Alvaro Herrera
> >> <alvherre@commandprompt.com> escribió:
> >> > Jose Luis Balle escribió:
> >> >> Alvaro, se que es incomodo el dblink, pero se justifica desordenar el
> >> >> esquema de la base de datos de los alumnos solo para poder tomar
> >> >> identificadores aislados como materia, alumno,etc?
> >> >
> >> > ¿Desordenar el esquema en qué sentido?
> >> >
> >> >> Si luego quisieran explotar la información de estadísticas sin afectar
> >> >> el rendimiento de academicos...
> >> >
> >> > En ese caso lo ideal es sacar los datos a una réplica y ejecutar los
> >> > procesos de reporte en la réplica.
> >> >
> >> >> Con los esquemas quedaría la base de datos "academicos" con un esquema
> >> >> "estadisticas" dentro, entonces en el esquema público tendría todas
> >> >> las tablas de academicos que utilizas actualmente y en el esquema
> >> >> "estadísticas" solo las que va a utilizar ahora.
> >> >
> >> > No veo en qué sentido eso sea un problema.
> >> >
> >> > --
> >> > Alvaro Herrera

http://www.CommandPrompt.com/
> >> > The PostgreSQL Company - Command Prompt, Inc.
> >> >
> >>
> >>
> >>
> >
> >
>
>
>
> --
> Informático:
> Persona falta de recursos que, partiendo de premisas falsas y de
> especificaciones inconsistentes e incompletas, dirigido por
> incompetentes y utilizando herramientas que no funcionan es capaz de
> iniciar un proyecto de dudoso éxito realizando una obra de arte que
> ,por supuesto, es cara y no tiene otro fin que dar prestigio a la
> empresa que ha contratado sus servicios.
> http://islamanzana.es/desarrollo-de-software/definicion-de-informatico
> --
> TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán
>

--
TIP 2: puedes desuscribirte de todas las listas simult�neamente
(env�a "unregister TuDirecci�nDeCorreo" a majordomo@postgresql.org)

Re: [ADMIN] Postgres windows service shutdowns after start

Wow, thanks)

Igor Neyman wrote:
>
> "stats_start_collector" is an obsolete parameter in 8.3, that's why PG
> wouldn't start with it.
>
> Igor
>
>
>
>

--
View this message in context: http://www.nabble.com/Postgres-windows-service-shutdowns-after-start-tp18244024p18244955.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


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

[lapug] July's LAPUG meeting

Would anyone disagree to having the next Lapug meeting at the City of
Garden Groves Youth Center?

--
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: [pgsql-es-ayuda] no repetir nombre

Hola.

Si la idea es hacer un trabajo para tratar de contrarestar las inconsistencias en tu BD, y se tiene el problema de que las personas no portan su cedula, ni se saben de memoria el numero yo personalmente solucionaria el problema inclullendo en la BD algo que ellos siempre tienen con sigo y en la mayoria de los casos serian los dedos (en algunas personas como ami, nos hacen falta algunos), registrar con un huellador la huella del pasiente en la BD y asociarlo a un registro decliente que contenga preferiblemente los apellidos y nombres por separado (por ejemplo primer_nombre, segundo_nombre, primer_apellido, segundo_apellido) y en el momento de implementar esta solución, rellenar el formulario lo mas completamente posible y con inf real.

Asi creo yo que seria lo mas acertado posible en este caso tan particular de tu ciudad.
> > Date: Wed, 2 Jul 2008 12:48:36 -0400
> > From: alvherre@commandprompt.com
> > To: josefermin54@hotmail.com
> > CC: jaleman@layconsa.com.pe; pgsql-es-ayuda@postgresql.org
> > Subject: Re: [pgsql-es-ayuda] no repetir nombre
> >
> > José Fermín Francisco Ferreras escribió:
> > > Gracias a los q han contestado, resulta q aquí (República
> Dominicana)
> > > cada persona tiene su Cédula d identificación personal, pero, aquí
> en
> > > mi país se da con mucha frecuencia q la gente no lleva la cédula
> > > consigo y mucho menos se la sabe de memoria y entonces ese campo
> se
> > > quedará vacio por esa razón. Cómo laboro en un Hospital imaginense
> > > ellos requieren q se trabaje lo mas pronto posible con ese
> paciente.
> >
> > ¿No se la saben de memoria? Vaya. Acá todo el mundo se sabe al menos
> > la propia (yo personalmente me sé la mía, la de mi esposa, mi padre
> y mi
> > madre).
> >
> > Supongo que no es asunto tuyo hacer un cambio social para que cada
> uno
> > se las aprenda :-)
> >
> > --
> > Alvaro Herrera http://www.CommandPrompt.com/
> > PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
>
>


--
Cordialmente.


William Diaz Pabón
Gerente de Tecnología
InfoTech Soluciones Ltda.
Cel: 3173314172 - 3156396316
Tunja - Boyacá - Colombia

Re: [HACKERS] [WIP] patch - Collation at database level

My patch should be "sort of" wrapper that will implement guts for further development (collation at column level) like catalogs, creating collations etc. When creating collation user will be able to choose which function to use (by statement STRCOLFN - not in SQL standard). In the first stage I'll implement function that will use system locales. Adding ICU or any other library won't be that big deal.

Radek Strnad


On Wed, Jul 2, 2008 at 8:22 PM, Gregory Stark <stark@enterprisedb.com> wrote:
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Why does a collation have a schema?
>
> Because the SQL spec says so.  Also, if we don't put them in schemas,
> we have no nice way to distinguish built-in and user-defined collations,
> which creates a problem for pg_dump.

Out of curiosity, what is a "user-defined collation"? Are there SQL statements
to go around declaring what order code points should be sorted in? That seems
like it would be... quite tedious!

--
 Gregory Stark
 EnterpriseDB          http://www.enterprisedb.com
 Ask me about EnterpriseDB's Slony Replication support!

Re: [HACKERS] PATCH: CITEXT 2.0

> I went through your code and I have following comments/questions:

one more comment:

7) Hash opclass is absent. Hash opclass framework is used for hash join.


--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

--
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] no repetir nombre

La idea de Alvaro de separar nombres y apellidos es muy buena, podría
completarla incluyendo la fecha de nacimiento del individuo, eso
minimiza la población de individuos que se llamen "Juán Perez" y hayan
nacido el mismo día.
De todas formas dependes de la buena voluntad del usuario y ya sabemos
a donde lleva eso....
Exitos


El día 2 de julio de 2008 15:17, Gilberto Castillo Martínez
<gilberto.castillo@etecsa.cu> escribió:
> José Fermín:
>
> Puede ser muchos más engorroso, pero te sugiero uses auto-completamiento
> en los formulario, así los que entran los datos no cometan tantos
> equívocos.
>
> Saludos,
> Gilberto.
> El mié, 02-07-2008 a las 17:06 +0000, José Fermín Francisco Ferreras
> escribió:
>> Asi es mi colegas aquí las cosas son mas complejas q en otros sitios,
>> yo he pensado ponerle un campo q tome el pasaporte, pero, aquí la gran
>> mayoría d las personas no tiene pasaporte.
>>
>> Mientras tanto lo unico q me queda es decir a las personas encargadas
>> d crear a los clientes es q busquen bien y se aseguren d q el cliente
>> está creado o no.
>>
>> Cualquier otras sugerencias seré todo oidos.
>>
>>
>>
>> <html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>
>>
>>
>>
>> ______________________________________________________________________
>>
>> > Date: Wed, 2 Jul 2008 12:48:36 -0400
>> > From: alvherre@commandprompt.com
>> > To: josefermin54@hotmail.com
>> > CC: jaleman@layconsa.com.pe; pgsql-es-ayuda@postgresql.org
>> > Subject: Re: [pgsql-es-ayuda] no repetir nombre
>> >
>> > José Fermín Francisco Ferreras escribió:
>> > > Gracias a los q han contestado, resulta q aquí (República
>> Dominicana)
>> > > cada persona tiene su Cédula d identificación personal, pero, aquí
>> en
>> > > mi país se da con mucha frecuencia q la gente no lleva la cédula
>> > > consigo y mucho menos se la sabe de memoria y entonces ese campo
>> se
>> > > quedará vacio por esa razón. Cómo laboro en un Hospital imaginense
>> > > ellos requieren q se trabaje lo mas pronto posible con ese
>> paciente.
>> >
>> > ¿No se la saben de memoria? Vaya. Acá todo el mundo se sabe al menos
>> > la propia (yo personalmente me sé la mía, la de mi esposa, mi padre
>> y mi
>> > madre).
>> >
>> > Supongo que no es asunto tuyo hacer un cambio social para que cada
>> uno
>> > se las aprenda :-)
>> >
>> > --
>> > Alvaro Herrera http://www.CommandPrompt.com/
>> > PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>>
>>
>>
>> ______________________________________________________________________
>> Do more with your photos with Windows Live Photo Gallery. Get Windows
>> Live-Free
>
> --
> TIP 8: explain analyze es tu amigo
>
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [GENERAL] Delete from Join

 --- On Wed, 7/2/08, Gwyneth Morrison <postgres@toadware.ca> wrote:  
> From: Gwyneth Morrison <postgres@toadware.ca> > Subject: [GENERAL] Delete from Join > To: pgsql-general@postgresql.org > Date: Wednesday, July 2, 2008, 3:15 PM > Hello, >  > Is it possible to use a join keyword in a delete? >  > For example: >  >      DELETE FROM data_table1 >                 using data_table2 INNER JOIN >                         data_table1  ON data_table1.fkey = > data_table2.pkey; >  >  > It is not directly mentioned in the delete syntax but the > delete refers  > to the select clause where JOIN is valid. >  > G >                  
 >i have a example  >delete from t1 a using t2 b where a.id = b.oid  >A standard way to do it is  >delete from t1 a where id in (select a.id from t1 a inner join t2 b on (a.id = b.oid))    Thank you for your reply,   You are absolutely correct, it IS the standard way.   What I am actually trying to do here is write a program to convert MS SQL to Postgres. I have had quite a bit of success so far, but this is a sticking point.   Apparently using the JOIN keyword directly in a delete statement is valid in MS. I am trying to determine if it is valid in postgres which I figure it is not but cannot  find it exactly in the documentation.   So I guess the real question is, can the JOIN keyword be used directly in a delete as above.  G   
-- 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] [WIP] patch - Collation at database level

On Wed, Jul 02, 2008 at 07:22:10PM +0100, Gregory Stark wrote:
> > Because the SQL spec says so. Also, if we don't put them in schemas,
> > we have no nice way to distinguish built-in and user-defined collations,
> > which creates a problem for pg_dump.
>
> Out of curiosity, what is a "user-defined collation"? Are there SQL statements
> to go around declaring what order code points should be sorted in? That seems
> like it would be... quite tedious!

Not that we'll ever use it, but ICU for example allows users to say:
"use collation X but move this code point somewhere else", essentially
allowing users tweak the collation on a small scale. In any case,
whatever collation library is used, we're unlikely to predefine every
possible collation in the system, there's too many (assuming they're
denumerable).

Have a niceday,
--
Martijn van Oosterhout <kleptog@svana.org>

http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Re: [pgsql-es-ayuda] Re[2]: [pgsql-es-ayuda] Recomendación para desarrollar aplicación que necesita datos de dos bases distintas

Si las conozco, muchas gracias Gilberto.
No obstante desde el punto de vista de la documentación, orden,
estructura, conformación de la base de datos, a "mi" manera de ver,
cada cosa iría en un esquema que indique de que se trata, en el
público solo aquellas tablas genericas, compartidas por cualquier
aplicación, ej: paises, provincias, tipo_de_documento, etc. pero solo
a nivel teorico, es como un grano en la frente, en la práctica las
tablas pueden estar todas en el esquema público con un prefijo en el
nombre y ya. Pero para eso están los esquemas.
De todas formas, no es el punto del thread que inició Laura.
Resumiendo, Laura:
- Puedes usar un schema "encuestas" en la base de datos "academicos".
- Puedes usar dblink en la base de datos "encuestas" para crear una
vista a las tablas de la base de datos "academicos", aunque esta es
desaconsejada por gente del foro que tiene muchas experiencia como
Alvaro.
- Puedes crear las tablas en la base de datos "estadísticas" y correr
un script de sincronización. (menos recomendable aún)
Saludos.
José Luis

El día 2 de julio de 2008 15:08, Gilberto Castillo Martínez
<gilberto.castillo@etecsa.cu> escribió:
> José Luis:
>
> Te dejo unas notas de como trabajar con esquemas si interferir en las
> aplicaciones... espero te ayude.
>
> Trabajando con esquemas.
> En ocasiones queremos llamar una tabla que está en un esquema
> determinado, pero sin poner el prefijo del esquema por ejemplo: select *
> from esquema1.tabla1; sino poner solamente select * from tabla1, para
> esto se puede decirle al usuario logeado el orden en que va a buscar en
> los esquemas:
>
> SET search_path TO esquema1,public;
>
> Para hacerlo permanente ponemos
>
> ALTER USER test SET search_path TO esquema1,public;
>
> Saludos,
> Gilberto.
>
> El mié, 02-07-2008 a las 12:31 -0300, Jose Luis Balle escribió:
>> Desordenar en el sentido de que la base de datos original no contempla
>> esquemas, es como si a la base de datos recursos humanos que reside en
>> el esquema publico le pongo un esquema inspecciones para poder tomar
>> los datos del personal.
>> Por ahí me cuesta tomar el esquema público como un esquema más, no se,
>> pero para utilizar esquemas y que quede prolijo (algo muy subjetivo)
>> el diseño debería haber arrancado con esquemas, si ya tiene todo
>> armado en el público cuando las tablas no son de acceso publico... en
>> fin, algo muy subjetivo y tal vez no viene al caso.
>>
>> El día 2 de julio de 2008 12:02, Alvaro Herrera
>> <alvherre@commandprompt.com> escribió:
>> > Jose Luis Balle escribió:
>> >> Alvaro, se que es incomodo el dblink, pero se justifica desordenar el
>> >> esquema de la base de datos de los alumnos solo para poder tomar
>> >> identificadores aislados como materia, alumno,etc?
>> >
>> > ¿Desordenar el esquema en qué sentido?
>> >
>> >> Si luego quisieran explotar la información de estadísticas sin afectar
>> >> el rendimiento de academicos...
>> >
>> > En ese caso lo ideal es sacar los datos a una réplica y ejecutar los
>> > procesos de reporte en la réplica.
>> >
>> >> Con los esquemas quedaría la base de datos "academicos" con un esquema
>> >> "estadisticas" dentro, entonces en el esquema público tendría todas
>> >> las tablas de academicos que utilizas actualmente y en el esquema
>> >> "estadísticas" solo las que va a utilizar ahora.
>> >
>> > No veo en qué sentido eso sea un problema.
>> >
>> > --
>> > Alvaro Herrera

http://www.CommandPrompt.com/
>> > The PostgreSQL Company - Command Prompt, Inc.
>> >
>>
>>
>>
>
>

--
Informático:
Persona falta de recursos que, partiendo de premisas falsas y de
especificaciones inconsistentes e incompletas, dirigido por
incompetentes y utilizando herramientas que no funcionan es capaz de
iniciar un proyecto de dudoso éxito realizando una obra de arte que
,por supuesto, es cara y no tiene otro fin que dar prestigio a la
empresa que ha contratado sus servicios.
http://islamanzana.es/desarrollo-de-software/definicion-de-informatico
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [PERFORM] Select running slow on Postgres

On Wed, Jul 2, 2008 at 1:01 PM, samantha mahindrakar
<sam.mahindrakar@gmail.com> wrote:
> I ran the explain analyze.Here is what i got:
>
>
> "Group (cost=112266.37..112266.40 rows=1 width=56) (actual
> time=5583.399..5615.476 rows=13373 loops=1)"
> " -> Sort (cost=112266.37..112266.38 rows=1 width=56) (actual
> time=5583.382..5590.890 rows=13373 loops=1)"
> " Sort Key: lane_data_07_08.lane_id,
> lane_data_07_08.measurement_start, lane_data_07_08.measurement_end,
> lane_data_07_08.speed, lane_data_07_08.volume, lane_data_07_08.occupancy,
> lane_data_07_08.quality, lane_data_07_08.effective_date"
> " -> Nested Loop IN Join (cost=0.00..112266.36 rows=1 width=56)
> (actual time=1100.307..5547.768 rows=13373 loops=1)"
> " -> Seq Scan on lane_data_07_08 (cost=0.00..112241.52 rows=3
> width=56) (actual time=1087.666..5341.662 rows=20581 loops=1)"

You can see here that the seq scan on lane_data is what's eating up
all your time. Also, since the row estimate is WAY off, it then chose
a nested loop thinking it would be joining up only 1 row and actually
running across 20k rows.

> " Filter: (((volume = 255::double precision) OR (speed =
> 255::double precision) OR (occupancy = 255::double precision) OR (occupancy
>>= 100::double precision) OR (volume > 52::double precision) OR (volume <
> 0::double precision) OR (speed > 120::double precision) OR (speed <
> 0::double precision)) AND (date_part('hour'::text, measurement_start) >=
> 5::double precision) AND (date_part('hour'::text, measurement_start) <=
> 23::double precision) AND (date_part('day'::text, measurement_start) =
> 1::double precision))"
> " -> Index Scan using lane_info_pk on
> lane_info (cost=0.00..8.27 rows=1 width=4) (actual time=0.007..0.007 rows=1
> loops=20581)"
> " Index Cond: (lane_data_07_08.lane_id =
> lane_info.lane_id)"
> " Filter: (inactive IS NULL)"
> "Total runtime: 5621.409 ms"
>
>
> Well instaed of creating extra indexes (since they eat up lot of space) i
> made use of the whole measurement_start field, so thet it uses the index
> proeprty and makes the search faster.
> So i changed the query to include the measuerment start as follows:
>
> SELECT lane_id,measurement_start,
> measurement_end,speed,volume,occupancy,quality,effective_date
> FROM tss.lane_data_06_08
> WHERE lane_id in(select lane_id from lane_info where inactive is null )
> AND measurement_start between '2008-06-30 05:00:00-04' AND '2008-06-30
> 23:00:00-04'
> GROUP BY
> lane_id,measurement_start,measurement_end,speed,volume,occupancy,quality,effective_date
> ORDER BY lane_id, measurement_start

Yeah, anytime you can just compare date / timestamp on an indexed
field you'll do better. If you find yourself needing to use the other
syntax, so you can, for instance, grab the data for 5 days in a row
from 5am to 11am or something, then the method I mentioned of making
indexes on date_part are a good choice. Note that you need regular
timestamp, not timstamptz to create indexes.

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

Re: [ADMIN] Postgres windows service shutdowns after start

"stats_start_collector" is an obsolete parameter in 8.3, that's why PG
wouldn't start with it.

Igor

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of bogdad
Sent: Wednesday, July 02, 2008 2:38 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Postgres windows service shutdowns after start


Hi,

I have a postgres 8.3 service working on win2003 server, it works fine.

But, when i alter postgresql.conf adding the stats_starts_collector = on
( or even false, which bugs me to the end) the service starts and
immedeately stops. If I revert the change, service works again.

The event log is clear, the pg_log is empty.

My login is local admin, and due to restrictions in environment, i
currently cannot runas /user:postgres posmaster.exe to retrieve the
stderr or stdout of postgres.

So the questions:

1) Is it really connected to stats collector? [ the part in brackets
makes me think it's not]
2) Maybe, there is a forsaken way for admin user to run postgres?
3) How to proceed?
4) Is there a way to syntax check .conf?

(I know that I can send the .conf home and run postgres there, but don't
like this option)

Thanks in advance,
Vladimir.
--
View this message in context:
http://www.nabble.com/Postgres-windows-service-shutdowns-after-start-tp1
8244024p18244024.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


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


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

Re: [PERFORM] Select running slow on Postgres

I ran the explain analyze.Here is what i got:


"Group  (cost=112266.37..112266.40 rows=1 width=56) (actual time=5583.399..5615.476 rows=13373 loops=1)"
"  ->  Sort  (cost=112266.37..112266.38 rows=1 width=56) (actual time=5583.382..5590.890 rows=13373 loops=1)"
"        Sort Key: lane_data_07_08.lane_id, lane_data_07_08.measurement_start, lane_data_07_08.measurement_end, lane_data_07_08.speed, lane_data_07_08.volume, lane_data_07_08.occupancy, lane_data_07_08.quality, lane_data_07_08.effective_date"
"        ->  Nested Loop IN Join  (cost=0.00..112266.36 rows=1 width=56) (actual time=1100.307..5547.768 rows=13373 loops=1)"
"              ->  Seq Scan on lane_data_07_08  (cost=0.00..112241.52 rows=3 width=56) (actual time=1087.666..5341.662 rows=20581 loops=1)"
"                    Filter: (((volume = 255::double precision) OR (speed = 255::double precision) OR (occupancy = 255::double precision) OR (occupancy >= 100::double precision) OR (volume > 52::double precision) OR (volume < 0::double precision) OR (speed > 120::double precision) OR (speed < 0::double precision)) AND (date_part('hour'::text, measurement_start) >= 5::double precision) AND (date_part('hour'::text, measurement_start) <= 23::double precision) AND (date_part('day'::text, measurement_start) = 1::double precision))"
"              ->  Index Scan using lane_info_pk on lane_info  (cost=0.00..8.27 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=20581)"
"                    Index Cond: (lane_data_07_08.lane_id = lane_info.lane_id)"
"                    Filter: (inactive IS NULL)"
"Total runtime: 5621.409 ms"


Well instaed of creating extra indexes (since they eat up lot of space) i made use of the whole measurement_start field, so thet it uses the index proeprty and makes the search faster.
So i changed the query to include the measuerment start as follows:

SELECT lane_id,measurement_start,
measurement_end,speed,volume,occupancy,quality,effective_date
FROM tss.lane_data_06_08
WHERE lane_id in(select lane_id from lane_info where inactive is  null )
AND measurement_start between '2008-06-30 05:00:00-04' AND  '2008-06-30 23:00:00-04'
GROUP BY lane_id,measurement_start,measurement_end,speed,volume,occupancy,quality,effective_date
ORDER BY lane_id, measurement_start


Samantha

On 7/1/08, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Tue, Jul 1, 2008 at 1:29 PM, samantha mahindrakar
> <sam.mahindrakar@gmail.com> wrote:
> > Hi
> > I have a select statement that runs on a partition having say couple
> > million rows.
> > The tabel has indexes on two colums. However the query uses the
> > non-indexed colums too in its where clause.
> > For example:
> > SELECT lane_id,measurement_start,
> > measurement_end,speed,volume,occupancy,quality,effective_date
> >  FROM tss.lane_data_06_08
> >  WHERE lane_id in(select lane_id from lane_info where inactive is  null )
> >  AND date_part('hour', measurement_start) between 5 and 23
> >  AND date_part('day',measurement_start)=30
> > GROUP BY lane_id,measurement_start,measurement_end,speed,volume,occupancy,quality,effective_date
> > ORDER BY lane_id, measurement_start
> >
> > out of this only lane_id and mesaurement_start are indexed. This query
> > will return around 10,000 rows. But it seems to be taking a long time
> > to execute which doesnt make sense for a select statement. It doesnt
> > make any sense to create index for every field we are gonna use in tne
> > where clause.
> > Isnt there any way we can improve the performance?
>
> I'm guessing that adding an index for either
> date_part('hour',measurement_start) or
> date_part('day',measurement_start) or both would help.
>
> What does explain analyze select ... (rest of query here) say?
>

[ADMIN] Postgres windows service shutdowns after start

Hi,

I have a postgres 8.3 service working on win2003 server,
it works fine.

But, when i alter postgresql.conf adding the stats_starts_collector = on (
or even false, which bugs me to the end) the service starts and immedeately
stops. If I revert the change, service works again.

The event log is clear, the pg_log is empty.

My login is local admin, and due to restrictions in environment, i currently
cannot runas /user:postgres posmaster.exe to retrieve the stderr or stdout
of postgres.

So the questions:

1) Is it really connected to stats collector? [ the part in brackets makes
me think it's not]
2) Maybe, there is a forsaken way for admin user to run postgres?
3) How to proceed?
4) Is there a way to syntax check .conf?

(I know that I can send the .conf home and run postgres there,
but don't like this option)

Thanks in advance,
Vladimir.
--
View this message in context: http://www.nabble.com/Postgres-windows-service-shutdowns-after-start-tp18244024p18244024.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


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

Re: [pgsql-es-ayuda] no repetir nombre

Alvaro Herrera dijo [Wed, Jul 02, 2008 at 12:48:36PM -0400]:
> ¿No se la saben de memoria? Vaya. Acá todo el mundo se sabe al menos
> la propia (yo personalmente me sé la mía, la de mi esposa, mi padre y mi
> madre).
>
> Supongo que no es asunto tuyo hacer un cambio social para que cada uno
> se las aprenda :-)

En algunos países mal planeados, hemos tenido tantas identificaciones
"únicas" en la historia que... ni nos preocupamos por aprenderla ;-)
Además, por errores aún más estúpidos, por alguna razón algunas
personas (como yo) fuimos registrados con más de una Clave Única de
Registro Poblacional (en mi caso, WOIG760426HDFLSN02 y
WOIG760426HDFLSN02). Pero claro, el CURP se usa aún relativamente
poco, es mucho más común identificarte por el RFC (WOIG760427PC2), que
-como fue creado hace muuuchos años, supongo que antes de que hubiera
coordinación entre los Estados- registra demasiados duplicados. Pero
bueno, el que llevo siempre conmigo (porque siempre pueden pedirte ver
la identificación) es el registro electoral (clave WLISGN76042709H901
folio 0000107555904 credencial 0359050023001 - En diferentes lugares
he visto que usen los tres distintos números, no me pregunten la
razón). Y claro, ahora que puse acá todos mis números, cualquierda de
ustedes puede suplantar mi personalidad.

Bah.

--
Gunnar Wolf - gwolf@gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
--
TIP 2: puedes desuscribirte de todas las listas simultáneamente
(envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)

[GENERAL] SET CLIENT_ENCODING

Hallo,

I would to ask about function (vide subject) transcoding the characters
between different character pages "on the fly": is it smart enough to skip
any transcoding operation, when both client and database are set to use
the same encoding already?

To make it more clear: I've got an application, which always uses LATIN2
encoding, and wants database using this encoding. Unfortunately, some
Postgres packages allow to set it - but some are "UTF-8 only". I'm wondering,
whether can I add into application command "SET CLIENT_ENCODING TO 'LATIN2';"
for steady, or it should be kept optional?

I would to avoid situation, when Postgres will transcode "from LATIN2 to
LATIN2". Perhaps someone knows the details, how is it working in practice?
--
pozdrawiam / regards

Zbigniew Baniewski

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