[HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Tom Lane
As of CVS tip, plpgsql handles output parameters, in the style CREATE FUNCTION sum_n_product(x int, y int, OUT sum int, OUT prod int) AS $$ BEGIN sum := x + y; prod := x * y; RETURN; END; $$ LANGUAGE plpgsql; The RETURN statement is kinda useless in this example, but it is still

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Christopher Kings-Lynne
I am thinking we should allow exit by falling off the end of the function when (a) it has output parameter(s), or (b) it is declared RETURNS void. Comments? I agree - makes sense. Chris ---(end of broadcast)--- TIP 6: Have you searched our list

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Dennis Bjorklund
On Tue, 5 Apr 2005, Tom Lane wrote: CREATE FUNCTION sum_n_product(x int, y int, OUT sum int, OUT prod int) AS $$ BEGIN sum := x + y; prod := x * y; RETURN; END; $$ LANGUAGE plpgsql; The RETURN statement is kinda useless in this example, but it is still required, because we

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Tom Lane
Dennis Bjorklund [EMAIL PROTECTED] writes: On Tue, 5 Apr 2005, Tom Lane wrote: CREATE FUNCTION sum_n_product(x int, y int, OUT sum int, OUT prod int) AS $$ BEGIN sum := x + y; prod := x * y; RETURN; END; $$ LANGUAGE plpgsql; The above code example do not have any RETURNS clause, does

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Russell Smith
On Tue, 5 Apr 2005 06:01 am, Joshua D. Drake wrote: Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: ... If there are no license or build issues I'm in favor. Peter has pointed out that the problem of circular dependencies is a showstopper for integrating plPHP. The build

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Martijn van Oosterhout
On Tue, Apr 05, 2005 at 06:06:09PM +1000, Russell Smith wrote: The issue also includes the fact that you can't install libpq without having postgresql installed. If you could do that, the circular dependency wouldn't exist. Some systems build postgresql into php, given that is the case,

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Andrew Dunstan
Greg Sabino Mullane said: Other languages don't require PG to be installed in order to compile them. For example, you can build Perl (with no Postgres on the system), build Postgres and then build DBD::Pg as a completely separate step. Just so we are all on the same sheet of music,

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Martín Marqués
El Lun 04 Abr 2005 17:36, Tom Lane escribió: Joshua D. Drake [EMAIL PROTECTED] writes: Maybe I am just dense, but the argument seems to be completely moot. PHP is no different than Perl or Python in this case. Perl and Python don't have BuildPrereq: postgresql-devel in their rpmspecs.

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Martín Marqués
El Lun 04 Abr 2005 18:00, Doug McNaught escribió: Robert Treat [EMAIL PROTECTED] writes: If by stripped down you mean without postgresql database support then I'll grant you that, but it is no different than other any other pl whose parent language requires postgresql to be installed. If

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Robert Treat
On Tue, 2005-04-05 at 03:43, Tom Lane wrote: Dennis Bjorklund [EMAIL PROTECTED] writes: On Tue, 5 Apr 2005, Tom Lane wrote: CREATE FUNCTION sum_n_product(x int, y int, OUT sum int, OUT prod int) AS $$ BEGIN sum := x + y; prod := x * y; RETURN; END; $$ LANGUAGE plpgsql; The

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Tom Lane
=?iso-8859-1?q?Mart=EDn_Marqu=E9s?= martin@bugs.unl.edu.ar writes: El Lun 04 Abr 2005 17:36, Tom Lane escribió: Perl and Python don't have BuildPrereq: postgresql-devel in their rpmspecs. PHP does. The header files would not be a problem. The real problem is that you also need to have

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: While it is useless in this example, istm it only makes things more confusing to require return in some cases but not in others. Is there some technical advantage to dropping it? It's about the same either way as far as the code is concerned. But I've

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Oleg Bartunov
On Tue, 5 Apr 2005, Tom Lane wrote: Robert Treat [EMAIL PROTECTED] writes: While it is useless in this example, istm it only makes things more confusing to require return in some cases but not in others. Is there some technical advantage to dropping it? It's about the same either way as far as

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Marc G. Fournier
On Tue, 5 Apr 2005, Russell Smith wrote: I may be a bad man for suggesting it... But is it possible to ship libpq as a seperate tarball that you can compile without postgresql server? Actually, its something that I'm going to sit down and work on ... not pulling libpq out of core, but creating

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Tom Lane
Oleg Bartunov oleg@sai.msu.su writes: what if not require RETURN iff OUT parameter is defined ? That's what I'm suggesting ;-) regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose

Re: [HACKERS] [GENERAL] Vacuum time degrading

2005-04-05 Thread Tom Lane
Wes [EMAIL PROTECTED] writes: Ok, now I follow. Taking the biggest indexes: The weekend before: INFO: index message_recipients_i_recip_date now contains 393961361 row versions in 2435100 pages INFO: index message_recipients_i_message now contains 393934394 row versions in 1499853 pages

[HACKERS] REINDEX ALL

2005-04-05 Thread Joshua D. Drake
Hello, We are considering submitting a patch for REINDEX ALL. What syntax would we like? REINDEX ALL? REINDEX DATABASE ALL? Sincerely, Joshua D. Drake -- Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564 Custom programming, 24x7 support, managed services, and hosting Open

Re: [HACKERS] REINDEX ALL

2005-04-05 Thread Hans-Jürgen Schönig
Joshua D. Drake wrote: Hello, We are considering submitting a patch for REINDEX ALL. What syntax would we like? REINDEX ALL? REINDEX DATABASE ALL? Sincerely, Joshua D. Drake -- Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564 Custom programming, 24x7 support, managed services,

Re: [HACKERS] REINDEX ALL

2005-04-05 Thread Tom Lane
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= [EMAIL PROTECTED] writes: What is this patch supposed to do? As far as I can see, there is already a reindex command ... test=# \h reindex Command: REINDEX Description: rebuild indexes Syntax: REINDEX { DATABASE | TABLE | INDEX } name [ FORCE ]

[HACKERS] Call for objections: merge Resdom with TargetEntry

2005-04-05 Thread Tom Lane
I've gotten a bee in my bonnet again about Resdom being wasteful. There is no case where Resdom appears without TargetEntry, nor vice versa, so we ought to fold them into a single node type. Is anyone out there working on a patch that would be seriously affected by such a change? If so speak up

Re: [HACKERS] Call for objections: merge Resdom with TargetEntry

2005-04-05 Thread Alvaro Herrera
On Tue, Apr 05, 2005 at 04:19:54PM -0400, Tom Lane wrote: I've gotten a bee in my bonnet again about Resdom being wasteful. There is no case where Resdom appears without TargetEntry, nor vice versa, so we ought to fold them into a single node type. Gee, I was looking at that code and nearby

Re: [HACKERS] REINDEX ALL

2005-04-05 Thread Joshua D. Drake
The question is coming from the TODO: Allow REINDEX to rebuild all database indexes, remove contrib/reindexdb We can do whatever the community wants :) Just tell us what it is. Sincerely, Joshua D. Drake IIRC, REINDEX DATABASE only reindexes the system catalogs. I suppose Joshua is thinking of

Re: [HACKERS] REINDEX ALL

2005-04-05 Thread Andreas Pflug
Joshua D. Drake wrote: The question is coming from the TODO: Allow REINDEX to rebuild all database indexes, remove contrib/reindexdb We can do whatever the community wants :) Just tell us what it is. RECREATE option that performs like DROP/CREATE INDEX (best without changing the indexes OID)

Re: [HACKERS] REINDEX ALL

2005-04-05 Thread Russell Smith
On Wed, 6 Apr 2005 08:18 am, Andreas Pflug wrote: Joshua D. Drake wrote: The question is coming from the TODO: Allow REINDEX to rebuild all database indexes, remove contrib/reindexdb We can do whatever the community wants :) Just tell us what it is. Does this pose a problem where

Re: [HACKERS] REINDEX ALL

2005-04-05 Thread Joshua D. Drake
Russell Smith wrote: On Wed, 6 Apr 2005 08:18 am, Andreas Pflug wrote: Joshua D. Drake wrote: The question is coming from the TODO: Allow REINDEX to rebuild all database indexes, remove contrib/reindexdb We can do whatever the community wants :) Just tell us what it is. Does this