Saturday, June 14, 2008

Re: [pgsql-es-ayuda] Rendimiento sin COMMIT

On Fri, Jun 13, 2008 at 12:19 PM, jcb <jcb@greccosoft.es> wrote:
> update dw21vent set ... where current of jcb;
>
> Esto aqui deberia de funcionar segun la documentacion, en el
> capitulo 38.7.3.3. UPDATE/DELETE WHERE CURRENT OF
> , pero tambien hace referecncia al declare del cursor ,
> de hay he sacado la ocurrencia de declare anterior
>

estas usando 8.3, verdad? hice la prueba y me funciono muy bien...

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [pgsql-es-ayuda] Rendimiento sin COMMIT

On Fri, Jun 13, 2008 at 10:28 AM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Juan Carlos Barranco de Paz escribió:
>
>> Pero quiero probar modificar mediante un cursor pero me esto volviendo loco
>> con la definición, no se donde esta mal :
>>
>> CREATE OR REPLACE FUNCTION prueba_1(dw01 dw01conf)
>> RETURNS smallint AS
>> $BODY$
>> DECLARE
>> jcb cursor for select *
>> from dw21vent
>> where empresa = dw01.empresa
>> order by empresa,articulo,tiempo for update;
>
> No puedes usar cursores directamente.
>

?? porque?? me estoy perdiendo algo??


--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?

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

[GENERAL] Need Tool to sync databases with 8.3.1

All,

I used to rave about how great the EMS PostgreSQL tools were, but lately
I've been disappointed by the lack of support for their Database
Comparer 2007 for PostgreSQL.

I need a tool that will compare 2 database schemas and allow me to
migrate changes from one database to another. What tools do the rest of
you use to accomplish this task?

As the name suggests, Database Comparer 2007 for PostgreSQL seems to
have stopped development some time back in 2007 and it will not work
with PostgreSQL 8.3+. In addition, several of the bugs I encounter with
8.2.4 databases make it a show stopper there too.

I don't know how else to best accomplish my goals other than dumping 2
schemas, running a diff and manually syncing the 2 until the diffs go away.

Suggestions for alternatives? I don't mind spending money if it'll get
the job done.

-- Dante

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

[pgsql-es-ayuda] Consulta con Condicionales

Hola, buen día:

Estoy tratando de hacer una consulta con condiciones a la DB, pero por
el momento, no he encontrado la forma de hacerlo.

Explico:

Quiero tomar el conteo de cierta consulta, y en esa misma consulta,
hacer un "Case" que use la siguiente condición:

Si Conteo Mayor a 0 = True
Si conteo Menor o igual a 0 = False

La query que he tratado de hacer, sin resultado alguno, es la siguiente

-------------------------------------------------------------------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SELECT COUNT( * ) AS cte FROM rde1 WHERE id = x AND group_id = y, CASE
WHEN cte > 0 THEN true ELSE false END AS result;

-- -> Primera Consulta
xx -> Segunda consulta


Les agradecería la ayuda que pudieran proporcionarme

Saludos

biz004
--
TIP 7: no olvides aumentar la configuración del "free space map"

Re: [pgus-board] [Fwd: Re: [pgus-general] PgUS bylaws]

Sorry, this message was stalled out for a while for some reason...

On Tue, Jun 10, 2008 at 9:29 AM, Joshua D. Drake <jd@commandprompt.com> wrote:
> What did I do wrong?

My *guess* is that he is referring to the fact that you said 'we'
indicating that you're speaking for both Michael and I.

Generally - when talking to community members, it is probably better
to use pronouns that say you're speaking for yourself, rather than the
organization to avoid the impression that Michael and I (and future
board members) do not have voices.

My second guess is that using the words "appreciate" and "feedback"
can be interpreted sarcastically, even if you didn't mean them that
way. A simple 'thanks - here's my response.." is probably more what
Josh is looking for.

-selena

