From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Leonardo Francalanci <m_lists(at)yahoo(dot)it> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: array_append from user-defined C function |
Date: | 2011-10-14 13:55:29 |
Message-ID: | CAFj8pRD3Bpg-_a5yW5Ev4nLM7a007hBC0zGN0EepzTuP6be7GQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2011/10/14 Leonardo Francalanci <m_lists(at)yahoo(dot)it>:
>
>
>> how can I call array_append from a user-defined C function?
>> I know the type of the array I'm going to use (int4[]) so if there's an
>> equivalent
>>
>> function that can be called without going through PG_FUNCTION_ARGS stuff...
>
>
> I just found "array_set" (the array I'm using is one-dimensional).
> I'll try to use that... sorry for the noise.
look for array_push function
postgres=# \df+ array_append
List of functions
─[ RECORD 1 ]───────┬─────────────────────────────────
Schema │ pg_catalog
Name │ array_append
Result data type │ anyarray
Argument data types │ anyarray, anyelement
Type │ normal
Volatility │ immutable
Owner │ postgres
Language │ internal
Source code │ array_push
Description │ append element onto end of array
you c
but this is a polymorphic function, so is not simply to call it.
Regards
Pavel Stehule
>
>
> Leonardo
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Willy-Bas Loos | 2011-10-14 13:59:41 | Re: [HACKERS] register creation date of table |
Previous Message | Leonardo Francalanci | 2011-10-14 13:49:53 | Re: array_append from user-defined C function |