Let us fix the documentation

Started by AKabout 12 years ago3 messages
#1AK
alkuzo@gmail.com

The following url seems to be slightly incorrect:

http://www.postgresql.org/docs/9.3/static/sql-prepare.html

PREPARE usrrptplan (int) AS
SELECT * FROM users u, logs l WHERE u.usrid=$1 AND u.usrid=l.usrid
AND l.date = $2;
EXECUTE usrrptplan(1, current_date);

I guess the first line of the example should be:

PREPARE usrrptplan (int, date) AS

What do you think?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Let-us-fix-the-documentation-tp5782999.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

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

#2Erikjan Rijkers
er@xs4all.nl
In reply to: AK (#1)
Re: Let us fix the documentation

On Wed, December 11, 2013 22:51, AK wrote:

The following url seems to be slightly incorrect:

http://www.postgresql.org/docs/9.3/static/sql-prepare.html

PREPARE usrrptplan (int) AS
SELECT * FROM users u, logs l WHERE u.usrid=$1 AND u.usrid=l.usrid
AND l.date = $2;
EXECUTE usrrptplan(1, current_date);

I guess the first line of the example should be:

PREPARE usrrptplan (int, date) AS

What do you think?

read the next line:

"Note that the data type of the second parameter is not specified, so it is inferred from the context in which $2 is used."

(So the example is correct as is)

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

#3AK
alkuzo@gmail.com
In reply to: Erikjan Rijkers (#2)
Re: Let us fix the documentation

Oops, did not notice that - thank you!

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Let-us-fix-the-documentation-tp5782999p5783002.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

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