>
> ---------- Forwarded message ----------
> From: Josh Berkus <josh@agliodbs.com>
> To: "Joshua D. Drake" <jd@commandprompt.com>
> Date: Tue, 10 Jun 2008 08:48:45 -0700
> Subject: Re: [pgus-general] PgUS bylaws
> Josh,
>
>> We appreciate your feedback, thanks!
>
> Dude, are you *trying* to undermine yourself? This sort of language (which
> you've been using consistently on this list) really reenforces the *general*
> community belief (per overheard at pgCon) that PGUS is the "Josh Drake
> Foundation".
>
> I'd like to see PGUS be successful. But you're making it hard.
>
> --
> Josh Berkus
> PostgreSQL @ Sun
> San Francisco
>
>
>
> --
> Sent via pgus-board mailing list (pgus-board@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgus-board
>
>

--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

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

Re: [pgsql-advocacy] Booth Swag

On Sat, Jun 14, 2008 at 3:21 PM, Andreas 'ads' Scherbaum
<adsmail@wars-nicht.de> wrote:
> On Tue, 10 Jun 2008 22:47:25 -0700 gabrielle wrote:
>
>> On Tue, Jun 10, 2008 at 8:47 PM, Michael Alan Brewer <mbrewer@gmail.com> wrote:
>> > I'd love to see oval, Euro-style stickers with either "PG", "PgSQL",
>> > or "psql" on them; those, plus temporary tattoos of our elephant logo
>> > should work.
>>
>> Ooh, I like that sticker idea. We had elephant logo stickers at LFNW.
>
> Like the stickers we had at FOSDEM earlier this year?
> I have two sheets, one with white and one with silver background, both
> have an elephant on them.
>
> Nobody wanted this stickers ...

I never saw the FOSDEM ones! Can you send me a link or the art for them?

My plan is to make ones like these, but with the elephant on them:

http://skitch.com/selena/pstf/photo-50

These are from the JPUG.

They also made pink ones, and I've had an easy time giving these away
here in Portland at all kinds of geek meetings.

-selena

--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

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

Re: [GENERAL] functions, selects and the planner

"Matthew Dennis" <mdennis@merfer.net> writes:
> My question is when is the "select into _data" query planned/replanned? I'm
> concerned that the query might only be planned once (e.g. the first time
> it's executed or when the function is first defined) and cached
> indefinitely. The table t is initially empty, but grows at a fairly steady
> rate over time. So if the table is essentially empty when the query is
> planned, a seqscan is certainly what the planner would do. However, as time
> goes on and table t is filled with data and the stats change, will the query
> eventually be replanned?

In 8.3, a replan will occur whenever VACUUM/ANALYZE update
pg_class.reltuples, so I think you don't need to worry --- at least not
unless you've disabled autovacuum and chosen a bad manual vacuuming
strategy.

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: [pgsql-www] Translated documentations

Taken off-list...

On Sat, Jun 14, 2008 at 8:42 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Selena Deckelmann escribió:
>> On Sat, Jun 14, 2008 at 2:03 PM, Alvaro Herrera
>> <alvherre@commandprompt.com> wrote:
>> > Selena Deckelmann escribió:
>> >
>> >> Francisco Morosini from the Peruvian PUG has offered to update the
>> >> Spanish translation - and it sounds like a group may be starting in
>> >> Spain (thanks to Jean-Paul!).
>> >
>> > Update it? Please talk Francisco out of that. The old spanish
>> > translation is not of very high quality. In my opinion it would be
>> > better to start from scratch.
>>
>> No problem! They have not started, just have started asking questions
>> about what to do.
>
> I'd love to talk to the guy about this project. Can you put me in touch
> with him?
>
> --
> Alvaro Herrera

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

--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

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

Re: [pgsql-www] Translated documentations

Selena Deckelmann escribió:
> On Sat, Jun 14, 2008 at 2:03 PM, Alvaro Herrera
> <alvherre@commandprompt.com> wrote:
> > Selena Deckelmann escribió:
> >
> >> Francisco Morosini from the Peruvian PUG has offered to update the
> >> Spanish translation - and it sounds like a group may be starting in
> >> Spain (thanks to Jean-Paul!).
> >
> > Update it? Please talk Francisco out of that. The old spanish
> > translation is not of very high quality. In my opinion it would be
> > better to start from scratch.
>
> No problem! They have not started, just have started asking questions
> about what to do.

I'd love to talk to the guy about this project. Can you put me in touch
with him?

--
Alvaro Herrera

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

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

[GENERAL] functions, selects and the planner

In PostgreSQL 8.3 lets say I have a table:

create table t(c1 int, c2 int, ts0 timestamp with time zone, ts1 timestamp with time zone, data varchar);

an index:

create index t_c1_c2_ts0_idx on t using btree(c1, c2, ts0 desc);

and a function:

create function f(_ts timestamp(0) with time zone, _c1 int, _c2 int) returns varchar as $$
declare
  _data varchar := null;
begin
  select into _data data from t where _ts >= ts0 and c1 = _c1 and c2 = _c2 and (ts1 is null or _ts < ts1);
  return _data;
end
$$ language plpgsql;

My question is when is the "select into _data" query planned/replanned?  I'm concerned that the query might only be planned once (e.g. the first time it's executed or when the function is first defined) and cached indefinitely.  The table t is initially empty, but grows at a fairly steady rate over time.  So if the table is essentially empty when the query is planned, a seqscan is certainly what the planner would do.  However, as time goes on and table t is filled with data and the stats change, will the query eventually be replanned?  If not, what are some suggested ways to handle this?

Re: [ADMIN] Storing images and other data in PostgreSQL from Ms Access

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

*IIRC*, using bytea type works like a charm for OLE stuff from MS
Access...

Try to link your tables with the ANSI driver, then change the ODBC
source to the UNICODE one. I don't know why, but ISTM that MSAccess
perform a better type mapping with the ANSI driver...at least, TEXT ->
Memo, so I probably linked bytea -> OLE using the ANSI driver when I
tried ?

- --
Guillaume (ioguix) de Rorthais

C K a écrit :
> Hi All,
> I am testing the postgresql as a back-end for a project having ms
> access as a front-end. I have linked postgresql tables and started
> using. It works well for all data except the binary data. When used
> to insert/retrieve data from such fields, ms access gives error that
> it can't recognize the data.
> What to do? As per my knowledge postgresql adds some bytes to the
> binary data to be uploaded. I have eralier used mysql and it work
> well. Is there any solution for this?
>
> Please help.
> I am using Postgresql 8.3.1 and unicode driver with MS Access 2003
> and most current patches from microsoft applied on Windows Xp.
>
> Thanks
> CPK
>
> --
> Keep your Environment clean and green.

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

iD8DBQFIVI7KxWGfaAgowiIRAhwLAJoCIPP6kWoZGsvdNJvkKx38xIUtaQCeKYrk
ah6gAsw1uMVhqFENBhgR9jk=
=agg/
-----END PGP SIGNATURE-----


--
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-www] Translated documentations

On Sat, Jun 14, 2008 at 2:03 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Selena Deckelmann escribió:
>
>> Francisco Morosini from the Peruvian PUG has offered to update the
>> Spanish translation - and it sounds like a group may be starting in
>> Spain (thanks to Jean-Paul!).
>
> Update it? Please talk Francisco out of that. The old spanish
> translation is not of very high quality. In my opinion it would be
> better to start from scratch.

No problem! They have not started, just have started asking questions
about what to do.


--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

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

Re: [pgsql-www] Translated documentations

> On Saturday 14 June 2008 18:19:53 Tatsuo Ishii wrote:
> > > Tatsuo Ishii wrote:
> > > > Hi,
> > > >
> > > > JPUG(Japan PostgreSQL Users Group) has been translating the PostgreSQL
> > > > docs into Japanese and been distributing through their web site. The
> > > > translation work is surprisingly fast, usually Japanese translated
> > > > docs are uploaded no later than 1 week after PostgreSQL is
> > > > released. Thanks those who are volunteering the work.
> > > >
> > > > I think it would be nice that PostgreSQL main web site has the
> > > > translated docs or has a link to them. Many open source projects do
> > > > this way. This is not only usefull but good to appeal how the world
> > > > wide PostgreSQL commnuities help each other.
> > > >
> > > > What do you think?
> > >
> > > I think it is a great idea.
> >
> > Thanks. It seems just making a link to JPUG's translated docs is
> > a good start. The URL is:
> >
> > http://www.postgresql.jp/document/
> >
> > Probably we modify:
> >
> > http://www.postgresql.org/docs/
> >
> > a little bit and put links to localized docs like this:
> >
> > * Documentation
> > * Manuals
> > o Archive
> > o Japanese manuals
> > o French manuals
> >
> >
> >
> > * Security
> > * What's New
> > * FAQs
> >
> > Anybody wants to work on this? Or I could edit the page if I get
> > enough permission.
>
> This was on my todo list after pgcon, but I hadn't figure out where to put it.
> I think what I would like to do is a combination of this and my original
> thinking, which would be to add a link in the side nav under "archive"
> for "translations", and also a link under the "more manuals" link
> for "foreign languages" on the main doc sidebar, both of which would go to a
> list of foreign language translation links. This would look similar to the
> international community page, where we have the names of the links in the
> foreign language. Sound ok?

Sounds great!
--
Tatsuo Ishii
SRA OSS, Inc. Japan

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

Re: [PATCHES] [HACKERS] SSL configure patch

pgsql@mohawksoft.com writes:
> Here is the SSL patch we discussed previously for 8.3.1.

This appears to change user-facing behavior, which makes the lack of
documentation updates unacceptable. Also, it would be helpful to
reviewers if you provided a link to that previous discussion.

regards, tom lane

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

Re: [BUGS] Bug in select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')

=?ISO-8859-1?Q?Pierre_Le_Mou=EBllic?= <pierre.lemouellic@xgs-france.com> writes:
> Sometimes, when we run the SQL request :
> select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')
> we've got the result :
> 2008/06/11 15:01:06:1000

This is fixed in 8.3 and up:
http://archives.postgresql.org/pgsql-committers/2007-02/msg00334.php

It was not back-patched because it could change the behavior in cases
that weren't clearly errors.

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: [HACKERS] pg_stat_statements

On Friday 13 June 2008 12:58:22 Josh Berkus wrote:
> ITAGAKI Takahiro wrote:
> > Hello,
> >
> > Postgres 8.4 has pg_stat_user_functions view to track number of calls of
> > stored functions and time spent in them. Then, I'm thinking a "sql
> > statement" version of similar view -- pg_stat_statements.
>
> I can see how this would be useful, but I can also see that it could be a
> huge performance burden when activated. So it couldn't be part of the
> standard statistics collection.
>

A lower overhead way to get at this type of information is to quantize dtrace
results over a specific period of time. Much nicer than doing the whole
logging/analyze piece.

--
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: [pgsql-www] Translated documentations

On Saturday 14 June 2008 18:19:53 Tatsuo Ishii wrote:
> > Tatsuo Ishii wrote:
> > > Hi,
> > >
> > > JPUG(Japan PostgreSQL Users Group) has been translating the PostgreSQL
> > > docs into Japanese and been distributing through their web site. The
> > > translation work is surprisingly fast, usually Japanese translated
> > > docs are uploaded no later than 1 week after PostgreSQL is
> > > released. Thanks those who are volunteering the work.
> > >
> > > I think it would be nice that PostgreSQL main web site has the
> > > translated docs or has a link to them. Many open source projects do
> > > this way. This is not only usefull but good to appeal how the world
> > > wide PostgreSQL commnuities help each other.
> > >
> > > What do you think?
> >
> > I think it is a great idea.
>
> Thanks. It seems just making a link to JPUG's translated docs is
> a good start. The URL is:
>
> http://www.postgresql.jp/document/
>
> Probably we modify:
>
> http://www.postgresql.org/docs/
>
> a little bit and put links to localized docs like this:
>
> * Documentation
> * Manuals
> o Archive
> o Japanese manuals
> o French manuals
>
>
>
> * Security
> * What's New
> * FAQs
>
> Anybody wants to work on this? Or I could edit the page if I get
> enough permission.

This was on my todo list after pgcon, but I hadn't figure out where to put it.
I think what I would like to do is a combination of this and my original
thinking, which would be to add a link in the side nav under "archive"
for "translations", and also a link under the "more manuals" link
for "foreign languages" on the main doc sidebar, both of which would go to a
list of foreign language translation links. This would look similar to the
international community page, where we have the names of the links in the
foreign language. Sound ok?

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

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

[pdxpug] Does anyone have a 5th generation iPod? or 3rd generation ipod, or ipod classic?

We got a podcast recording device, but it doesn't work with our ipod :(

-selena

--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

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

[COMMITTERS] pgsql: Fix 64-bit problem in recent patch.

Log Message:
-----------
Fix 64-bit problem in recent patch.

Modified Files:
--------------
pgsql/src/backend/access/gist:
gistutil.c (r1.27 -> r1.28)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistutil.c?r1=1.27&r2=1.28)

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

Re: [pgsql-es-ayuda] Privilegios

2008/6/14 Rommel Romero <rach.patrick@gmail.com>:
>
> Bien...luego les cambie de propietario a mi base y mis tablas, ahora son de
> propiedad de [migrupo], luego les di privilegios en todas las tablas de la
> siguiente manera.
>
> GRANT ALL PRIVILEGES ON TABLE [mis tablas] TO GROUP [migrupo] ;
>

asignaste a los usuarios al grupo, verdad?

GRANT [tugrupo] TO [tutabla];


--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?

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

[COMMITTERS] pgsql: Rearrange ALTER TABLE syntax processing as per my recent

Log Message:
-----------
Rearrange ALTER TABLE syntax processing as per my recent proposal: the
grammar allows ALTER TABLE/INDEX/SEQUENCE/VIEW interchangeably for all
subforms of those commands, and then we sort out what's really legal
at execution time. This allows the ALTER SEQUENCE/VIEW reference pages
to fully document all the ALTER forms available for sequences and views
respectively, and eliminates a longstanding cause of confusion for users.

The net effect is that the following forms are allowed that weren't before:
ALTER SEQUENCE OWNER TO
ALTER VIEW ALTER COLUMN SET/DROP DEFAULT
ALTER VIEW OWNER TO
ALTER VIEW SET SCHEMA
(There's no actual functionality gain here, but formerly you had to say
ALTER TABLE instead.)

Interestingly, the grammar tables actually get smaller, probably because
there are fewer special cases to keep track of.

I did not disallow using ALTER TABLE for these operations. Perhaps we
should, but there's a backwards-compatibility issue if we do; in fact
it would break existing pg_dump scripts. I did however tighten up
ALTER SEQUENCE and ALTER VIEW to reject non-sequences and non-views
in the new cases as well as a couple of cases where they didn't before.

The patch doesn't change pg_dump to use the new syntaxes, either.

Modified Files:
--------------
pgsql/doc/src/sgml/ref:
alter_sequence.sgml (r1.21 -> r1.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_sequence.sgml?r1=1.21&r2=1.22)
alter_view.sgml (r1.3 -> r1.4)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_view.sgml?r1=1.3&r2=1.4)
pgsql/src/backend/commands:
alter.c (r1.28 -> r1.29)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/alter.c?r1=1.28&r2=1.29)
tablecmds.c (r1.256 -> r1.257)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.256&r2=1.257)
pgsql/src/backend/parser:
gram.y (r2.615 -> r2.616)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.615&r2=2.616)
pgsql/src/backend/tcop:
utility.c (r1.293 -> r1.294)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/utility.c?r1=1.293&r2=1.294)
pgsql/src/include/commands:
tablecmds.h (r1.39 -> r1.40)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/tablecmds.h?r1=1.39&r2=1.40)

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

[pgsql-es-ayuda] Privilegios

Hola lista ... tengo un problemita con los privilegios de usuarios espero puedan ayudarme
tengo el siguiente esquema:

grupo [migrupo]
users [user1, user2]

database [mibase]
tables [mitablas]

Perdon por describir de esta manera el esquema..jejej!!!

Bien...luego les cambie de propietario a mi base y mis tablas, ahora son de propiedad de [migrupo], luego les di privilegios en todas las tablas de la siguiente manera.

GRANT ALL PRIVILEGES ON TABLE [mis tablas]  TO  GROUP  [migrupo] ;

todo bien hasta ese momento, ... ahora pasa que cuando me conecto desde java tengo un error ... donde indica que no tengo privilegios para ninguna de las tablas....puedo conectarme a la base, pero no puedo acceder a las tablas. No entiendo que es lo que pasa??


[GENERAL] Need Tool to sync databases with 8.3.1

All,

I used to rave about how great the EMS PostgreSQL tools were, but lately
I've been disappointed by the lack of support for their Database
Comparer 2007 for PostgreSQL.

I need a tool that will compare 2 database schemas and allow me to
migrate changes from one database to another. What tools do the rest of
you use to accomplish this task?

As the name suggests, Database Comparer 2007 for PostgreSQL seems to
have stopped development some time back in 2007 and it will not work
with PostgreSQL 8.3+. In addition, several of the bugs I encounter with
8.2.4 databases make it a show stopper there too.

I don't know how else to best accomplish my goals other than dumping 2
schemas, running a diff and manually syncing the 2 until the diffs go away.

Suggestions for alternatives? I don't mind spending money if it'll get
the job done.

-- Dante

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

[pgsql-es-ayuda]

Buenas tardes a todas las personas que componen el grupo de postgres saben estoy terminado un sistema en linea el cual programo en php y manejador de bases de datos uso postgres y necesito auyuda en cuanto a un script  para respladar y restaurar la base de datos del mismo para tener una seguridad en ellos... Agradeceria de mucho su ayuda ya que se que son un grupo muy valiosa y posee experiencia en ello 

Re: [GENERAL] why sequential scan is used on indexed column ???

On Sat, Jun 14, 2008 at 04:59:44PM +0200, Andreas Kretschmer wrote:
> Julius Tuskenis <julius.tuskenis@gmail.com> schrieb:
> > I have a question concerning performance. One of my queries take a long
> > to execute. I tried to do "explain analyse" and I see that the
> > sequential scan is being used, although I have indexes set on columns
> > that are used in joins. The question is - WHY, and how to change that
> > behavior???
>
> Try to create an index on apsilankymai.sas_id

In the DDL that Julius posted apsilankymai doesn't have an sas_id
column.

The join is on apsilankymai.aps_saskaita = b_saskaita.sas_id. Both
columns have an index: b_saskaita.sas_id is a primary key so it
should have an index implicitly, and apsilankymai.aps_saskaita has
an explicit CREATE INDEX statement. The WHERE clause is on
b_saskaita.sas_subjektas, which also has an explicit CREATE INDEX
statement. Unless I'm mistaken all relevant columns have an index.

A few of the row count estimates differ from reality:

> Hash Join (cost=5.17..10185.89 rows=6047 width=138) (actual time=10698.539..10698.539 rows=0 loops=1)

> Bitmap Heap Scan on b_saskaita (cost=2.03..5.14 rows=9 width=96) (actual time=31.473..31.489 rows=1 loops=1)

However, that might not be entirely responsible for the questionable
plan. I created a test case that has close to the same estimated and
actual row counts and has the same plan if I disable enable_nestloop:

set enable_nestloop to off;

explain analyze
select *
FROM b_saskaita JOIN apsilankymai ON (aps_saskaita = sas_id)
where sas_subjektas = 20190;

QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------
Hash Join (cost=6.54..5814.42 rows=5406 width=286) (actual time=3222.429..3222.429 rows=0 loops=1)
Hash Cond: (apsilankymai.aps_saskaita = b_saskaita.sas_id)
-> Seq Scan on apsilankymai (cost=0.00..4627.50 rows=300350 width=42) (actual time=0.085..1514.863 rows=300350 loops=1)
-> Hash (cost=6.43..6.43 rows=9 width=244) (actual time=0.122..0.122 rows=1 loops=1)
-> Bitmap Heap Scan on b_saskaita (cost=2.32..6.43 rows=9 width=244) (actual time=0.089..0.095 rows=1 loops=1)
Recheck Cond: (sas_subjektas = 20190)
-> Bitmap Index Scan on fki_sas_subjektas (cost=0.00..2.32 rows=9 width=0) (actual time=0.066..0.066 rows=1 loops=1)
Index Cond: (sas_subjektas = 20190)
Total runtime: 3222.786 ms

I get a better plan if I enable nested loops:

set enable_nestloop to on;

explain analyze
select *
FROM b_saskaita JOIN apsilankymai ON (aps_saskaita = sas_id)
where sas_subjektas = 20190;

QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
Nested Loop (cost=79.93..4660.23 rows=5406 width=286) (actual time=1.000..1.000 rows=0 loops=1)
-> Seq Scan on b_saskaita (cost=0.00..10.25 rows=9 width=244) (actual time=0.116..0.870 rows=1 loops=1)
Filter: (sas_subjektas = 20190)
-> Bitmap Heap Scan on apsilankymai (cost=79.93..441.58 rows=6007 width=42) (actual time=0.084..0.084 rows=0 loops=1)
Recheck Cond: (apsilankymai.aps_saskaita = b_saskaita.sas_id)
-> Bitmap Index Scan on idx_aps_saskaita (cost=0.00..78.43 rows=6007 width=0) (actual time=0.068..0.068 rows=0 loops=1)
Index Cond: (apsilankymai.aps_saskaita = b_saskaita.sas_id)
Total runtime: 1.321 ms

Julius, do you perchance have enable_nestloop = off? If so, do you
get a better plan if you enable it? Also, have you run ANALYZE
lately?

--
Michael Fuhr

--
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-www] Translated documentations

Jaime Casanova wrote:
> On Sat, Jun 14, 2008 at 11:16 AM, Joshua D. Drake <jd@commandprompt.com> wrote:
>> Selena Deckelmann wrote:
>>> On Fri, Jun 13, 2008 at 11:50 PM, Tatsuo Ishii <ishii@postgresql.org>
>>> wrote:
>>>
>>> Francisco Morosini from the Peruvian PUG has offered to update the
>>> Spanish translation - and it sounds like a group may be starting in
>>> Spain (thanks to Jean-Paul!).
>>>
>>> The PUGs server could be used as a test-ground for the integration.
>> We have a complete translation infrastructure in place as far as I know.
>
> do we? it could be of great help...

Actually, I am wrong. The docs do not appear to have any translation
infrastructure. Peter would be a better person to answer that question.

Joshua D. Drake

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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

On Sat, Jun 14, 2008 at 5:16 PM, Jonathan Fuerth <fuerth@sqlpower.ca> wrote:
> Thanks for the clarification, Dave! I will poll the RSS feed instead
> of the FTP directory listing. I'm going to assume every title in the
> feed is a release number. This is true now; is it a safe assumption in
> the medium-to-long run?

Yeah, I think so. The purpose of that feed really is just for the
version numbers.


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

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

Re: [pgadmin-hackers] A fix and a new functionnality for the colour patch

Dave Page a écrit :
> On Sat, Jun 14, 2008 at 4:21 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>> Hi,
>>
>> The colour patch commited by Dave during pgCon2008 allows a user to add a
>> background color to the treeview for each specific registered server.
>>
>> When a user deletes the colour in the server's property, pgAdmin will use a
>> black (#000000) background. The treeview node's text will be unreadable.
>> What the patch does is impliying white colour when the user doesn't spécify
>> a colour.
>
> Hmm, thought I covered that cased. Thanks for catching.
>

At least, it didn't work on GTK+.

>> The new functionality adds a colour button that opens the standard colour
>> dialog. The user doesn't new to know the HTML colour coding.
>
> Is the colour dialog available on all platforms?

AFAIK, yes, it does.

According to the manual
(http://docs.wxwidgets.org/2.8.6/wx_commondialogsoverview.html), "Some
dialogs have both platform-dependent and platform-independent
implementations, so that if underlying windowing systems do not provide
the required functionality, the generic classes and functions can stand in."

> I did look for one
> when writing the original patch but couldn't find it. It's possible I
> was hungover from the Jagermeister the night before though (EDB party
> at pgCon :-) ).
>

hehe :)

>> Comments?
>
> You spelt colour wrong :-). Other than that (and the possible issue
> above), looks good.
>

Yeah, my first (unsent) mail used color. I changed all color with colour
because of the spelling in pgAdmin :)


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

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

Re: [pgsql-www] Translated documentations

On Sat, Jun 14, 2008 at 11:16 AM, Joshua D. Drake <jd@commandprompt.com> wrote:
> Selena Deckelmann wrote:
>>
>> On Fri, Jun 13, 2008 at 11:50 PM, Tatsuo Ishii <ishii@postgresql.org>
>> wrote:
>>
>
>> Francisco Morosini from the Peruvian PUG has offered to update the
>> Spanish translation - and it sounds like a group may be starting in
>> Spain (thanks to Jean-Paul!).
>>
>> The PUGs server could be used as a test-ground for the integration.
>
> We have a complete translation infrastructure in place as far as I know.

do we? it could be of great help...
the spanish community tried it more than once (there is a pgfoundry
with a system to help us in that task
http://pgfoundry.org/projects/webtranslator), but we can't finish, yet

how other groups has translated the documentation so fast?

--
regards,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157

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

Re: [pgadmin-hackers] A fix and a new functionnality for the colour patch

On Sat, Jun 14, 2008 at 4:21 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Hi,
>
> The colour patch commited by Dave during pgCon2008 allows a user to add a
> background color to the treeview for each specific registered server.
>
> When a user deletes the colour in the server's property, pgAdmin will use a
> black (#000000) background. The treeview node's text will be unreadable.
> What the patch does is impliying white colour when the user doesn't spécify
> a colour.

Hmm, thought I covered that cased. Thanks for catching.

> The new functionality adds a colour button that opens the standard colour
> dialog. The user doesn't new to know the HTML colour coding.

Is the colour dialog available on all platforms? I did look for one
when writing the original patch but couldn't find it. It's possible I
was hungover from the Jagermeister the night before though (EDB party
at pgCon :-) ).

> Comments?

You spelt colour wrong :-). Other than that (and the possible issue
above), looks good.

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

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

Re: [GENERAL] Stored procs / functions - execution failure

Damian Georgiou wrote:

> I am having an issue with a function where it used to run in a previous
> installation of postgres under windows. The box has since been
> decommissioned so I am unable to check exactly what version it was though it
> was version 8 under winxp.
>
> I am now running postgres 8.2.5 Under OSX 10.5.3
>
> Now I have imported the data, the function is available in the list however
> I get this error when I try to run it

> ERROR: function sp_schedulefromdate("unknown") does not exist
> LINE 1: select sp_scheduleFromDate('2008-01-01');

OK, first guess: you've defined your function with a mixed case name,
and you're being bitten by case folding. You probably meant to write:

select "sp_scheduleFromDate"('2008-01-01')

not

select sp_scheduleFromDate('2008-01-01')

The former suppresses lowercase folding; the latter does not.

--
Craig Ringer

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

Re: [GENERAL] Stored procs / functions - execution failure

Damian Georgiou wrote:
> Hi All,
>
> I am having an issue with a function where it used to run in a previous
> installation of postgres under windows. The box has since been
>
> ERROR: function sp_schedulefromdate("unknown") does not exist
> LINE 1: select sp_scheduleFromDate('2008-01-01');
> ^
> HINT: No function matches the given name and argument types. You may
> need to add explicit type casts.


I suppose you need to add an explicit cast, as it says in the error
message. This means that instead of sp_scheduleFromDate('2008-01-01');
which is what you got now, you use
sp_scheduleFromDate('2008-01-01'::date); which seems to be what the
function expects.

--
Tommy Gildseth

--
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-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

On Sat, Jun 14, 2008 at 9:22 AM, Dave Page <dpage@pgadmin.org> wrote:
> On Sat, Jun 14, 2008 at 1:25 PM, Jonathan Fuerth <fuerth@sqlpower.ca> wrote:
>> On Sat, Jun 14, 2008 at 2:25 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>>
>>> What would be cool is if it could track the version RSS feed from
>>> www.postgresql.org to figure out when it needs to go out and check the
>>> others...
>>>
>>
>> Well, which one is most likely to be correct? If the RSS feed needs to
>> be updated manually after the new release is added to the FTP site,
>> maybe it would make more sense to add the RSS to the list of "pages"
>> to verify for up-to-dateness. The primary source of information should
>> be correct by default (which is why I'm looking at FTP directory
>> names--assuming the release exists iff you can download the source
>> code).
>
> The RSS feed is the definitive source. We preload binaries and source
> tarballs onto the ftp site a few days before the release, so we don't
> want your script bugging us prior to the actual launch otherwise it'll
> end up getting forgotten. The data source for the RSS feed is one of
> the things that gets updated *at* release time.

Thanks for the clarification, Dave! I will poll the RSS feed instead
of the FTP directory listing. I'm going to assume every title in the
feed is a release number. This is true now; is it a safe assumption in
the medium-to-long run?

> Oh, and I would suggest running it daily. If the folks updating the
> sites cannot handle same-day updates, or on the odd occasion ignoring
> a couple of emails until they can do the update, then they're probably
> not the most appropriate people for handling this kind of task anyway.

I tend to agree with you there. Once all the secondary sources are
up-to-date, it's only going to start nagging again when a new release
comes out. Better to get the reminder starting the next day rather
than at the end of the week or month.

-Jonathan

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

Re: [pgsql-www] Translated documentations

Selena Deckelmann wrote:
> On Fri, Jun 13, 2008 at 11:50 PM, Tatsuo Ishii <ishii@postgresql.org> wrote:
>

> Francisco Morosini from the Peruvian PUG has offered to update the
> Spanish translation - and it sounds like a group may be starting in
> Spain (thanks to Jean-Paul!).
>
> The PUGs server could be used as a test-ground for the integration.

We have a complete translation infrastructure in place as far as I know.
We just need to start hosting it.

Dave, Magnus?

Sincerely,

Joshua D. Drake

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

Re: [pgsql-www] Translated documentations

On Fri, Jun 13, 2008 at 11:50 PM, Tatsuo Ishii <ishii@postgresql.org> wrote:

> I think it would be nice that PostgreSQL main web site has the
> translated docs or has a link to them. Many open source projects do
> this way. This is not only usefull but good to appeal how the world
> wide PostgreSQL commnuities help each other.
>
> What do you think?

This is a great idea!

I don't do anything with documentation currently, but if there are
some sysadmin tasks I can lend a hand with, I would love to do so!

Francisco Morosini from the Peruvian PUG has offered to update the
Spanish translation - and it sounds like a group may be starting in
Spain (thanks to Jean-Paul!).

The PUGs server could be used as a test-ground for the integration.

-selena

--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

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

[GENERAL] Stored procs / functions - execution failure

Hi All,

I am having an issue with a function where it used to run in a previous installation of postgres under windows. The box has since been decommissioned so I am unable to check exactly what version it was though it was version 8 under winxp.

I am now running postgres 8.2.5 Under OSX 10.5.3

Now I have imported the data, the function is available in the list however I get this error when I try to run it





ERROR:  function sp_schedulefromdate("unknown") does not exist
LINE 1: select sp_scheduleFromDate('2008-01-01');
               ^
HINT:  No function matches the given name and argument types. You may need to add explicit type casts.

********** Error **********

ERROR: function sp_schedulefromdate("unknown") does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You may need to add explicit type casts.
Character: 8






The function code is as below

-- Function: "sp_scheduleFromDate"(date) -- DROP FUNCTION "sp_scheduleFromDate"(date); CREATE OR REPLACE FUNCTION "sp_scheduleFromDate"(date)  RETURNS refcursor AS $BODY$declare    v_date alias for $1;    v_rs cursor for select            v.sitename,           ...        from v_schedule v                where v.scheduledate = v_date::text; begin    open v_rs;    return v_rs; end;         $BODY$  LANGUAGE 'plpgsql' VOLATILE; ALTER FUNCTION "sp_scheduleFromDate"(date) OWNER TO postgres; GRANT EXECUTE ON FUNCTION "sp_scheduleFromDate"(date) TO public; GRANT EXECUTE ON FUNCTION "sp_scheduleFromDate"(date) TO postgres; GRANT EXECUTE ON FUNCTION "sp_scheduleFromDate"(date) TO divequee_dmpro;

Any thoughts?

Damian

Re: [GENERAL] Source RPM for 8.3.3?

Hi,

