You could also just return the name of the temp table, or return nothing
and directly use that name manually outside the function to do select *
from pg_temp.my_data
Hi,
Just one question
Isn't it possible to write a function that return an oid?
So.. One can write a function which create a temp table, feed it according
to parameters and then return the oid of the created temp table.
No??
Le ven. 19 nov. 2021 à 23:48, David G. Johnston
a écrit :
> On Fri, No
On Fri, Nov 19, 2021 at 3:37 PM Abdul Mohammed
wrote:
> I read somewhere that you could have a table as a return type. I,
> therefore tried using the pivot table alias as the return type but got an
> error along lines of the alias not being recognized.
>
A table in that context is something you
Many thanks for the explanations David.
My failed attempts and your explanations have forced me to realise that I
need to spend some time learning to walk before attempting to run.
Much regards
On Fri, Nov 19, 2021 at 1:31 PM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> On Thu, Nov 1
Thank you very much for your response Tom. I will follow your
recommendations. As for the 3rd one, I am actually trying to output the
pivot table I am trying to create using crosstab. I read somewhere that you
could have a table as a return type. I, therefore tried using the pivot
table alias as th
On Thu, Nov 18, 2021 at 4:24 AM Abdul Mohammed
wrote:
> The second part tries to use the string to build a pivot table using the
> crosstab function.
>
Aside from the simple learning curve on how to write functions in
PostgreSQL you also are dealing with the fact that you are dealing with a
quer
Abdul Mohammed writes:
> Sorry for the late response and thank you Pavel for answering. This is my
> first exposure to pgsql, so please bear with me. I am still getting the
> Context message. Here is the modified function:
I tried this, and after creating a dummy "question" table I got
ERROR:
Sorry for the late response and thank you Pavel for answering. This is my
first exposure to pgsql, so please bear with me. I am still getting the
Context message. Here is the modified function:
CREATE OR REPLACE FUNCTION survey_ct ()
RETURNS SETOF text AS $$
DECLARE rec RECORD;
DECLARE str text;
Thanks Ron;
this is exactly what i was looking for.
I would like to know if there are different things like this
Dennis
On Fri, Nov 19, 2021 at 11:07 AM Ron wrote:
> There's a regression test suite.
> https://www.postgresql.org/docs/current/regress.html
>
> On 11/19/21 2:01 AM, Dennis wrote:
>
>
There's a regression test suite.
https://www.postgresql.org/docs/current/regress.html
On 11/19/21 2:01 AM, Dennis wrote:
> Who made what changes in what code?
I want to make special developments in the database code.
> Development of what and whose beta?
to check after making changes and cu
> Who made what changes in what code?
I want to make special developments in the database code.
> Development of what and whose beta?
to check after making changes and customizations in the database code
>This is going to need a more detailed explanation before there can be an
answer more sophi
11 matches
Mail list logo