Re: Does postgres have Equivalent range C range Ty​pe for Built-in SQL range Types

2022-08-28 Thread Pavel Stehule
ne 28. 8. 2022 v 18:36 odesílatel jian he 
napsal:

>
>
> On Sun, Aug 28, 2022 at 4:07 PM Pavel Stehule 
> wrote:
>
>>
>>
>> ne 28. 8. 2022 v 12:36 odesílatel Pavel Stehule 
>> napsal:
>>
>>> Hi
>>>
>>>
>>> ne 28. 8. 2022 v 10:10 odesílatel jian he 
>>> napsal:
>>>

 Equivalent C Types for Built-in SQL Types
 https://www.postgresql.org/docs/15/xfunc-c.html#XFUNC-C-TYPE-TABLE
 Does postgres have Equivalent  C range Type for Built-in SQL range
 Types?


>>> No, there is only common ancestor - RangeType
>>>
>>> Ranges are containers like arrays or records - so has not own type
>>> specific type
>>>
>>
>> look
>> https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/rangetypes.c
>>
>>>
>>> Regards
>>>
>>> Pavel
>>>
>>>
  I recommend David Deutsch's <>

   Jian



> technically, Can i use jsonbor range  or array in C-language function?
> If that's possible, for range type  I need #include rangetypes.h in the c
> file(used to create c function) ?
>

Surely, you can. everything you can do in SQL you can do in C. It needs
much more very precious work, but the result can be significantly faster
(depends on context).

Regards

Pavel


Re: Does postgres have Equivalent range C range Ty​pe for Built-in SQL range Types

2022-08-28 Thread jian he
On Sun, Aug 28, 2022 at 4:07 PM Pavel Stehule 
wrote:

>
>
> ne 28. 8. 2022 v 12:36 odesílatel Pavel Stehule 
> napsal:
>
>> Hi
>>
>>
>> ne 28. 8. 2022 v 10:10 odesílatel jian he 
>> napsal:
>>
>>>
>>> Equivalent C Types for Built-in SQL Types
>>> https://www.postgresql.org/docs/15/xfunc-c.html#XFUNC-C-TYPE-TABLE
>>> Does postgres have Equivalent  C range Type for Built-in SQL range Types?
>>>
>>>
>> No, there is only common ancestor - RangeType
>>
>> Ranges are containers like arrays or records - so has not own type
>> specific type
>>
>
> look
> https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/rangetypes.c
>
>>
>> Regards
>>
>> Pavel
>>
>>
>>>  I recommend David Deutsch's <>
>>>
>>>   Jian
>>>
>>>
>>>
technically, Can i use jsonbor range  or array in C-language function?
If that's possible, for range type  I need #include rangetypes.h in the c
file(used to create c function) ?


Re: Does postgres have Equivalent range C range Ty​pe for Built-in SQL range Types

2022-08-28 Thread Pavel Stehule
ne 28. 8. 2022 v 12:36 odesílatel Pavel Stehule 
napsal:

> Hi
>
>
> ne 28. 8. 2022 v 10:10 odesílatel jian he 
> napsal:
>
>>
>> Equivalent C Types for Built-in SQL Types
>> https://www.postgresql.org/docs/15/xfunc-c.html#XFUNC-C-TYPE-TABLE
>> Does postgres have Equivalent  C range Type for Built-in SQL range Types?
>>
>>
> No, there is only common ancestor - RangeType
>
> Ranges are containers like arrays or records - so has not own type
> specific type
>

look
https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/rangetypes.c

>
> Regards
>
> Pavel
>
>
>>  I recommend David Deutsch's <>
>>
>>   Jian
>>
>>
>>


Re: Does postgres have Equivalent range C range Ty​pe for Built-in SQL range Types

2022-08-28 Thread Pavel Stehule
Hi


ne 28. 8. 2022 v 10:10 odesílatel jian he 
napsal:

>
> Equivalent C Types for Built-in SQL Types
> https://www.postgresql.org/docs/15/xfunc-c.html#XFUNC-C-TYPE-TABLE
> Does postgres have Equivalent  C range Type for Built-in SQL range Types?
>
>
No, there is only common ancestor - RangeType

Ranges are containers like arrays or records - so has not own type specific
type

Regards

Pavel


>  I recommend David Deutsch's <>
>
>   Jian
>
>
>


Does postgres have Equivalent range C range Ty​pe for Built-in SQL range Types

2022-08-28 Thread jian he
Equivalent C Types for Built-in SQL Types
https://www.postgresql.org/docs/15/xfunc-c.html#XFUNC-C-TYPE-TABLE
Does postgres have Equivalent  C range Type for Built-in SQL range Types?


-- 
 I recommend David Deutsch's <>

  Jian