pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedPL/SQL-to-PL/pgSQL-HOWTO
18+ messages / 6 participants
[nested] [flat]
* PL/SQL-to-PL/pgSQL-HOWTO
@ 2001-02-25 17:33 Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-06 17:19 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
0 siblings, 2 replies; 18+ messages in thread
From: Roberto Mello @ 2001-02-25 17:33 UTC (permalink / raw)
To: pgsql-docs
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
Attachments:
plsql-to-plpgsql.sgml (text/plain, 25.1K) download
<!doctype article public "-//OASIS//DTD DocBook V3.1//EN"
[ <!entity header system "header.sgml">
]>
<article>
<artheader>
<title>
PL/SQL to PL/pgSQL HOWTO
</title>
<date>
February 2001
</date>
<author>
<firstname>Roberto</firstname>
<surname>Mello</surname>
<affiliation>
<address>
<email>rmello@fslc.usu.edu</email>
</address>
</affiliation>
</author>
<abstract>
<para>
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
<ulink url="http://www.gnu.org/copyleft/fdl.html">GNU Free
Documentation License</ulink> (GFDL).
</para>
<para>
Most of the code here is from the
<ulink url="http://www.arsdigita.com">ArsDigita</ulink>
Clickstream module that I ported to PostgreSQL when
I took an internship with
<ulink url="http://www.openforce.net">OpenForce</ulink>
in the summer of 2000.
</para>
</abstract>
</artheader>
<sect1 id="starting">
<title>
Getting Started
</title>
<para>
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.
</para>
<sect2>
<title>
Main Differences
</title>
<para>
Some things you should keep in mind when porting from Oracle to PostgreSQL:
</para>
<itemizedlist>
<listitem>
<para>
No default parameters in PG
</para>
</listitem>
<listitem>
<para>
You can overload functions in PG (can use to work around lack of default parameters)
</para>
</listitem>
<listitem>
<para>
Assignments, loops and conditionals are similar.
</para>
</listitem>
<listitem>
<para>
No need for cursors in PG, just put the query in the FOR statement (example below)
</para>
</listitem>
<listitem>
<para>
In PostgreSQL you <emphasis>need</emphasis> to escape single
quotes. See <link linkend="quoteme">Quote Me on That</link>.
</para>
</listitem>
<listitem>
<para>
All examples here are for PG 7.1, where NULLs in functions
are treated correctly and OUTER JOINs are implemented.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="quoteme">
<title>
Quote Me on That
</title>
<para>
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.
</para>
<para>
So here's the scoop (you'll love this little chart):
</para>
<table>
<title>
Single Quotes Escape Chart
</title>
<tgroup cols="4">
<thead>
<row>
<entry>No. of Quotes</entry>
<entry>Usage</entry>
<entry>Example</entry>
<entry>Result</entry>
</row>
</thead>
<tbody>
<row>
<entry>1</entry>
<entry>To begin/terminate functions</entry>
<entry>
CREATE FUNCTION foo() RETURNS INTEGER AS '...'
language 'plpgsql';
</entry>
<entry>ditto</entry>
</row>
<row>
<entry>2</entry>
<entry>In assignments, SELECTs, to delimit strings, etc.</entry>
<entry>
<msgtext>
<screen>
a_output := ''Blah'';
SELECT * FROM users WHERE f_name=''foobar'';
</screen>
</msgtext>
</entry>
<entry>SELECT * FROM users WHERE f_name='foobar';</entry>
</row>
<row>
<entry>4</entry>
<entry>
When you need two single quotes in your resulting string
without terminating that string.
</entry>
<entry>
<msgtext>
<programlisting>
a_output := a_output || '' AND name
LIKE ''''foobar'''' AND ...''
</programlisting>
</msgtext>
</entry>
<entry>AND name LIKE 'foobar' AND ...</entry>
</row>
<row>
<entry>6</entry>
<entry>When you want double quotes in your resulting
string AND terminate that string.</entry>
<entry>
<msgtext>
<programlisting>
a_output := a_output || '' AND name
LIKE ''''foobar''''''
</programlisting>
</msgtext>
</entry>
<entry>
AND name LIKE 'foobar'
</entry>
</row>
<row>
<entry>10</entry>
<entry>
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 <link
linkend="nastyquoting">nasty example</link>).
</entry>
<entry>
<msgtext>
<programlisting>
a_output := a_output || '' if v_'' ||
referrer_keys.kind || '' like ''''''''''
|| referrer_keys.key_string || ''''''''''
then return '''''' || referrer_keys.referrer_type
|| ''''''; end if;'';
</programlisting>
</msgtext>
</entry>
<entry>
if v_<...> like ''<...>'' then return ''<...>''; end if;
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
</sect1>
<sect1 id="functions">
<title>
Porting Functions
</title>
<sect2>
<title>
A Simple Function
</title>
<para>
Here's an Oracle function:
</para>
<programlisting>
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;
</programlisting>
<para>
Let's go through this function and see the differences to PL/pgSQL:
</para>
<itemizedlist>
<listitem>
<para>
The <emphasis>or replace</emphasis> statement is not
allowed. You'll have to explicitly <emphasis>DROP</emphasis>
the function before creating it to achieve similar results.
</para>
</listitem>
<listitem>
<para>
PG does not accept named parameter. You'll have to
explicitly alias them inside your function.
</para>
</listitem>
<listitem>
<para>
Oracle can have <emphasis>IN, OUT</emphasis>, and
<emphasis>INOUT</emphasis> parameters passed to functions.
The <emphasis>INOUT</emphasis> 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.
</para>
</listitem>
<listitem>
<para>
The <emphasis>return</emphasis> keyword becomes <emphasis>returns</emphasis> in PG.
</para>
</listitem>
<listitem>
<para>
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 <link linkend="quoteme">Quote Me on That</link>).
</para>
</listitem>
<listitem>
<para>
The <emphasis>/show errors</emphasis> does not exist in PG.
</para>
</listitem>
</itemizedlist>
<para>
So let's see how this function would be look like ported to PG:
</para>
<programlisting>
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';
</programlisting>
</sect2>
<sect2>
<title>
A Function that Creates Another Function
</title>
<para>
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.
</para>
<programlisting>
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
</programlisting>
<para>
Here's how this function would end up in PG:
</para>
<anchor id="nastyquoting">
<programlisting>
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';
</programlisting>
</sect2>
<sect2>
<title>
A Procedure With Lots of String Manipulation and OUT parameters
</title>
<para>
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 <link linkend="Procedures">Procedures</link>).
</para>
<para>
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.
</para>
<programlisting>
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;
</programlisting>
<para>
Here's how this procedure could be translated into PG:
</para>
<programlisting>
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';
</programlisting>
<para>
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.
</para>
</sect2>
</sect1>
<sect1 id="Procedures">
<title>
Procedures
</title>
<para>
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.
</para>
<para>
An example:
</para>
<programlisting>
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
</programlisting>
<para>
Procedures like this can be easily converted into PG functions returning an <emphasis>INTEGER</emphasis>. This procedure in particular is interesting because it can teach us some things:
</para>
<itemizedlist>
<listitem>
<para>
There's no <emphasis>pragma</emphasis> statement in PG.
</para>
</listitem>
<listitem>
<para>
If you do a <emphasis>LOCK TABLE</emphasis> in PL/pgSQL, the lock will only be released when the function resumes.
</para>
</listitem>
<listitem>
<para>
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 <emphasis>BEGIN</emphasis> statement is allowed.
</para>
</listitem>
<listitem>
<para>
The exception when would have to be replaced with an IF statement.
</para>
</listitem>
<listitem>
<para>
Notice how you can raise errors an notices in PL/pgSQL.
</para>
</listitem>
</itemizedlist>
<para>
So let's see one of the ways we could port this procedure to PL/pgSQL:
</para>
<programlisting>
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';
</programlisting>
</sect1>
<sect1 id="packages">
<title>
Packages
</title>
<para>
Note: I haven't done much with packages myself, so if there are
mistakes here, please let me know.
</para>
<para>
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):
</para>
<programlisting>
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
</programlisting>
<para>
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:
</para>
<programlisting>
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';
</programlisting>
</sect1>
<sect1 id="other">
<title>
Other Things to Watch For
</title>
<sect2>
<title>EXECUTE</title>
<para>
The PostgreSQL version of <emphasis>execute</emphasis> works
nicely, but you have to remember some things:
</para>
<itemizedlist>
<listitem>
<para>
You should use <emphasis>quote_literal(TEXT)</emphasis>
and
<emphasis>quote_string(TEXT)</emphasis>.
According to the <emphasis>PostgreSQL Programmer's
Guide</emphasis> "Variables containing field and table
identifiers should be
passed to function <function>quote_ident()</function>.
Variables containing literal elements of the dynamic query
string should be passed to
<function>quote_literal()</function>. Both take the
appropriate steps to return the input text enclosed in single
or double quotes and with any embedded special characters
intact."
</para>
</listitem>
<listitem>
<para>
Constructs of the type <emphasis>EXECUTE ''SELECT * from
$1'';</emphasis> will not work unless you use the above functions.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="optimization">
<title>Optimizing PL/pgSQL Functions</title>
<para>
PostgreSQL gives you two function creation modifiers to
optimize execution. From the PostgreSQL Reference:
</para>
<para>
<variablelist>
<varlistentry>
<term>iscachable</term>
<listitem>
<para>
<option>iscachable</option> 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
<option>iscachable</option> to know whether it is safe to
pre-evaluate a call of the function.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>isstrict</term>
<listitem>
<para>
<option>isstrict</option> 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 <option>isstrict</option> 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.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
To make use of these optimization attributes, you have to use
the <emphasis>WITH</emphasis> modifier in your
<emphasis>CREATE FUNCTION</emphasis> statement. Something
like:
</para>
<programlisting>
CREATE FUNCTION foo(...) RETURNS integer AS '
...
' language 'plpgsql'
WITH(isstrict,iscachable);
</programlisting>
</sect2>
</sect1>
<sect1 id="appendix">
<title>
Appendix
</title>
<sect2>
<title>
Code for my instr functions
</title>
<para>
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.
</para>
<programlisting>
--
-- 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';
</programlisting>
</sect2>
</sect1>
</article>
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
@ 2001-02-26 15:35 ` Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
1 sibling, 1 reply; 18+ messages in thread
From: Roberto Mello @ 2001-02-26 15:35 UTC (permalink / raw)
To: pgsql-docs
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!
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
@ 2001-02-26 18:29 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 20:47 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Ross J. Reedstrom <reedstrm@rice.edu>
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Lockhart @ 2001-02-26 18:29 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: pgsql-docs
> 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
@ 2001-02-26 20:47 ` Ross J. Reedstrom <reedstrm@rice.edu>
2001-02-26 21:52 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-27 15:44 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
0 siblings, 2 replies; 18+ messages in thread
From: Ross J. Reedstrom @ 2001-02-26 20:47 UTC (permalink / raw)
To: pgsql-docs
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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 20:47 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Ross J. Reedstrom <reedstrm@rice.edu>
@ 2001-02-26 21:52 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 22:48 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Bruce Momjian <pgman@candle.pha.pa.us>
1 sibling, 1 reply; 18+ messages in thread
From: Thomas Lockhart @ 2001-02-26 21:52 UTC (permalink / raw)
To: Ross J. Reedstrom <reedstrm@rice.edu>; +Cc: pgsql-docs
> 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 20:47 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Ross J. Reedstrom <reedstrm@rice.edu>
2001-02-26 21:52 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
@ 2001-02-26 22:48 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-02-26 23:38 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
0 siblings, 1 reply; 18+ messages in thread
From: Bruce Momjian @ 2001-02-26 22:48 UTC (permalink / raw)
To: lockhart@fourpalms.org; +Cc: Ross J. Reedstrom <reedstrm@rice.edu>; pgsql-docs
> > 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 20:47 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Ross J. Reedstrom <reedstrm@rice.edu>
2001-02-26 21:52 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 22:48 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Bruce Momjian <pgman@candle.pha.pa.us>
@ 2001-02-26 23:38 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Lockhart @ 2001-02-26 23:38 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: lockhart@fourpalms.org, "Ross J. Reedstrom" <reedstrm@rice.edu>; pgsql-docs
> > 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 20:47 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Ross J. Reedstrom <reedstrm@rice.edu>
@ 2001-02-27 15:44 ` Peter Eisentraut <peter_e@gmx.net>
2001-02-27 20:17 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Ross J. Reedstrom <reedstrm@rice.edu>
1 sibling, 1 reply; 18+ messages in thread
From: Peter Eisentraut @ 2001-02-27 15:44 UTC (permalink / raw)
To: Ross J. Reedstrom <reedstrm@rice.edu>; +Cc: pgsql-docs
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/
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 20:47 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Ross J. Reedstrom <reedstrm@rice.edu>
2001-02-27 15:44 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
@ 2001-02-27 20:17 ` Ross J. Reedstrom <reedstrm@rice.edu>
0 siblings, 0 replies; 18+ messages in thread
From: Ross J. Reedstrom @ 2001-02-27 20:17 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-docs
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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
@ 2001-03-06 17:19 ` Peter Eisentraut <peter_e@gmx.net>
2001-03-07 00:26 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
1 sibling, 1 reply; 18+ messages in thread
From: Peter Eisentraut @ 2001-03-06 17:19 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: pgsql-docs
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/
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-06 17:19 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
@ 2001-03-07 00:26 ` Roberto Mello <rmello@cc.usu.edu>
2001-03-07 00:31 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Lamar Owen <lamar.owen@wgcr.org>
2001-03-07 00:32 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-03-07 01:09 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 3 replies; 18+ messages in thread
From: Roberto Mello @ 2001-03-07 00:26 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; pgsql-docs
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....
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-06 17:19 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
2001-03-07 00:26 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
@ 2001-03-07 00:31 ` Lamar Owen <lamar.owen@wgcr.org>
2001-03-07 01:08 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Bruce Momjian <pgman@candle.pha.pa.us>
2 siblings, 1 reply; 18+ messages in thread
From: Lamar Owen @ 2001-03-07 00:31 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-docs
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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-06 17:19 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
2001-03-07 00:26 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-07 00:31 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Lamar Owen <lamar.owen@wgcr.org>
@ 2001-03-07 01:08 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 18+ messages in thread
From: Bruce Momjian @ 2001-03-07 01:08 UTC (permalink / raw)
To: Lamar Owen <lamar.owen@wgcr.org>; +Cc: Roberto Mello <rmello@cc.usu.edu>; Peter Eisentraut <peter_e@gmx.net>; pgsql-docs
> 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-06 17:19 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
2001-03-07 00:26 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
@ 2001-03-07 00:32 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-03-07 02:51 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Bruce Momjian <pgman@candle.pha.pa.us>
2 siblings, 1 reply; 18+ messages in thread
From: Thomas Lockhart @ 2001-03-07 00:32 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-docs
> 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-06 17:19 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
2001-03-07 00:26 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-07 00:32 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Thomas Lockhart <lockhart@alumni.caltech.edu>
@ 2001-03-07 02:51 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 18+ messages in thread
From: Bruce Momjian @ 2001-03-07 02:51 UTC (permalink / raw)
To: thomas@pgsql.com; +Cc: Roberto Mello <rmello@cc.usu.edu>; Peter Eisentraut <peter_e@gmx.net>; pgsql-docs
> > 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-03-06 17:19 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
2001-03-07 00:26 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
@ 2001-03-07 01:09 ` Bruce Momjian <pgman@candle.pha.pa.us>
2 siblings, 0 replies; 18+ messages in thread
From: Bruce Momjian @ 2001-03-07 01:09 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-docs
> 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
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
@ 2001-02-26 22:05 Roberto Mello <rmello@cc.usu.edu>
2001-02-27 15:58 ` Re: PL/SQL-to-PL/pgSQL-HOWTO Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 18+ messages in thread
From: Roberto Mello @ 2001-02-26 22:05 UTC (permalink / raw)
To: pgsql-docs
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 <sect2>'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!
^ permalink raw reply [nested|flat] 18+ messages in thread
* Re: PL/SQL-to-PL/pgSQL-HOWTO
2001-02-26 22:05 Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
@ 2001-02-27 15:58 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 18+ messages in thread
From: Peter Eisentraut @ 2001-02-27 15:58 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: pgsql-docs
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 <sect2>'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/
^ permalink raw reply [nested|flat] 18+ messages in thread
end of thread, other threads:[~2001-03-07 02:51 UTC | newest]
Thread overview: 18+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-25 17:33 PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-26 15:35 ` Roberto Mello <rmello@cc.usu.edu>
2001-02-26 18:29 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 20:47 ` Ross J. Reedstrom <reedstrm@rice.edu>
2001-02-26 21:52 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-26 22:48 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-02-26 23:38 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-02-27 15:44 ` Peter Eisentraut <peter_e@gmx.net>
2001-02-27 20:17 ` Ross J. Reedstrom <reedstrm@rice.edu>
2001-03-06 17:19 ` Peter Eisentraut <peter_e@gmx.net>
2001-03-07 00:26 ` Roberto Mello <rmello@cc.usu.edu>
2001-03-07 00:31 ` Lamar Owen <lamar.owen@wgcr.org>
2001-03-07 01:08 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-03-07 00:32 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2001-03-07 02:51 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-03-07 01:09 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-02-26 22:05 Re: PL/SQL-to-PL/pgSQL-HOWTO Roberto Mello <rmello@cc.usu.edu>
2001-02-27 15:58 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox