From rmello@cc.usu.edu Mon Feb 26 14:36:20 2001 Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f1QEaKx81825 for ; Mon, 26 Feb 2001 09:36:20 -0500 (EST) (envelope-from pgsql-docs-owner@postgresql.org) Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1PHXIx19133 for ; Sun, 25 Feb 2001 12:33:22 -0500 (EST) (envelope-from roberto@brasileiro.net) Received: (from roberto@localhost) by brasileiro.net (8.11.2/8.11.2/Debian 8.11.2-1) id f1PHXFG21520 for pgsql-docs@postgresql.org; Sun, 25 Feb 2001 10:33:15 -0700 Date: Sun, 25 Feb 2001 10:33:15 -0700 From: Roberto Mello To: pgsql-docs@postgresql.org Subject: PL/SQL-to-PL/pgSQL-HOWTO Message-ID: <20010225103315.A21512@cc.usu.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline User-Agent: Mutt/1.3.15i X-Archive-Number: 200102/153 X-Sequence-Number: 413 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Here's the HOWTO I wrote. This is what it has: - The basics of how to port from Oracle to PostgreSQL - Several examples of functions in many degrees of complexity - Several tips for working with PL/pgSQL including a table of number of quotes needed to accomplish this or that (many get confused with escaping quotes) - Code for three instr functions that behave exactly like Oracle's I am not a DocBook expert, so I apologize if I made mistakes somewhere or if I did not add some tags that could have made your life easier. I really strived to make a quality document. The document, with exception of parts quoted from other sources (including the PostgreSQL documentation), is licensed under the GNU Free Documentation License, and I would be glad it is of any help. If you have any other documentation that you'd like help with, please let me know. Sincerely, -Roberto Mello -- Computer Science Utah State University Space Dynamics Laboratory Web Developer USU Free Software & GNU/Linux Club http://fslc.usu.edu My home page - http://www.brasileiro.net/roberto --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="plsql-to-plpgsql.sgml" ]>
PL/SQL to PL/pgSQL HOWTO February 2001 Roberto Mello
rmello@fslc.usu.edu
This document explains differences between Oracle's PL/SQL and PostgreSQL's PL/pgSQL in the hopes of helping developers port applications from Oracle to PostgreSQL (e.g. ACS 4.x). Except for portions of this document quoted from other sources, this document is licensed under the GNU Free Documentation License (GFDL). Most of the code here is from the ArsDigita Clickstream module that I ported to PostgreSQL when I took an internship with OpenForce in the summer of 2000.
Getting Started PL/pgSQL is similar to PL/SQL in many aspects. It's a block structured, imperative language (all variables have to be declared). PL/SQL has many more features than its PostgreSQL counterpart, but PL/pgSQL allows for a great deal of functionality and it's being improved. Main Differences Some things you should keep in mind when porting from Oracle to PostgreSQL: No default parameters in PG You can overload functions in PG (can use to work around lack of default parameters) Assignments, loops and conditionals are similar. No need for cursors in PG, just put the query in the FOR statement (example below) In PostgreSQL you need to escape single quotes. See Quote Me on That. All examples here are for PG 7.1, where NULLs in functions are treated correctly and OUTER JOINs are implemented. Quote Me on That In PostgreSQL you need to escape single quotes inside your function definition. This can lead to quite amusing code at times, especially if you are creating a function that generates other function(s). One thing to keep in mind when escaping lots of single quotes is that, except for the beginning/ending quotes, all the others will come in even quantity. So here's the scoop (you'll love this little chart): Single Quotes Escape Chart No. of Quotes Usage Example Result 1 To begin/terminate functions CREATE FUNCTION foo() RETURNS INTEGER AS '...' language 'plpgsql'; ditto 2 In assignments, SELECTs, to delimit strings, etc. a_output := ''Blah''; SELECT * FROM users WHERE f_name=''foobar''; SELECT * FROM users WHERE f_name='foobar'; 4 When you need two single quotes in your resulting string without terminating that string. a_output := a_output || '' AND name LIKE ''''foobar'''' AND ...'' AND name LIKE 'foobar' AND ... 6 When you want double quotes in your resulting string AND terminate that string. a_output := a_output || '' AND name LIKE ''''foobar'''''' AND name LIKE 'foobar' 10 When you want two single quotes in the resulting string (which accounts for 8 quotes) AND terminate that string (2 more). I guess you'd only need that if you were using a function to generate other functions (like in this nasty example). a_output := a_output || '' if v_'' || referrer_keys.kind || '' like '''''''''' || referrer_keys.key_string || '''''''''' then return '''''' || referrer_keys.referrer_type || ''''''; end if;''; if v_<...> like ''<...>'' then return ''<...>''; end if;
Porting Functions A Simple Function Here's an Oracle function: create or replace function cs_fmt_browser_version(v_name IN varchar, v_version IN varchar) return varchar is begin if v_version is null then return v_name; end if; return v_name || '/' || v_version; end; / show errors; Let's go through this function and see the differences to PL/pgSQL: The or replace statement is not allowed. You'll have to explicitly DROP the function before creating it to achieve similar results. PG does not accept named parameter. You'll have to explicitly alias them inside your function. Oracle can have IN, OUT, and INOUT parameters passed to functions. The INOUT for example, means that the parameter will receive a value and return another. PostgreSQL only has IN parameters and functions can return only a single value. The return keyword becomes returns in PG. On PostgreSQL functions are created using single quotes as delimiters, so you have to escape single quotes inside your functions in order to use them (which can be quite annoying at times. See Quote Me on That). The /show errors does not exist in PG. So let's see how this function would be look like ported to PG: drop function cs_fmt_browser_version(varchar,varchar); create function cs_fmt_browser_version(varchar,varchar) returns varchar AS ' declare v_name alias for $1; v_version alias for $2; begin if v_version is null then return v_name; end if; return v_name || ''/'' || v_version; end; ' language 'plpgsql'; A Function that Creates Another Function The following procedure grabs rows from a select statement and builds a giant function with the results for the sake of efficiency. Notice the differences in CURSORs, FOR loops, the need to escape single quotes in PG among other things. create or replace procedure cs_update_referrer_type_proc is cursor referrer_keys is select * from cs_referrer_keys order by try_order; a_output varchar(4000); begin a_output := 'create or replace function cs_find_referrer_type(v_host IN varchar, v_domain IN varchar, v_url IN varchar) return varchar is begin'; for referrer_key in referrer_keys loop a_output := a_output || ' if v_' || referrer_key.kind || ' like ''' || referrer_key.key_string || ''' then return ''' || referrer_key.referrer_type || '''; end if;'; end loop; a_output := a_output || ' return null; end;'; execute immediate a_output; end; / show errors Here's how this function would end up in PG: CREATE FUNCTION cs_update_referrer_type_proc() RETURNS INTEGER AS ' DECLARE referrer_keys RECORD; -- Declare a generic record to be used in a FOR a_output varchar(4000); BEGIN a_output := ''CREATE FUNCTION cs_find_referrer_type(varchar,varchar,varchar) RETURNS varchar AS '''' DECLARE v_host ALIAS FOR $1; v_domain ALIAS FOR $2; v_url ALIAS FOR $3; ''; -- -- Notice how we scan through the results of a query in a FOR loop -- using the FOR ROW construct. -- FOR ROW IN select * from cs_referrer_keys order by try_order LOOP a_output := a_output || '' if v_'' || referrer_keys.kind || '' like '''''''''' || referrer_keys.key_string || '''''''''' then return '''''' || referrer_keys.referrer_type || ''''''; end if;''; END LOOP; a_output := a_output || '' return null; end; '''' language ''''plpgsql'''';''; -- This works because we are not substituting any variables -- Otherwise it would fail. EXECUTE a_output; end; ' language 'plpgsql'; A Procedure With Lots of String Manipulation and OUT parameters The following Oracle PL/SQL procedure is used to parse a URL and return several elements (host, path and query). It is an procedure because in functions only one value can be returned (see Procedures). In PostgreSQL, one way to work around this is to split the procedure in three different functions: one to return the host, another for the path and another for the query. create or replace procedure cs_parse_url( v_url IN varchar, v_host OUT varchar, -- This will be passed back v_path OUT varchar, -- This one too v_query OUT varchar) -- And this one is a_pos1 integer; a_pos2 integer; begin v_host := NULL; v_path := NULL; v_query := NULL; a_pos1 := instr(v_url, '//'); -- PG has no instr function if a_pos1 = 0 then return; end if; a_pos2 := instr(v_url, '/', a_pos1 + 2); if a_pos2 = 0 then v_host := substr(v_url, a_pos1 + 2); v_path := '/'; return; end if; v_host := substr(v_url, a_pos1 + 2, a_pos2 - a_pos1 - 2); a_pos1 := instr(v_url, '?', a_pos2 + 1); if a_pos1 = 0 then v_path := substr(v_url, a_pos2); return; end if; v_path := substr(v_url, a_pos2, a_pos1 - a_pos2); v_query := substr(v_url, a_pos1 + 1); end; / show errors; Here's how this procedure could be translated into PG: drop function cs_parse_url_host(varchar); create function cs_parse_url_host(varchar) returns varchar as ' declare v_url ALIAS FOR $1; v_host varchar; v_path varchar; a_pos1 integer; a_pos2 integer; a_pos3 integer; begin v_host := NULL; a_pos1 := instr(v_url,''//''); if a_pos1 = 0 then return ''''; -- Return a blank end if; a_pos2 := instr(v_url,''/'',a_pos1 + 2); if a_pos2 = 0 then v_host := substr(v_url, a_pos1 + 2); v_path := ''/''; return v_host; end if; v_host := substr(v_url, a_pos1 + 2, a_pos2 - a_pos1 - 2 ); return v_host; end; ' language 'plpgsql'; Note: PostgreSQL has no instr function, so you can work around it using a combination of other functions. I got tired of doing this and created my own instr functions that behave exactly like Oracle's (it makes life easier). See the Appendix for the code. Procedures Oracle procedures give a little more flexibility to the developer because nothing needs to be explicitly returned, but it can be through the use of INOUT or OUT parameters. An example: create or replace procedure cs_create_job(v_job_id in integer) is a_running_job_count integer; pragma autonomous_transaction; begin lock table cs_jobs in exclusive mode; select count(*) into a_running_job_count from cs_jobs where end_stamp is null; if a_running_job_count > 0 then commit; -- free lock raise_application_error(-20000, 'Unable to create a new job: a job is currently running.'); end if; delete from cs_active_job; insert into cs_active_job(job_id) values(v_job_id); begin insert into cs_jobs(job_id, start_stamp) values(v_job_id, sysdate); exception when dup_val_on_index then null; -- don't worry if it already exists end; commit; end; / show errors Procedures like this can be easily converted into PG functions returning an INTEGER. This procedure in particular is interesting because it can teach us some things: There's no pragma statement in PG. If you do a LOCK TABLE in PL/pgSQL, the lock will only be released when the function resumes. You also can't have transactions in PL/pgSQL procedures. The entire function (and other functions called from therein) is executed in a transaction and PG rolls back the results if something goes wrong. Therefore only one BEGIN statement is allowed. The exception when would have to be replaced with an IF statement. Notice how you can raise errors an notices in PL/pgSQL. So let's see one of the ways we could port this procedure to PL/pgSQL: drop function cs_create_job(integer); create function cs_create_job(integer) returns integer as ' declare v_job_id alias for $1; a_running_job_count integer; a_num integer; -- pragma autonomous_transaction; begin lock table cs_jobs in exclusive mode; select count(*) into a_running_job_count from cs_jobs where end_stamp is null; if a_running_job_count > 0 then -- commit; -- free lock raise exception ''Unable to create a new job: a job is currently running.''; end if; delete from cs_active_job; insert into cs_active_job(job_id) values(v_job_id); SELECT count(*) into a_num FROM cs_jobs WHERE job_id=v_job_id; IF NOT FOUND THEN -- If nothing was returned in the last query -- This job is not in the table so lets insert it. insert into cs_jobs(job_id, start_stamp) values(v_job_id, sysdate()); return 1; ELSE raise NOTICE ''Job already running.''; END IF; return 0; end; ' language 'plpgsql'; Packages Note: I haven't done much with packages myself, so if there are mistakes here, please let me know. Packages area way Oracle gives you to encapsulate PL/SQL statements and functions into one thing. Like Java classes, where you define methods and objects. You can access these objects/methods with a "." (dot). Here's an example of an Oracle package from ACS 4 (the ArsDigita Community System): create or replace package body acs as function add_user ( user_id in users.user_id%TYPE default null, object_type in acs_objects.object_type%TYPE default 'user', creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE default null, creation_ip in acs_objects.creation_ip%TYPE default null, ... ) return users.user_id%TYPE is v_user_id users.user_id%TYPE; v_rel_id membership_rels.rel_id%TYPE; begin v_user_id := acs_user.new (user_id, object_type, creation_date, creation_user, creation_ip, email, ... return v_user_id; end; end acs; / show errors We port this to PostgreSQL by creating the different objects within an Oracle package as functions with a standard naming convention. We have to pay attention to some other details, like the lack of default parameters in PostgreSQL functions. The above package would become something like this: CREATE FUNCTION acs__add_user(integer,integer,varchar,datetime,integer,integer,...) RETURNS integer AS ' DECLARE user_id ALIAS FOR $1; object_type ALIAS FOR $2; creation_date ALIAS FOR $3; creation_user ALIAS FOR $4; creation_ip ALIAS FOR $5; .... v_user_id users.user_id%TYPE; v_rel_id membership_rels.rel_id%TYPE; BEGIN v_user_id := acs_user__new(user_id,object_type,creation_date,creation_user,creation_ip,...); ... return v_user_id; END; ' language 'plpgsql'; Other Things to Watch For EXECUTE The PostgreSQL version of execute works nicely, but you have to remember some things: You should use quote_literal(TEXT) and quote_string(TEXT). According to the PostgreSQL Programmer's Guide "Variables containing field and table identifiers should be passed to function quote_ident(). Variables containing literal elements of the dynamic query string should be passed to quote_literal(). Both take the appropriate steps to return the input text enclosed in single or double quotes and with any embedded special characters intact." Constructs of the type EXECUTE ''SELECT * from $1''; will not work unless you use the above functions. Optimizing PL/pgSQL Functions PostgreSQL gives you two function creation modifiers to optimize execution. From the PostgreSQL Reference: iscachable indicates that the function always returns the same result when given the same argument values (i.e., it does not do database lookups or otherwise use information not directly present in its parameter list). The optimizer uses to know whether it is safe to pre-evaluate a call of the function. isstrict indicates that the function always returns NULL whenever any of its arguments are NULL. If this attribute is specified, the function is not executed when there are NULL arguments; instead a NULL result is assumed automatically. When is not specified, the function will be called for NULL inputs. It is then the function author's responsibility to check for NULLs if necessary and respond appropriately. To make use of these optimization attributes, you have to use the WITH modifier in your CREATE FUNCTION statement. Something like: CREATE FUNCTION foo(...) RETURNS integer AS ' ... ' language 'plpgsql' WITH(isstrict,iscachable); Appendix Code for my instr functions The third function (that takes 4 parameters) is implemented in PL/Tcl but I plan on porting it to PL/pgSQL so in case we want to include it in OpenACS we don't need to require PL/Tcl. Plus PL/pgSQL should be more efficient. -- -- instr functions that mimic Oracle's counterpart -- Syntax: instr(string1,string2,[n],[m]) where [] denotes optional params. -- -- Searches string1 beginning at the nth character for the mth -- occurrence of string2. If n is negative, search backwards. If m is -- not passed, assume 1 (search starts at first character). -- -- by Roberto Mello (rmello@fslc.usu.edu) -- Licensed under the GPL v2 or later. -- DROP FUNCTION instr(varchar,varchar); CREATE FUNCTION instr(varchar,varchar) RETURNS integer AS ' DECLARE pos integer; BEGIN pos:= instr($1,$2,1); RETURN pos; END; ' language 'plpgsql'; DROP FUNCTION instr(varchar,varchar,integer); CREATE FUNCTION instr(varchar,varchar,integer) RETURNS integer AS ' DECLARE string ALIAS FOR $1; string_to_search ALIAS FOR $2; beg_index ALIAS FOR $3; pos integer NOT NULL DEFAULT 0; ending integer; temp_str varchar; beg integer; length integer; temp_int integer; BEGIN IF beg_index > 0 THEN -- Get substring from 1 to beg_index temp_str := substring(string FROM beg_index); pos := position(string_to_search IN temp_str); IF pos = 0 THEN RETURN 0; ELSE RETURN pos + beg_index - 1; END IF; ELSE length := char_length(string); IF beg_index = -1 THEN ending := length; beg := ending; temp_int := 1; ELSE ending := length - abs(beg_index); beg := ending; temp_int := ending - beg; END IF; WHILE pos = 0 AND beg <> 1 LOOP temp_str := substring(string FROM beg FOR temp_int); pos := position(string_to_search IN temp_str); -- Keep moving left beg := beg - 1; temp_int := (ending - beg) + 1; END LOOP; END IF; IF pos = 0 THEN RETURN 0; ELSE RETURN beg + 1; END IF; END; ' language 'plpgsql'; -- -- The next one (where all four params are passed) is in PL/Tcl -- because I had no more patience to do it in PL/pgSQL. -- It'd probably be faster in PL/pgSQL (that being the reason why -- I implemented the first two functions in PL/pgSQL) so someday I'll do it. -- DROP FUNCTION instr(varchar,varchar,integer,integer); CREATE FUNCTION instr(varchar,varchar,integer,integer) RETURNS integer AS ' set string1 $1 set string2 $2 set n $3 set m $4 if { $n > 0 } { set pos [string first $string2 $string1 [expr $n -1]] if { $pos < 0 } { return 0 } else { for { set i 1 } { $i < $m } { incr i } { set pos [string first $string2 $string1 [expr $pos + 1]] if { $pos < 0 } { return 0 } } } } if { $n < 0 } { set pos [string last $string2 $string1 [expr [string length $string1] + $n]] if { $pos < 0 } { return 0 } else { for { set i 1 } { $i < $m } { incr i } { # n is negative so we add set pos [string last $string2 $string1 [expr $pos - 1]] if { $pos < 0 } { return 0 } } } } if { $pos < 0 } { return 0 } else { return [expr $pos + 1] } ' language 'pltcl';
--X1bOJ3K7DJ5YkBrT-- From rmello@cc.usu.edu Mon Feb 26 15:35:42 2001 Received: from fslc.usu.edu (fslc.usu.edu [129.123.2.40]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1QFZgx93453 for ; Mon, 26 Feb 2001 10:35:42 -0500 (EST) (envelope-from rmello@fslc.usu.edu) Received: (from rmello@localhost) by fslc.usu.edu (8.11.2/8.11.2/Debian 8.11.2-1) id f1QFZaW06653 for pgsql-docs@postgresql.org; Mon, 26 Feb 2001 08:35:36 -0700 Date: Mon, 26 Feb 2001 08:35:36 -0700 From: Roberto Mello To: pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO Message-ID: <20010226083536.A6615@cc.usu.edu> References: <20010225103315.A21512@cc.usu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i In-Reply-To: <20010225103315.A21512@cc.usu.edu>; from rmello@cc.usu.edu on Sun, Feb 25, 2001 at 10:33:15AM -0700 X-Archive-Number: 200102/154 X-Sequence-Number: 414 On Sun, Feb 25, 2001 at 10:33:15AM -0700, Roberto Mello wrote: > Hi, > > Here's the HOWTO I wrote. This is what it has: In pgsql-hackers I was told to submit the HOWTO to pgsql-docs and didn't know that this was a list. I apologize for those in the list for the big sgml file you've received. I thought this was a submission address for Thomas Lockhart. Once again, my apologies, -Roberto Mello -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club|------+ | Roberto Mello - Computer Science, USU - http://www.brasileiro.net | | http://www.sdl.usu.edu - Space Dynamics Lab, Web Developer | Friends encourage friends to use Win(e)dows - under Linux! From lockhart@alumni.caltech.edu Mon Feb 26 18:29:57 2001 Received: from golem.fourpalms.org (www.fourpalms.org [64.3.68.148]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1QITvx15910 for ; Mon, 26 Feb 2001 13:29:57 -0500 (EST) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (localhost.localdomain [127.0.0.1]) by golem.fourpalms.org (Postfix) with ESMTP id 33AD6FEB4; Mon, 26 Feb 2001 18:29:55 +0000 (UTC) Message-ID: <3A9AA0A3.61D1400C@alumni.caltech.edu> Date: Mon, 26 Feb 2001 18:29:55 +0000 From: Thomas Lockhart Reply-To: lockhart@fourpalms.org Organization: Yes X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 To: Roberto Mello Cc: pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO References: <20010225103315.A21512@cc.usu.edu> <20010226083536.A6615@cc.usu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/156 X-Sequence-Number: 416 > In pgsql-hackers I was told to submit the HOWTO to pgsql-docs and > didn't know that this was a list. I apologize for those in the list for > the big sgml file you've received. I thought this was a submission address > for Thomas Lockhart. No need to apologize; afaik it is appropriate to submit content to this list (it isn't *that* high traffic, and documentation-types should be interested in this). OTOH, I apologize for my ignorance here: what is the "GNU documentation license"? - Thomas From reedstrm@rice.edu Mon Feb 26 20:47:43 2001 Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1QKlhx31650 for ; Mon, 26 Feb 2001 15:47:43 -0500 (EST) (envelope-from reedstrm@rice.edu) Received: by rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-docs@postgresql.org; Mon, 26 Feb 2001 14:47:36 -0600 (CST) Date: Mon, 26 Feb 2001 14:47:36 -0600 From: "Ross J. Reedstrom" To: pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO Message-ID: <20010226144736.B14049@rice.edu> References: <20010225103315.A21512@cc.usu.edu> <20010226083536.A6615@cc.usu.edu> <3A9AA0A3.61D1400C@alumni.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: <3A9AA0A3.61D1400C@alumni.caltech.edu>; from lockhart@alumni.caltech.edu on Mon, Feb 26, 2001 at 06:29:55PM +0000 X-Archive-Number: 200102/157 X-Sequence-Number: 417 On Mon, Feb 26, 2001 at 06:29:55PM +0000, Thomas Lockhart wrote: > > In pgsql-hackers I was told to submit the HOWTO to pgsql-docs and > > didn't know that this was a list. I apologize for those in the list for > > the big sgml file you've received. I thought this was a submission address > > for Thomas Lockhart. > > No need to apologize; afaik it is appropriate to submit content to this > list (it isn't *that* high traffic, and documentation-types should be > interested in this). > > OTOH, I apologize for my ignorance here: what is the "GNU documentation > license"? http://www.gnu.org/copyleft/fdl.html Another interesting license is the Open Publication License: http://opencontent.org/openpub/ Actually, that's a good question. We've had the regular go-arounds on HACKERs regarding code licensing (short answer: it'll stay BSD for the forseeable future), but never discussed documentation licenses. It sort of came up when Bruce's book came out, but not much was said. For code, we've been less selective about what's in contrib than the core tree, isn't that the case? I count 12 occurences of files license under the GPL in contrib. So, for doco, do we need to make the same restriction? Are there real differences in how docs should be licensed, compared to software? Personally, I find the distinction between BSD and GPL like licenses almost meaningless in the world of docs: either license allows unlimited copying, and require crediting the original authors. THe biggest difference is requiring the 'source code' to be provided. The 'source code' for a doc is easily recoverable from the distributed 'compiled' version, unlike the case for software. So, what do people think? Ross From lockhart@alumni.caltech.edu Mon Feb 26 21:52:06 2001 Received: from golem.fourpalms.org (www.fourpalms.org [64.3.68.148]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1QLq6x37030 for ; Mon, 26 Feb 2001 16:52:06 -0500 (EST) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (localhost.localdomain [127.0.0.1]) by golem.fourpalms.org (Postfix) with ESMTP id 36E0AFEB4; Mon, 26 Feb 2001 21:52:03 +0000 (UTC) Message-ID: <3A9AD003.3BA2F960@alumni.caltech.edu> Date: Mon, 26 Feb 2001 21:52:03 +0000 From: Thomas Lockhart Reply-To: lockhart@fourpalms.org Organization: Yes X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 To: "Ross J. Reedstrom" Cc: pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO References: <20010225103315.A21512@cc.usu.edu> <20010226083536.A6615@cc.usu.edu> <3A9AA0A3.61D1400C@alumni.caltech.edu> <20010226144736.B14049@rice.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/158 X-Sequence-Number: 418 > Actually, that's a good question. We've had the regular go-arounds on > HACKERs regarding code licensing (short answer: it'll stay BSD for the > forseeable future), but never discussed documentation licenses. It > sort of came up when Bruce's book came out, but not much was said. The conclusion was that the docs are licensed under the same license as the source code (simply: do whatever you want, but preserve the BSD-style copyright notice available with the source code). afaict, that actually did not happen for Bruce's book (no copyright notices other than Addison Wesley). But presumably A-W will not try to push their apparent copyright on our docs ;) istm that a paragraph at the front with the copyright notices about "Portions of this book are from... which is copyright..." might be appropriate in most cases. > For code, we've been less selective about what's in contrib than the > core tree, isn't that the case? I count 12 occurences of files license > under the GPL in contrib. So, for doco, do we need to make the same > restriction? This contribution is a standalone "article" in the DocBook sense, so does not depend on other docs or pieces of docs. But it *does* raise some encumbrances wrt keeping the source code available for a year after the last formatted version is distributed. Not sure how we guarantee that, since we don't have an official mechanism defined to preserve tarballs etc for posterity :( afaict, the FDL does not specifically allow one to replace a version with a newer version, and asks that the original sources be kept intact, at least to meet the 1 year source code rule. otoh, someone probably has old tarballs saved (I used to, until my MO drive failed). - Thomas From rmello@cc.usu.edu Mon Feb 26 22:05:55 2001 Received: from fslc.usu.edu (fslc.usu.edu [129.123.2.40]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1QM5tx38576 for ; Mon, 26 Feb 2001 17:05:55 -0500 (EST) (envelope-from rmello@fslc.usu.edu) Received: (from rmello@localhost) by fslc.usu.edu (8.11.2/8.11.2/Debian 8.11.2-1) id f1QM5pW25495 for pgsql-docs@postgresql.org; Mon, 26 Feb 2001 15:05:51 -0700 Date: Mon, 26 Feb 2001 15:05:51 -0700 From: Roberto Mello To: pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO Message-ID: <20010226150551.A25479@cc.usu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i X-Archive-Number: 200102/159 X-Sequence-Number: 419 On Mon, Feb 26, 2001 at 06:29:55PM +0000, Thomas Lockhart wrote: > > No need to apologize; afaik it is appropriate to submit content to this > list (it isn't *that* high traffic, and documentation-types should be > interested in this). Oh ok. I just didn't want to look like a jerk in my first post to the DOCS list :) Thanks for letting me know. > OTOH, I apologize for my ignorance here: what is the "GNU documentation > license"? It's a documentation license with the same spirit as the GPL basically. I only licensed it under the GFDL because it was the only one I knew of. If that poses a problem for inclusion into the PG docs (which are BSD licensed? how does the BSD licenso apply to documentation?) please let's discuss it so we can reach an agreement. All I want is to help the PG docs to be better. Is there a "Documentation-TODO" somewhere? I'd be happy to tackle something else when I finish PL/pgSQL. On that topic (PL/pgSQL) I wanted to know from Thomas if it's ok for mo to break the topics in the PL/pgSQL docs. I find that the "everything-under-description" approach is confusing to refer to. It's hard to see the topics, etc. Breaking up the topics under "description" would also allow we to add more specific and rich examples. That's one of the reasons I like the lpd.dsl stylesheet. It creates tables of contents with 's listed. (look at http://www.brasileiro.net/roberto/howto for an example). Thoughts? -Roberto -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club|------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net http://www.sdl.usu.edu - Space Dynamics Lab, Web Developer Backup my hard drive?! I can't find the reverse switch! From pgman@candle.pha.pa.us Mon Feb 26 22:48:33 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1QMmXx41848 for ; Mon, 26 Feb 2001 17:48:33 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id RAA20277; Mon, 26 Feb 2001 17:48:16 -0500 (EST) From: Bruce Momjian Message-Id: <200102262248.RAA20277@candle.pha.pa.us> Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO In-Reply-To: <3A9AD003.3BA2F960@alumni.caltech.edu> "from Thomas Lockhart at Feb 26, 2001 09:52:03 pm" To: lockhart@fourpalms.org Date: Mon, 26 Feb 2001 17:48:16 -0500 (EST) CC: "Ross J. Reedstrom" , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200102/161 X-Sequence-Number: 421 > > Actually, that's a good question. We've had the regular go-arounds on > > HACKERs regarding code licensing (short answer: it'll stay BSD for the > > forseeable future), but never discussed documentation licenses. It > > sort of came up when Bruce's book came out, but not much was said. > > The conclusion was that the docs are licensed under the same license as > the source code (simply: do whatever you want, but preserve the > BSD-style copyright notice available with the source code). > > afaict, that actually did not happen for Bruce's book (no copyright > notices other than Addison Wesley). But presumably A-W will not try to > push their apparent copyright on our docs ;) That is a good point. My book clearly states the man pages are from the PostgreSQL documentation, but doesn't mention the license applies to those pages. I will address this with AW on the next printing. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From lockhart@alumni.caltech.edu Mon Feb 26 23:38:16 2001 Received: from golem.fourpalms.org (www.fourpalms.org [64.3.68.148]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1QNcGx46061 for ; Mon, 26 Feb 2001 18:38:16 -0500 (EST) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (localhost.localdomain [127.0.0.1]) by golem.fourpalms.org (Postfix) with ESMTP id EF819FEB4; Mon, 26 Feb 2001 23:38:12 +0000 (UTC) Message-ID: <3A9AE8E4.A8FCC820@alumni.caltech.edu> Date: Mon, 26 Feb 2001 23:38:12 +0000 From: Thomas Lockhart Reply-To: lockhart@fourpalms.org Organization: Yes X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 To: Bruce Momjian Cc: lockhart@fourpalms.org, "Ross J. Reedstrom" , pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO References: <200102262248.RAA20277@candle.pha.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/162 X-Sequence-Number: 422 > > afaict, that actually did not happen for Bruce's book (no copyright > > notices other than Addison Wesley). But presumably A-W will not try to > > push their apparent copyright on our docs ;) > That is a good point. My book clearly states the man pages are from the > PostgreSQL documentation, ... Yes it does. I didn't want to dwell on this so didn't go into detail on how you checked with *everyone* before including them, have the cross-reference to the originals in your book, etc etc. They are being used in the way they are intended to be used! > ... but doesn't mention the license applies to > those pages. I will address this with AW on the next printing. Great! - Thomas From peter_e@gmx.net Tue Feb 27 15:35:25 2001 Received: from mailout00.sul.t-online.com (mailout00.sul.t-online.com [194.25.134.16]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1RFZPx66880 for ; Tue, 27 Feb 2001 10:35:25 -0500 (EST) (envelope-from peter_e@gmx.net) Received: from fwd05.sul.t-online.com by mailout00.sul.t-online.com with smtp id 14Xm9Y-0004Dd-08; Tue, 27 Feb 2001 16:35:04 +0100 Received: from peter.localdomain (520083510237-0001@[217.80.144.4]) by fmrl05.sul.t-online.com with esmtp id 14Xm9Q-1ufhc8C; Tue, 27 Feb 2001 16:34:56 +0100 Date: Tue, 27 Feb 2001 16:44:16 +0100 (CET) From: Peter Eisentraut To: "Ross J. Reedstrom" cc: Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO In-Reply-To: <20010226144736.B14049@rice.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: 520083510237-0001@t-dialin.net X-Archive-Number: 200102/168 X-Sequence-Number: 428 Ross J. Reedstrom writes: > Actually, that's a good question. We've had the regular go-arounds on > HACKERs regarding code licensing (short answer: it'll stay BSD for the > forseeable future), but never discussed documentation licenses. This is easy: Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement ^^^^^^^^^^^^^ is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. > The 'source code' for a doc is easily recoverable from the distributed > 'compiled' version, unlike the case for software. Have you ever looked at a PS or PDF file lately? ;-) -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/ From peter_e@gmx.net Tue Feb 27 15:49:53 2001 Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1RFnrx68244 for ; Tue, 27 Feb 2001 10:49:53 -0500 (EST) (envelope-from peter_e@gmx.net) Received: from fwd00.sul.t-online.com by mailout01.sul.t-online.com with smtp id 14XmNi-0002JB-01; Tue, 27 Feb 2001 16:49:42 +0100 Received: from peter.localdomain (520083510237-0001@[217.80.144.4]) by fmrl00.sul.t-online.com with esmtp id 14XmNJ-0reSdEC; Tue, 27 Feb 2001 16:49:17 +0100 Date: Tue, 27 Feb 2001 16:58:36 +0100 (CET) From: Peter Eisentraut To: Roberto Mello cc: Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO In-Reply-To: <20010226150551.A25479@cc.usu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: 520083510237-0001@t-dialin.net X-Archive-Number: 200102/169 X-Sequence-Number: 429 Roberto Mello writes: > It's a documentation license with the same spirit as the GPL > basically. I only licensed it under the GFDL because it was the only one I > knew of. If that poses a problem for inclusion into the PG docs (which are > BSD licensed? how does the BSD licenso apply to documentation?) please Like this: : Permission to use, copy, modify, and distribute this software and its : documentation for any purpose, without fee, and without a written agreement ^^^^^^^^^^^^^ : is hereby granted, provided that the above copyright notice and this : paragraph and the following two paragraphs appear in all copies. > let's discuss it so we can reach an agreement. > All I want is to help the PG docs to be better. Is there a > "Documentation-TODO" somewhere? I'd be happy to tackle something else when > I finish PL/pgSQL. Not really. You get to pick. But I can tell you a few things that I would personally like to see done. > On that topic (PL/pgSQL) I wanted to know from Thomas if it's ok for > mo to break the topics in the PL/pgSQL docs. I find that the > "everything-under-description" approach is confusing to refer to. It's > hard to see the topics, etc. Breaking up the topics under "description" > would also allow we to add more specific and rich examples. I say, whatever you say goes. ;-) > That's one of the reasons I like the lpd.dsl stylesheet. It creates > tables of contents with 's listed. (look at > http://www.brasileiro.net/roberto/howto for an example). We got that too now. Since Sunday, I think. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/ From reedstrm@rice.edu Tue Feb 27 20:18:05 2001 Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1RKI5x02828 for ; Tue, 27 Feb 2001 15:18:05 -0500 (EST) (envelope-from reedstrm@rice.edu) Received: by rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-docs@postgresql.org; Tue, 27 Feb 2001 14:17:56 -0600 (CST) Date: Tue, 27 Feb 2001 14:17:56 -0600 From: "Ross J. Reedstrom" To: Peter Eisentraut Cc: pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO Message-ID: <20010227141756.A21510@rice.edu> References: <20010226144736.B14049@rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: ; from peter_e@gmx.net on Tue, Feb 27, 2001 at 04:44:16PM +0100 X-Archive-Number: 200102/170 X-Sequence-Number: 430 On Tue, Feb 27, 2001 at 04:44:16PM +0100, Peter Eisentraut wrote: > Ross J. Reedstrom writes: > > > Actually, that's a good question. We've had the regular go-arounds on > > HACKERs regarding code licensing (short answer: it'll stay BSD for the > > forseeable future), but never discussed documentation licenses. > > This is easy: > > Permission to use, copy, modify, and distribute this software and its > documentation for any purpose, without fee, and without a written agreement > ^^^^^^^^^^^^^ > is hereby granted, provided that the above copyright notice and this > paragraph and the following two paragraphs appear in all copies. Ah, good. Settled then. > > > The 'source code' for a doc is easily recoverable from the distributed > > 'compiled' version, unlike the case for software. > > Have you ever looked at a PS or PDF file lately? ;-) Actually, yes. Have you seen what pstoedit is capable of? I'm often astounded how good it's output is. As a test, I just ran the latest PDF I've got, which came from a journal article. Used xpdf to create a postscript file, and pstoedit to make a fig file from that. Granted, it's still a drawing format, but automated extraction from the well documented fig format would be rather simple. All of this is beside the point, in any case. What I meant was not that the "source" was _automatically_ recoverable, but easily, in the technical sense: I can pay a typist (perhaps in a developing world document bodyshop: such exist) to generate source code for me, since I've got the license to copy, modify, and distribute it, regardless if it's FDL or BSD licensed. If it's FDL, I don't have to pay the typist. But I can't add my own chapter and not allow it to be copied, either. But it's settled. BSD doco it is. Ross From peter_e@gmx.net Tue Mar 6 17:11:31 2001 Received: from mailout00.sul.t-online.com (mailout00.sul.t-online.com [194.25.134.16]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f26HAsx38572 for ; Tue, 6 Mar 2001 12:11:31 -0500 (EST) (envelope-from peter_e@gmx.net) Received: from fwd00.sul.t-online.com by mailout00.sul.t-online.com with smtp id 14aKyf-0002OK-03; Tue, 06 Mar 2001 18:10:25 +0100 Received: from peter.localdomain (520083510237-0001@[217.80.144.13]) by fmrl00.sul.t-online.com with esmtp id 14aKxm-1sKEk4C; Tue, 6 Mar 2001 18:09:30 +0100 Date: Tue, 6 Mar 2001 18:19:06 +0100 (CET) From: Peter Eisentraut To: Roberto Mello cc: Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO In-Reply-To: <20010225103315.A21512@cc.usu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: 520083510237-0001@t-dialin.net X-Archive-Number: 200103/27 X-Sequence-Number: 458 Roberto Mello writes: > Here's the HOWTO I wrote. If you can agree that we ship our documentation under the BSD license, I'm ready to integrate this into the existing PL/pgSQL chapter. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/ From rmello@cc.usu.edu Wed Mar 7 00:26:44 2001 Received: from fslc.usu.edu (fslc.usu.edu [129.123.2.40]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f270Qhx07046 for ; Tue, 6 Mar 2001 19:26:44 -0500 (EST) (envelope-from rmello@fslc.usu.edu) Received: (from rmello@localhost) by fslc.usu.edu (8.11.2/8.11.2/Debian 8.11.2-1) id f270QEb29843; Tue, 6 Mar 2001 17:26:14 -0700 Date: Tue, 6 Mar 2001 17:26:14 -0700 From: Roberto Mello To: Peter Eisentraut , pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO Message-ID: <20010306172614.B29723@cc.usu.edu> References: <20010225103315.A21512@cc.usu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i In-Reply-To: ; from peter_e@gmx.net on Tue, Mar 06, 2001 at 06:19:06PM +0100 X-Archive-Number: 200103/35 X-Sequence-Number: 466 On Tue, Mar 06, 2001 at 06:19:06PM +0100, Peter Eisentraut wrote: > Roberto Mello writes: > > > Here's the HOWTO I wrote. > > If you can agree that we ship our documentation under the BSD license, I'm > ready to integrate this into the existing PL/pgSQL chapter. Yeah, I don't have any problem with that. I'll rewrite the license line and send a new tar ball to you, with some corrected things. Also, when is the deadline to submit documentation for the PG team? With all the WAL fuss going on the hackers list it maybe at least one more week? I ask because I'd really like to revamp the PL/pgSQL docs, make it much more detailed, with more examples, and better divisions. But I've been swamped with school work. But next week is spring break so I'd have time to work on it. What do you say? -Roberto -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club|------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net http://www.sdl.usu.edu - Space Dynamics Lab, Web Developer "Hello, World!" 17 Errors, 31 Warnings.... From lamar.owen@wgcr.org Wed Mar 7 00:32:07 2001 Received: from www.wgcr.org (www.wgcr.org [206.74.232.194]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f270W7x08267 for ; Tue, 6 Mar 2001 19:32:07 -0500 (EST) (envelope-from lamar.owen@wgcr.org) Received: from wgcr.org ([10.1.2.1]) by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id TAA11941; Tue, 6 Mar 2001 19:32:08 -0500 Message-ID: <3AA5817D.8A8A750@wgcr.org> Date: Tue, 06 Mar 2001 19:31:57 -0500 From: Lamar Owen X-Mailer: Mozilla 4.73 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: Roberto Mello CC: Peter Eisentraut , pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO References: <20010225103315.A21512@cc.usu.edu> <20010306172614.B29723@cc.usu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/36 X-Sequence-Number: 467 Roberto Mello wrote: > I ask because I'd really like to revamp the PL/pgSQL docs, make it > much more detailed, with more examples, and better divisions. But I've > been swamped with school work. But next week is spring break so I'd have > time to work on it. > What do you say? For the record, Roberto writes good docs. And he knows of what he writes, having assisted for over a year in the OpenACS effort, porting the rather complex ACS Orcale-centric code over to PostgreSQL. -- Lamar Owen WGCR Internet Radio 1 Peter 4:11 From lockhart@alumni.caltech.edu Wed Mar 7 01:31:26 2001 Received: from myst.fourpalms.org (myst.jpl.nasa.gov [137.78.15.105]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f271VQx13841 for ; Tue, 6 Mar 2001 20:31:26 -0500 (EST) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (localhost.localdomain [127.0.0.1]) by myst.fourpalms.org (Postfix) with ESMTP id 2FE33C592; Wed, 7 Mar 2001 00:32:36 +0000 (UTC) Message-ID: <3AA581A3.A783866C@alumni.caltech.edu> Date: Wed, 07 Mar 2001 00:32:35 +0000 From: Thomas Lockhart Reply-To: thomas@pgsql.com Organization: PostgreSQL X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: Roberto Mello Cc: Peter Eisentraut , pgsql-docs@postgresql.org Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO References: <20010225103315.A21512@cc.usu.edu> <20010306172614.B29723@cc.usu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/39 X-Sequence-Number: 470 > Also, when is the deadline to submit documentation for the PG team? > With all the WAL fuss going on the hackers list it maybe at least one more > week? > I ask because I'd really like to revamp the PL/pgSQL docs, make it > much more detailed, with more examples, and better divisions. But I've > been swamped with school work. But next week is spring break so I'd have > time to work on it. > What do you say? Peter, is this OK with you? It will go into the programmer's doc, and we can freeze that a bit later than some others. It is OK with me. Until March 16? - Thomas From pgman@candle.pha.pa.us Wed Mar 7 01:15:44 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f271Fix12330 for ; Tue, 6 Mar 2001 20:15:44 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id UAA16971; Tue, 6 Mar 2001 20:08:43 -0500 (EST) From: Bruce Momjian Message-Id: <200103070108.UAA16971@candle.pha.pa.us> Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO In-Reply-To: <3AA5817D.8A8A750@wgcr.org> "from Lamar Owen at Mar 6, 2001 07:31:57 pm" To: Lamar Owen Date: Tue, 6 Mar 2001 20:08:43 -0500 (EST) CC: Roberto Mello , Peter Eisentraut , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/37 X-Sequence-Number: 468 > Roberto Mello wrote: > > I ask because I'd really like to revamp the PL/pgSQL docs, make it > > much more detailed, with more examples, and better divisions. But I've > > been swamped with school work. But next week is spring break so I'd have > > time to work on it. > > What do you say? > > For the record, Roberto writes good docs. And he knows of what he > writes, having assisted for over a year in the OpenACS effort, porting > the rather complex ACS Orcale-centric code over to PostgreSQL. Yes, I am very excited to get this. We need more Pl/PgSQL docs, and I hear this one is really good. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From pgman@candle.pha.pa.us Wed Mar 7 01:16:38 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f271Gcx12476 for ; Tue, 6 Mar 2001 20:16:38 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id UAA17011; Tue, 6 Mar 2001 20:09:48 -0500 (EST) From: Bruce Momjian Message-Id: <200103070109.UAA17011@candle.pha.pa.us> Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO In-Reply-To: <20010306172614.B29723@cc.usu.edu> "from Roberto Mello at Mar 6, 2001 05:26:14 pm" To: Roberto Mello Date: Tue, 6 Mar 2001 20:09:48 -0500 (EST) CC: Peter Eisentraut , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/38 X-Sequence-Number: 469 > On Tue, Mar 06, 2001 at 06:19:06PM +0100, Peter Eisentraut wrote: > > Roberto Mello writes: > > > > > Here's the HOWTO I wrote. > > > > If you can agree that we ship our documentation under the BSD license, I'm > > ready to integrate this into the existing PL/pgSQL chapter. > > Yeah, I don't have any problem with that. I'll rewrite the license > line and send a new tar ball to you, with some corrected things. > Also, when is the deadline to submit documentation for the PG team? > With all the WAL fuss going on the hackers list it maybe at least one more > week? > I ask because I'd really like to revamp the PL/pgSQL docs, make it > much more detailed, with more examples, and better divisions. But I've > been swamped with school work. But next week is spring break so I'd have > time to work on it. > What do you say? I think that will work. The best way to go is to contact Thomas Lockhart/docs list and let them know you want to work on this. They can warn you about cutoff times for each section of the documentation. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From pgman@candle.pha.pa.us Wed Mar 7 02:58:46 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f272wkx47962 for ; Tue, 6 Mar 2001 21:58:46 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id VAA26118; Tue, 6 Mar 2001 21:51:38 -0500 (EST) From: Bruce Momjian Message-Id: <200103070251.VAA26118@candle.pha.pa.us> Subject: Re: PL/SQL-to-PL/pgSQL-HOWTO In-Reply-To: <3AA581A3.A783866C@alumni.caltech.edu> "from Thomas Lockhart at Mar 7, 2001 00:32:35 am" To: thomas@pgsql.com Date: Tue, 6 Mar 2001 21:51:38 -0500 (EST) CC: Roberto Mello , Peter Eisentraut , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/40 X-Sequence-Number: 471 > > Also, when is the deadline to submit documentation for the PG team? > > With all the WAL fuss going on the hackers list it maybe at least one more > > week? > > I ask because I'd really like to revamp the PL/pgSQL docs, make it > > much more detailed, with more examples, and better divisions. But I've > > been swamped with school work. But next week is spring break so I'd have > > time to work on it. > > What do you say? > > Peter, is this OK with you? It will go into the programmer's doc, and we > can freeze that a bit later than some others. It is OK with me. Until > March 16? That's great. Seems we really need PlPgSQL docs beefed up, and this will do that for us. I seem to remember Peter liking this idea too. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026