On Sat, 2008-06-14 at 12:15 -0300, Jorge Godoy wrote:
>
> have you ever thought about using OpenSuSE's build service?

Actually no. Peter, Reinhard and other folks are already working on
improving OpenSuSE packages:

http://people.planetpostgresql.org/peter/index.php?/archives/20-News-on-the-PostgreSQL-RPM-packages-for-SUSE.html
http://people.planetpostgresql.org/peter/index.php?/archives/19-PostgreSQL-RPM-packages-for-SUSE.html

As Peter noted in first link, please send your suggestions to that
team, so that they will add more packages.

I (and Darcy) setup a nice buildfarm for Fedora/RHEL/CentOS packages,
and I really want to use that one.

Also, to be honest, I have *no* time to maintain another distro -- more
spec file, more packages to build, etc.

Regards,
--
Devrim GÜNDÜZ , RHCE
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/

[pgadmin-hackers] A fix and a new functionnality for the colour patch

Index: pgadmin/include/schema/pgServer.h
===================================================================
--- pgadmin/include/schema/pgServer.h (revision 7373)
+++ pgadmin/include/schema/pgServer.h (working copy)
@@ -110,7 +110,7 @@
bool SetPassword(const wxString& newVal);
wxDateTime GetUpSince() { return upSince; }
void iSetUpSince(const wxDateTime &d) { upSince = d; }
- void iSetColour(const wxString &s) { colour = wxColour(s); }
+ void iSetColour(const wxString &s) { colour = s.Length() == 0 ? wxColour(wxT("#ffffff")) : wxColour(s); }
wxColour GetColour() { return colour; }

bool HasPrivilege(const wxString &objTyp, const wxString &objName, const wxString &priv) { return conn->HasPrivilege(objTyp, objName, priv); }
Index: pgadmin/include/dlg/dlgServer.h
===================================================================
--- pgadmin/include/dlg/dlgServer.h (revision 7373)
+++ pgadmin/include/dlg/dlgServer.h (working copy)
@@ -42,6 +42,7 @@
void OnChangeRestr(wxCommandEvent &ev);
void OnChangeTryConnect(wxCommandEvent &ev);
void OnPageSelect(wxNotebookEvent &event);
+ void OnChooseColor(wxCommandEvent &ev);

DECLARE_EVENT_TABLE()
};
Index: pgadmin/dlg/dlgServer.cpp
===================================================================
--- pgadmin/dlg/dlgServer.cpp (revision 7373)
+++ pgadmin/dlg/dlgServer.cpp (working copy)
@@ -11,6 +11,7 @@

// wxWindows headers
#include <wx/wx.h>
+#include <wx/colordlg.h>

// App headers
#include "pgAdmin3.h"
@@ -37,6 +38,7 @@
#define txtPassword CTRL_TEXT("txtPassword")
#define txtDbRestriction CTRL_TEXT("txtDbRestriction")
#define txtColour CTRL_TEXT("txtColour")
+#define btnColor CTRL_BUTTON("btnColor")


BEGIN_EVENT_TABLE(dlgServer, dlgProperty)
@@ -53,6 +55,7 @@
EVT_CHECKBOX(XRCID("chkRestore"), dlgProperty::OnChange)
EVT_CHECKBOX(XRCID("chkTryConnect"), dlgServer::OnChangeTryConnect)
EVT_TEXT(XRCID("txtColour"), dlgProperty::OnChange)
+ EVT_BUTTON(XRCID("btnColor"), dlgServer::OnChooseColor)
EVT_BUTTON(wxID_OK, dlgServer::OnOK)
END_EVENT_TABLE();

@@ -232,7 +235,7 @@
chkStorePwd->SetValue(server->GetStorePwd());
chkRestore->SetValue(server->GetRestore());
txtDbRestriction->SetValue(server->GetDbRestriction());
- txtColour->SetValue(server->GetColour().GetAsString(wxC2S_HTML_SYNTAX));
+ txtColour->SetValue(server->GetColour().GetAsString(wxC2S_HTML_SYNTAX));

stPassword->Disable();
txtPassword->Disable();
@@ -290,6 +293,16 @@
}


+void dlgServer::OnChooseColor(wxCommandEvent &ev)
+{
+ wxColourDialog dlg( NULL );
+ if ( dlg.ShowModal() == wxID_OK )
+ {
+ txtColour->SetValue(dlg.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX));
+ }
+}
+
+
void dlgServer::CheckChange()
{
wxString name=GetName();
Index: pgadmin/ui/dlgServer.xrc
===================================================================
--- pgadmin/ui/dlgServer.xrc (revision 7373)
+++ pgadmin/ui/dlgServer.xrc (working copy)
@@ -122,6 +122,10 @@
<pos>70,169d</pos>
<size>75,-1d</size>
</object>
+ <object class="wxButton" name="btnColor">
+ <label>Choose Color...</label>
+ <pos>150,169d</pos>
+ </object>
</object>
<selected>1</selected>
</object>
@@ -144,4 +148,4 @@
<size>218,225d</size>
<style></style>
</object>
-</resource>
\ No newline at end of file
+</resource>
Hi,

The colour patch commited by Dave during pgCon2008 allows a user to add
a background color to the treeview for each specific registered server.

When a user deletes the colour in the server's property, pgAdmin will
use a black (#000000) background. The treeview node's text will be
unreadable. What the patch does is impliying white colour when the user
doesn't spécify a colour.

The new functionality adds a colour button that opens the standard
colour dialog. The user doesn't new to know the HTML colour coding.

Comments?

Regards.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

Re: [GENERAL] Source RPM for 8.3.3?

On Saturday 14 June 2008 10:33:15 Devrim GÜNDÜZ wrote:
> Hi,
>
> On Fri, 2008-06-13 at 10:24 -0700, Kevin Regan wrote:
> > I was browsing the postgresql download site, but I wasn't able to find
> > the source RPM for 8.3.3. Is it available on the site?
>
> I just finished uploading 8.3.3 SRPMs. They will be on
> ftp.postgresql.org in a few hours, after sync.
>
> Also you can grab them from here:
>
> http://yum.pgsqlrpms.org/srpms/8.3/
>
> Regards,

Devrim,

have you ever thought about using OpenSuSE's build service? Your RPMs are
more complete -- i.e. they include the scripting languages as well -- than the
ones available for OpenSuSE...

And the build service already creates packages for Fedora and other
distributions.

https://build.opensuse.org/

Here's a list of supported distributions:


Distribution


openSUSE Factory


openSUSE 10.3


openSUSE 10.2


SUSE Linux 10.1


SLE 10


SUSE Linux 10.0


SUSE Linux 9.3


SLES 9


CentOS 5


RHEL 4


RHEL 5


Fedora 6 with Extras


Fedora 7 with Extras


Fedora 8 with Extras


Mandriva 2006


Mandriva 2007


Mandriva 2008


It lacks Fedora 9, though... But I believe that it wouldn't be hard to have
it added to the list. Specially to have more people using those "standard"
RPM packages for all the distributions above.


Regards,
--
Jorge Godoy <jgodoy@gmail.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: [GENERAL] why sequential scan is used on indexed column ???

Julius Tuskenis <julius.tuskenis@gmail.com> schrieb:

> Hello.
>
> I have a question concerning performance. One of my queries take a long
> to execute. I tried to do "explain analyse" and I see that the
> sequential scan is being used, although I have indexes set on columns
> that are used in joins. The question is - WHY, and how to change that
> behavior???

Try to create an index on apsilankymai.sas_id

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

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

[pgadmin-hackers] SVN Commit by guillaume: r7374 - trunk/pgadmin3

Author: guillaume

Date: 2008-06-14 15:44:17 +0100 (Sat, 14 Jun 2008)

New Revision: 7374

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

Log:
Update pot file.

Modified:
trunk/pgadmin3/pgadmin3.pot

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

[GENERAL] why sequential scan is used on indexed column ???

Hello.

I have a question concerning performance. One of my queries take a long
to execute. I tried to do "explain analyse" and I see that the
sequential scan is being used, although I have indexes set on columns
that are used in joins. The question is - WHY, and how to change that
behavior???

The DBMS: pgSQL 8.1.4 on gentoo linux.

The query:

explain analyze
select *
FROM b_saskaita JOIN apsilankymai ON (aps_saskaita = sas_id)
where sas_subjektas = 20190

result:
"Hash Join (cost=5.17..10185.89 rows=6047 width=138) (actual
time=10698.539..10698.539 rows=0 loops=1)"
" Hash Cond: ("outer".aps_saskaita = "inner".sas_id)"
" -> Seq Scan on apsilankymai (cost=0.00..8618.50 rows=300350
width=42) (actual time=2121.310..6470.721 rows=300350 loops=1)"
" -> Hash (cost=5.14..5.14 rows=9 width=96) (actual
time=31.545..31.545 rows=1 loops=1)"
" -> Bitmap Heap Scan on b_saskaita (cost=2.03..5.14 rows=9
width=96) (actual time=31.473..31.489 rows=1 loops=1)"
" Recheck Cond: (sas_subjektas = 20190)"
" -> Bitmap Index Scan on idx_sas_subjektas
(cost=0.00..2.03 rows=9 width=0) (actual time=25.552..25.552 rows=1
loops=1)"
" Index Cond: (sas_subjektas = 20190)"
"Total runtime: 10698.780 ms"


The tables with indexes:


CREATE TABLE b_saskaita
(
sas_id serial NOT NULL,
sas_tevas integer,
sas_kreditas numeric(8,2) NOT NULL DEFAULT 0,
sas_statusas smallint NOT NULL DEFAULT 1,
sas_subjektas integer,
sas_kam_naudojama integer,
sas_pastaba character varying(100),
CONSTRAINT b_saskaita_pkey PRIMARY KEY (sas_id),
CONSTRAINT fk_sas_subjektas FOREIGN KEY (sas_subjektas)
REFERENCES subjektas (sub_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_saskaitos_tevas FOREIGN KEY (sas_tevas)
REFERENCES b_saskaita (sas_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE b_saskaita OWNER TO postgres;
GRANT ALL ON TABLE b_saskaita TO postgres;
GRANT ALL ON TABLE b_saskaita TO public;

CREATE INDEX fki_sas_subjektas
ON b_saskaita
USING btree
(sas_subjektas);


CREATE TABLE apsilankymai
(
aps_id serial NOT NULL,
aps_abonementas integer NOT NULL,
aps_atejo timestamp(0) without time zone NOT NULL,
aps_isejo timestamp(0) without time zone,
aps_ileidimas integer,
aps_zetonas integer NOT NULL,
aps_padalinys integer NOT NULL,
aps_saskaita integer,
aps_statusas smallint DEFAULT 0,
CONSTRAINT apsilankymai_pkey PRIMARY KEY (aps_id),
CONSTRAINT fk_apsilankymo_abonementas FOREIGN KEY (aps_abonementas)
REFERENCES subjekto_abonementai (sab_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_padalinys FOREIGN KEY (aps_padalinys)
REFERENCES padalinys (pad_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT,
CONSTRAINT fk_apsilankymo_saskaita FOREIGN KEY (aps_saskaita)
REFERENCES b_saskaita (sas_id) MATCH FULL
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_zetonas FOREIGN KEY (aps_zetonas)
REFERENCES zetonai (zet_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE apsilankymai OWNER TO postgres;
GRANT ALL ON TABLE apsilankymai TO postgres;
GRANT ALL ON TABLE apsilankymai TO public;
COMMENT ON COLUMN apsilankymai.aps_ileidimas IS 'jei apsilankymas neturi
skaitytis - nurodoma kuris apsilankymas yra pagrindinis';
COMMENT ON COLUMN apsilankymai.aps_padalinys IS 'kuriame padalinyje
lankesi zmogus. reikalingas, kai norim skaiciuoti kartus zmoniu turinciu
abonementa keliuose klubuose';
COMMENT ON COLUMN apsilankymai.aps_statusas IS '0 - neiejes, 1 - viduje,
2 - isejes';


CREATE INDEX idx_aps_saskaita
ON apsilankymai
USING btree
(aps_saskaita);


Thank you in advance.

--

Julius Tuskenis


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

[pgus-general] why sequential scan is used on indexed column ???

Hello.

I have a question concerning performance. One of my queries take a long
to execute. I tried to do "explain analyse" and I see that the
sequential scan is being used, although I have indexes set on columns
that are used in joins. The question is - WHY, and how to change that
behavior???

The DBMS: pgSQL 8.1.4 on gentoo linux.

The query:

explain analyze
select *
FROM b_saskaita JOIN apsilankymai ON (aps_saskaita = sas_id)
where sas_subjektas = 20190

result:
"Hash Join (cost=5.17..10185.89 rows=6047 width=138) (actual
time=10698.539..10698.539 rows=0 loops=1)"
" Hash Cond: ("outer".aps_saskaita = "inner".sas_id)"
" -> Seq Scan on apsilankymai (cost=0.00..8618.50 rows=300350
width=42) (actual time=2121.310..6470.721 rows=300350 loops=1)"
" -> Hash (cost=5.14..5.14 rows=9 width=96) (actual
time=31.545..31.545 rows=1 loops=1)"
" -> Bitmap Heap Scan on b_saskaita (cost=2.03..5.14 rows=9
width=96) (actual time=31.473..31.489 rows=1 loops=1)"
" Recheck Cond: (sas_subjektas = 20190)"
" -> Bitmap Index Scan on idx_sas_subjektas
(cost=0.00..2.03 rows=9 width=0) (actual time=25.552..25.552 rows=1
loops=1)"
" Index Cond: (sas_subjektas = 20190)"
"Total runtime: 10698.780 ms"


The tables with indexes:


CREATE TABLE b_saskaita
(
sas_id serial NOT NULL,
sas_tevas integer,
sas_kreditas numeric(8,2) NOT NULL DEFAULT 0,
sas_statusas smallint NOT NULL DEFAULT 1,
sas_subjektas integer,
sas_kam_naudojama integer,
sas_pastaba character varying(100),
CONSTRAINT b_saskaita_pkey PRIMARY KEY (sas_id),
CONSTRAINT fk_sas_subjektas FOREIGN KEY (sas_subjektas)
REFERENCES subjektas (sub_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_saskaitos_tevas FOREIGN KEY (sas_tevas)
REFERENCES b_saskaita (sas_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE b_saskaita OWNER TO postgres;
GRANT ALL ON TABLE b_saskaita TO postgres;
GRANT ALL ON TABLE b_saskaita TO public;

CREATE INDEX fki_sas_subjektas
ON b_saskaita
USING btree
(sas_subjektas);


CREATE TABLE apsilankymai
(
aps_id serial NOT NULL,
aps_abonementas integer NOT NULL,
aps_atejo timestamp(0) without time zone NOT NULL,
aps_isejo timestamp(0) without time zone,
aps_ileidimas integer,
aps_zetonas integer NOT NULL,
aps_padalinys integer NOT NULL,
aps_saskaita integer,
aps_statusas smallint DEFAULT 0,
CONSTRAINT apsilankymai_pkey PRIMARY KEY (aps_id),
CONSTRAINT fk_apsilankymo_abonementas FOREIGN KEY (aps_abonementas)
REFERENCES subjekto_abonementai (sab_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_padalinys FOREIGN KEY (aps_padalinys)
REFERENCES padalinys (pad_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT,
CONSTRAINT fk_apsilankymo_saskaita FOREIGN KEY (aps_saskaita)
REFERENCES b_saskaita (sas_id) MATCH FULL
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_zetonas FOREIGN KEY (aps_zetonas)
REFERENCES zetonai (zet_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE apsilankymai OWNER TO postgres;
GRANT ALL ON TABLE apsilankymai TO postgres;
GRANT ALL ON TABLE apsilankymai TO public;
COMMENT ON COLUMN apsilankymai.aps_ileidimas IS 'jei apsilankymas neturi
skaitytis - nurodoma kuris apsilankymas yra pagrindinis';
COMMENT ON COLUMN apsilankymai.aps_padalinys IS 'kuriame padalinyje
lankesi zmogus. reikalingas, kai norim skaiciuoti kartus zmoniu turinciu
abonementa keliuose klubuose';
COMMENT ON COLUMN apsilankymai.aps_statusas IS '0 - neiejes, 1 - viduje,
2 - isejes';


CREATE INDEX idx_aps_saskaita
ON apsilankymai
USING btree
(aps_saskaita);


Thank you in advance.

--

Julius Tuskenis


--
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-www] Translated documentations

Tatsuo Ishii wrote:
> Hi,
>
> JPUG(Japan PostgreSQL Users Group) has been translating the PostgreSQL
> docs into Japanese and been distributing through their web site. The
> translation work is surprisingly fast, usually Japanese translated
> docs are uploaded no later than 1 week after PostgreSQL is
> released. Thanks those who are volunteering the work.
>
> I think it would be nice that PostgreSQL main web site has the
> translated docs or has a link to them. Many open source projects do
> this way. This is not only usefull but good to appeal how the world
> wide PostgreSQL commnuities help each other.
>
> What do you think?

I think it is a great idea.

--
Bruce Momjian <bruce@momjian.us>

http://momjian.us

EnterpriseDB

http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Re: [pgadmin-support] Weird Popup Menus - pgAdmin 1.8.4

Dave Page a écrit :
> On Fri, Jun 13, 2008 at 11:56 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>
>> There were a bunch of answers. It seems my idea was right. Julian Smart will
>> probably revert part of the patch that breaks our shortcuts handling.
>
> Oh, cool. How was your first foray into the wxWidgets community?
> Hopefully it didn't feel too strange and alien :-)
>

:)

Strictly speaking, I'm not a wxWidgets fan. I would definitely prefer qt.

Anyways, they were friendly and quick to answer. I'm now subscribed to
their wx-users list, and some messages are interesting. It gives me a
better idea of this widgets' toolkit.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

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

[ADMIN] Storing images and other data in PostgreSQL from Ms Access

Hi All,
I am testing the postgresql as a back-end for a project having ms access as a front-end. I have linked postgresql tables and started using. It works well for all data except the binary data. When used to insert/retrieve data from such fields, ms access gives error that it can't recognize the data.
What to do? As per my knowledge postgresql adds some bytes to the binary data to be uploaded. I have eralier used mysql and it work well. Is there any solution for this?

Please help.
I am using Postgresql 8.3.1 and unicode driver with MS Access 2003 and most current patches from microsoft applied on Windows Xp.

Thanks
CPK

--
Keep your Environment clean and green.

Re: [pgsql-es-ayuda] nuevo release

José Fermín Francisco Ferreras wrote:
> Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero, cuando salió la versión 8.3.2?? Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>
> _________________________________________________________________
> Do more with your photos with Windows Live Photo Gallery.
> http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008
>
la 8.3.2 iba a salir inclusive aparecio en los mirrors pero se detecto
otra falla antes del anuncio oficial por eso se libero la 8.3.3 y no
se anuncio o libero realmente la 8.3.2 lo mismo con la 8.2.8 8.1.12

Saludos ..

Leonel

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

[ANNOUNCE] New RPM Sets for Fedora / Red Hat Enterprise Linux / CentOS

---------------------------------------------------------------------
PostgreSQL New RPM Sets
2008-06-14

Versions: 8.3.3, 8.2.9, 8.1.13, 8.0.17, 7.4.21

Set label: 8.3.3-1PGDG, 8.2.9-1PGDG,, 8.1.13-1PGDG 8.0.17-1PGDG, 7.4.21-1PGDG
---------------------------------------------------------------------

---------------------------------------------------------------------
Release Info:

PostgreSQL RPM Building Project has released RPMs for new PostgreSQL
minor releases, and they are available in main FTP site and its mirrors.
Users should upgrade to these versions as soon as possible.

We currently have RPMs for:

- Fedora Core 7 (x86 and x86_64)
- Fedora Core 8 (x86 and x86_64)
- Fedora Core 9 (x86 and x86_64)
- Red Hat Enterprise Linux / CentOS 4 (x86 and x86_64)
- Red Hat Enterprise Linux / CentOS 5 (x86 and x86_64)

More may come later.

For complete list of changes in RPM sets, please refer to the changelogs
in the RPMs. Use
rpm -q -changelog package_name
for querying the changelog.

Since this release is not a major release, it will not requires a
dump/reload from the previous release. However, if you are upgrading
from very early releases, you may need to upgrade. Please see PostgreSQL
Release Notes to confirm procedures for this.

The SRPMs are also provided. Please note that we have different SRPMs
for all platforms.

We also have a howto document about RPM installation of PostgreSQL:

http://pgfoundry.org/docman/?group_id=1000048

There is another excellent howto:

http://www.westnet.com/~gsmith/gregsmith/content/postgresql/pgrpm.htm


Please follow the instructions before installing/upgrading.

Each RPM has been signed automagically, and each directory contains
CURRENT_MAINTAINER file which includes the name/email of the
package builder and link to PGDG RPM Building Project PGP key.

If you experience problems with the RPMs or if you have feature
requests, please join

pgsqlrpms-general ( at ) pgfoundry ( dot ) org

More info about the list is found at:

http://lists.pgfoundry.org/mailman/listinfo/pgsqlrpms-general

The project page is:

http://pgfoundry.org/projects/pgsqlrpms

Please do not use these resources for issue running or using PostgreSQL
once it is installed. Please download these files from:



http://www.postgresql.org/ftp/binary/v8.3.3/linux/


http://www.postgresql.org/ftp/binary/v8.2.9/linux/

http://www.postgresql.org/ftp/binary/v8.1.13/linux/

http://www.postgresql.org/ftp/binary/v8.0.17/linux/

http://www.postgresql.org/ftp/binary/v7.4.21/linux/

If you are looking more PostgreSQL related RPMs, please visit:

http://yum.pgsqlrpms.org


Regards,
--
Devrim GÜNDÜZ , RHCE
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/

Re: [pgadmin-hackers] Enabling SQL text field in the SQL tab of object dialog

Index: pgadmin/include/dlg/dlgProperty.h
===================================================================
--- pgadmin/include/dlg/dlgProperty.h (revision 7373)
+++ pgadmin/include/dlg/dlgProperty.h (working copy)
@@ -86,6 +86,7 @@
void OnChange(wxCommandEvent &ev);
void OnChangeOwner(wxCommandEvent &ev);
void OnChangeStc(wxStyledTextEvent& event);
+ void OnChangeReadOnly(wxCommandEvent& event);

protected:
void AddUsers(ctlComboBoxFix *cb1, ctlComboBoxFix *cb2=0);
@@ -97,7 +98,7 @@
pgDatabase *database;

frmMain *mainForm;
- ctlSQLBox *sqlPane;
+ wxPanel *sqlPane;

wxTextValidator numericValidator;

@@ -105,6 +106,8 @@
wxTextCtrl *txtName, *txtOid, *txtComment;
ctlComboBox *cbOwner;
ctlComboBox *cbClusterSet;
+ wxCheckBox *chkReadOnly;
+ ctlSQLBox *sqlTextField;

int width, height;
wxTreeItemId item, owneritem;
Index: pgadmin/dlg/dlgProperty.cpp
===================================================================
--- pgadmin/dlg/dlgProperty.cpp (revision 7373)
+++ pgadmin/dlg/dlgProperty.cpp (working copy)
@@ -59,8 +59,6 @@
#include "schema/pgUser.h"


-
-
class replClientData : public wxClientData
{
public:
@@ -72,6 +70,9 @@
};


+#define CTRLID_CHKSQLTEXTFIELD 1000
+
+
BEGIN_EVENT_TABLE(dlgProperty, DialogWithHelp)
EVT_NOTEBOOK_PAGE_CHANGED(XRCID("nbNotebook"), dlgProperty::OnPageSelect)

@@ -80,6 +81,8 @@
EVT_COMBOBOX(XRCID("cbOwner"), dlgProperty::OnChange)
EVT_TEXT(XRCID("txtComment"), dlgProperty::OnChange)

+ EVT_CHECKBOX(CTRLID_CHKSQLTEXTFIELD, dlgProperty::OnChangeReadOnly)
+
EVT_BUTTON(wxID_HELP, dlgProperty::OnHelp)
EVT_BUTTON(wxID_OK, dlgProperty::OnOK)
EVT_BUTTON(wxID_APPLY, dlgProperty::OnApply)
@@ -90,6 +93,7 @@
{
readOnly=false;
sqlPane=0;
+ sqlTextField=0;
processing=false;
mainForm=frame;
database=0;
@@ -311,7 +315,34 @@

void dlgProperty::CreateAdditionalPages()
{
- sqlPane = new ctlSQLBox(nbNotebook, CTL_PROPSQL, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_READONLY | wxTE_RICH2);
+ int width, height;
+
+ // get a few sizes and widths
+#ifdef __WIN32__
+ GetClientSize(&width, &height);
+#else
+ nbNotebook->GetClientSize(&width, &height);
+ height -= ConvertDialogToPixels(wxPoint(0, 20)).y; // sizes of tabs
+#endif
+ wxPoint zeroPos=ConvertDialogToPixels(wxPoint(5, 5));
+ wxSize chkSize=ConvertDialogToPixels(wxSize(65,12));
+
+ // add a panel
+ sqlPane = new wxPanel(nbNotebook);
+
+ // add checkbox to the panel
+ chkReadOnly = new wxCheckBox(sqlPane, CTRLID_CHKSQLTEXTFIELD, wxT("Read only"),
+ wxPoint(zeroPos.x, zeroPos.y),
+ chkSize);
+ chkReadOnly->SetValue(true);
+
+ // add ctlSQLBox to the panel
+ sqlTextField = new ctlSQLBox(sqlPane, CTL_PROPSQL,
+ wxPoint(zeroPos.x, zeroPos.y + chkSize.GetHeight()),
+ wxSize(width - 2*zeroPos.x, height - 2*zeroPos.y),
+ wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_RICH2);
+
+ // add panel to the notebook
nbNotebook->AddPage(sqlPane, wxT("SQL"));
}

@@ -506,6 +537,42 @@
}


+void dlgProperty::OnChangeReadOnly(wxCommandEvent &ev)
+{
+ size_t pos;
+
+ sqlTextField->SetReadOnly(chkReadOnly->GetValue());
+ for (pos = 0; pos < nbNotebook->GetPageCount() - 1; pos++)
+ {
+ nbNotebook->GetPage(pos)->Enable(chkReadOnly->GetValue());
+ }
+
+ if (chkReadOnly->GetValue())
+ {
+ // create a function because this is a duplicated code
+ sqlTextField->SetReadOnly(false);
+ if (btnOK->IsEnabled())
+ {
+ wxString tmp;
+ if (cbClusterSet && cbClusterSet->GetSelection() > 0)
+ {
+ replClientData *data=(replClientData*)cbClusterSet->GetClientData(cbClusterSet->GetSelection());
+ tmp.Printf(_("-- Execute replicated using cluster \"%s\", set %ld\n"), data->cluster.c_str(), data->setId);
+ }
+ sqlTextField->SetText(tmp + GetSql() + GetSql2());
+ }
+ else
+ {
+ if (GetObject())
+ sqlTextField->SetText(_("-- nothing to change"));
+ else
+ sqlTextField->SetText(_("-- definition incomplete"));
+ }
+ sqlTextField->SetReadOnly(true);
+ }
+}
+
+
bool dlgProperty::tryUpdate(wxTreeItemId collectionItem)
{
ctlTree *browser=mainForm->GetBrowser();
@@ -753,7 +820,16 @@
return;
}

- wxString sql=GetSql();
+ wxString sql;
+ if (chkReadOnly->GetValue())
+ {
+ sql = GetSql();
+ }
+ else
+ {
+ sql = sqlTextField->GetText();
+ }
+
wxString sql2=GetSql2();

if (!apply(sql, sql2))
@@ -768,9 +844,10 @@

void dlgProperty::OnPageSelect(wxNotebookEvent& event)
{
- if (sqlPane && event.GetSelection() == (int)nbNotebook->GetPageCount()-1)
+ if (sqlTextField && chkReadOnly->GetValue() &&
+ event.GetSelection() == (int)nbNotebook->GetPageCount()-1)
{
- sqlPane->SetReadOnly(false);
+ sqlTextField->SetReadOnly(false);
if (btnOK->IsEnabled())
{
wxString tmp;
@@ -779,16 +856,16 @@
replClientData *data=(replClientData*)cbClusterSet->GetClientData(cbClusterSet->GetSelection());
tmp.Printf(_("-- Execute replicated using cluster \"%s\", set %ld\n"), data->cluster.c_str(), data->setId);
}
- sqlPane->SetText(tmp + GetSql() + GetSql2());
+ sqlTextField->SetText(tmp + GetSql() + GetSql2());
}
else
{
if (GetObject())
- sqlPane->SetText(_("-- nothing to change"));
+ sqlTextField->SetText(_("-- nothing to change"));
else
- sqlPane->SetText(_("-- definition incomplete"));
+ sqlTextField->SetText(_("-- definition incomplete"));
}
- sqlPane->SetReadOnly(true);
+ sqlTextField->SetReadOnly(true);
}
}

Dave Page a écrit :
> Guillaume Lelarge wrote:
> [...]
>> Ideas ? Comments ?
>
> I think I'd like to see a prototype so we can get a feel for how it
> would work and what might explode. It shouldn't be too hard to do - just
> add an option to the SQL tab, and when selected, lock the tabset to that
> tab. That should be doable on the appropriate base class.
>

Finally, here is the prototype. As I first talked about this one year
ago, I will summarize the idea : adding a checkbox on the SQL tab of an
object's properties to let the user change the SQL query. Checking will
disable the contents of the other tabs because we don't want to try to
reverse engineer the user's changes.

So, here is the patch that does this. I'm sure there's work left to do
(most notably some duplicate code) but, at least, it works for me on two
different scenarios : changing the SQL query and adding another SQL query.

Comments are welcome.

Regards.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

Re: [pgsql-es-ayuda] nuevo release

2008/6/14 José Fermín Francisco Ferreras <josefermin54@hotmail.com>:
> Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la
> versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero,
> cuando salió la versión 8.3.2??
> Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??
>


oops... de veras que nadie lo anuncio aca...

La version 8.3.3 (y tambien las versiones 8.2.9, 8.1.13, 8.0.17 y
7.4.21) salio el Jueves 12, las versiones 8.3.2, 8.2.8, 8.1.12, 8.0.16
y 7.4.20 nunca fueron liberadas *oficialmente* por un error que se
encontro justo antes de su lanzamiento pero si estuvieron disponibles
un par de dias la semana pasada

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda

RE: [pgsql-es-ayuda] nuevo release

Excusenme, ya ví q tardaron 3 días!!


<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>


From: josefermin54@hotmail.com
To: pgsql-es-ayuda@postgresql.org
Subject: [pgsql-es-ayuda] nuevo release
Date: Sat, 14 Jun 2008 13:51:12 +0000

Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero, cuando salió la versión 8.3.2??
Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??


<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>


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


Stop squinting -- view your photos on your TV. Learn more

[pgsql-es-ayuda] nuevo release

Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero, cuando salió la versión 8.3.2??
Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??


<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>


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

Re: [pgadmin-support] Weird Popup Menus - pgAdmin 1.8.4

On Fri, Jun 13, 2008 at 11:56 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:

> There were a bunch of answers. It seems my idea was right. Julian Smart will
> probably revert part of the patch that breaks our shortcuts handling.

Oh, cool. How was your first foray into the wxWidgets community?
Hopefully it didn't feel too strange and alien :-)

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

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

Re: [GENERAL] Source RPM for 8.3.3?

Hi,

On Fri, 2008-06-13 at 10:24 -0700, Kevin Regan wrote:
> I was browsing the postgresql download site, but I wasn't able to find
> the source RPM for 8.3.3. Is it available on the site?

I just finished uploading 8.3.3 SRPMs. They will be on
ftp.postgresql.org in a few hours, after sync.

Also you can grab them from here:

http://yum.pgsqlrpms.org/srpms/8.3/

Regards,
--
Devrim GÜNDÜZ , RHCE
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/

Re: [pgadmin-hackers] Comments on a separate tab?

On Sat, Jun 14, 2008 at 9:50 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Hi,
>
> Properties dialog takes a lot of space. I think it's mainly because of the
> comments textfield. I would find great to put it on its own tab. I haven't
> actually look at the code to see if that's possible at all. I would like to
> know your feelings about this.

Should be straighforward technically speaking, just a bit of effort
because of all the dialogues that would need updating. It seems like a
nice idea, but currently the comment box acts as a 'filler' to ensure
the dialogues look full. Not sure they would all look correct with it
someplace else.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

On Sat, Jun 14, 2008 at 1:25 PM, Jonathan Fuerth <fuerth@sqlpower.ca> wrote:
> On Sat, Jun 14, 2008 at 2:25 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>
>> What would be cool is if it could track the version RSS feed from
>> www.postgresql.org to figure out when it needs to go out and check the
>> others...
>>
>
> Well, which one is most likely to be correct? If the RSS feed needs to
> be updated manually after the new release is added to the FTP site,
> maybe it would make more sense to add the RSS to the list of "pages"
> to verify for up-to-dateness. The primary source of information should
> be correct by default (which is why I'm looking at FTP directory
> names--assuming the release exists iff you can download the source
> code).

The RSS feed is the definitive source. We preload binaries and source
tarballs onto the ftp site a few days before the release, so we don't
want your script bugging us prior to the actual launch otherwise it'll
end up getting forgotten. The data source for the RSS feed is one of
the things that gets updated *at* release time.

Oh, and I would suggest running it daily. If the folks updating the
sites cannot handle same-day updates, or on the odd occasion ignoring
a couple of emails until they can do the update, then they're probably
not the most appropriate people for handling this kind of task anyway.

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

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

Re: [GENERAL] Nested IMMUTABLE functions

Peter wrote:
> I have two immutable Pl/PG funcs - func A takes a parameter X, looks up
> related value Y from a table and passes Y to func B. Now, if I do something
> like
>
> select A(field_x) from bigtable
>
> it will, of course call A for every single row since paramater is changing.
> However, it also calls func B for every row even though most (actually all)
> related values Y are the same!
>
> Is this by design, or flaw in optimizer? I thought immutable funcs with the
> same arguments are only called once within a scope of single query, and that
> 'select A(...)' should have counted as single query, right?

No, not really.
Its rather that the optimizer doesn't consider the content of any
functions that are called. Mostly since this is near to impossible. So
if you call a function, that function will be executed. Any functions
calls internally will therefore also be executed.

A second point is that the optimizer CANNOT make any assumptions on your
data. Your assumption that you look up a value that is nearly always the
same, is not taken into account by the optimizer.

> This stuff is killing me... func B is small, all table lookups optimized to
> the hilt but still I'm taking major performance hit as it's called
> hundreds/thousands of times.

What you can try is the following:
SELECT B(lookuptable.value)
FROM bigtable INNER JOIN lookuptable ON lookuptable.key =
A(bigtable.whatever)

> Any ideas?

A second part is the cost of the actual function. Depending on the costs
various things might be chosen by the optimizer. This should at least
pull out the lookup from your functions, so the optimizer will take them
into consideration.

I can't tell you how SQL stored procedures are handled, but you can be
pretty sure that any PL/* languages are considered as normal procedure
calls by the optimizer.

- Joris

--
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-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

On Sat, Jun 14, 2008 at 2:25 AM, Magnus Hagander <magnus@hagander.net> wrote:
>
> What would be cool is if it could track the version RSS feed from
> www.postgresql.org to figure out when it needs to go out and check the
> others...
>

Well, which one is most likely to be correct? If the RSS feed needs to
be updated manually after the new release is added to the FTP site,
maybe it would make more sense to add the RSS to the list of "pages"
to verify for up-to-dateness. The primary source of information should
be correct by default (which is why I'm looking at FTP directory
names--assuming the release exists iff you can download the source
code).

But I'm assuming the RSS is not generated automatically and the
content at http://www.postgresql.org/ftp/source/ is. I could very well
have the wrong idea about how everything fits together.

Either way, I like your idea of optimizing the checker not to check
all the other pages unless the primary source's version number
changes. Remembering the previous maximum version number would also
allow warnings such as "maximum version is now 8.3.2; last time I
checked it was 8.3.3."

-Jonathan

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