Re: [DOCS] Time input documentation error

2003-09-05 Thread Bruno Wolff III
On Thu, Sep 04, 2003 at 22:45:41 -0400,
  Bruce Momjian <[EMAIL PROTECTED]> wrote:
> 
> Seems it is fixed in CVS now:

I think Tom fixed it. He responded to my original message. I wasn't sure
if he was going to do the fix, but I found that it had been fixed at least
a week ago.

>   test=> select '040506'::time;
>  time
>   --
>04:05:06
>   (1 row)
> t

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


[DOCS] 9.7. Table Functions

2003-09-05 Thread Elisha Allen



Hello,
 
I hope I am posting this to the approprate list. I 
am somewhat new to postgres, and have been extensively reading the documentation 
over the last few days. As a whole, it is very helpful and informative. Great 
work!
 
Today I came across the following issue with table 
functions:
 
I'm trying to write a table function that returns a 
recordset. I'm running postgres 7.3.3 on redhat Following postgres 
Documentation Chapter 9.7,  I used the following commands to test 
this:
 
CREATE TABLE foo (fooid int, foosubid int, fooname text);  CREATE 
FUNCTION getfoo(int) RETURNS setof foo AS ' SELECT * 
FROM foo WHERE fooid = $1; ' LANGUAGE SQL;  SELECT * FROM getfoo(1) 
AS t1;
 
Unfortunately, the command:
 
 SELECT * FROM getfoo(1) AS t1;
 
returns a:
 
server parse error at or near "("
 
Is there something I'm missing here? As a 
workaround I tried:
 
 SELECT getfoo(1) AS t1;
 
This command ran, but returned a row t1 with a 
series of numbers in it, rather than a recordset of columns and values as the 
documentation suggests when it says:
 
"If the 
function returns a composite type, the result columns get the same names as the 
individual attributes of the type."
 
Thank you very much for your help, and please let 
me know if I can be of any assistance in trouble shooting this issue/ updating 
the documentation on this issue.
 
Elisha


Re: [DOCS] 9.7. Table Functions

2003-09-05 Thread Tom Lane
"Elisha Allen" <[EMAIL PROTECTED]> writes:
> Unfortunately, the command:
>  SELECT * FROM getfoo(1) AS t1;
> returns a:
> server parse error at or near "("

Works fine here.  You sure you are talking to a 7.3 server?  7.2 or
before would reject it just that way.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])