Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Custom Base...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 9 Topic 15486 of 17437
Post > Topic >>

Re: Custom Base Type in C

by odnamr@[EMAIL PROTECTED] ("Toby Chavez") May 7, 2008 at 06:14 PM

------=_Part_12102_31109090.1210205686552
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

If I make it pass-by-reference and varlena do I have to worry about
TOASTin=
g
and deTOASTing everying in my INPUT and OUTPUT functions?


On Wed, May 7, 2008 at 5:15 PM, Alvaro Herrera
<alvherre@[EMAIL PROTECTED]
>
wrote:

> Toby Chavez escribi=F3:
>
> > My custom type needs to have one biginteger and one text value...
prett=
y
> > straight forward. I guess my first question is if there are any
example=
s
> out
> > there that do something similar. I have looked extensively through the
> > contrib directory and can't find anything very helpful. If not, could
> > someone help me understand what my c struct would look like and what
> values
> > I need for INTERNALLENGTH, ALIGNMENT, STORAGE, etc in the CREATE TYPE
> > command?
>
> Probably what's biting you is that the type needs to be
> pass-by-reference and varlena.
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
<http://www.commandprompt.com/>
> PostgreSQL Replication, Consulting, Custom Development, 24x7 sup****t
>

------=_Part_12102_31109090.1210205686552
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>If I make it pass-by-reference and varlena do I have to worry about
TO=
ASTing and deTOASTing everying in my INPUT and OUTPUT functions? </div>
<div><br>&nbsp;</div>
<div class=3D"gmail_quote">On Wed, May 7, 2008 at 5:15 PM, Alvaro Herrera
&=
lt;<a
href=3D"mailto:alvherre@[EMAIL PROTECTED]
">alvherre@[EMAIL PROTECTED]
>&gt; wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px
0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Toby Chavez escribi=F3:<br>
<div class=3D"Ih2E3d"><br>&gt; My custom type needs to have one biginteger
=
and one text value... pretty<br>&gt; straight forward. I guess my first
que=
stion is if there are any examples out<br>&gt; there that do something
simi=
lar. I have looked extensively through the<br>
&gt; contrib directory and can&#39;t find anything very helpful. If not,
co=
uld<br>&gt; someone help me understand what my c struct would look like
and=
 what values<br>&gt; I need for INTERNALLENGTH, ALIGNMENT, STORAGE, etc in
=
the CREATE TYPE<br>
&gt; command?<br><br></div>Probably what&#39;s biting you is that the type
=
needs to be<br>pass-by-reference and varlena.<br><font
color=3D"#888888"><b=
r>--<br>Alvaro Herrera &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a
href=3D"http:=
//www.commandprompt.com/"
target=3D"_blank">http://www.CommandPrompt.com/</=
a><br>
PostgreSQL Replication, Consulting, Custom Development, 24x7
sup****t<br></f=
ont></blockquote></div><br>

------=_Part_12102_31109090.1210205686552--
 




 9 Posts in Topic:
Custom Base Type in C
odnamr@[EMAIL PROTECTED]   2008-05-07 17:06:40 
Re: Custom Base Type in C
david.t.wilson@[EMAIL PRO  2008-05-07 19:12:56 
Re: Custom Base Type in C
alvherre@[EMAIL PROTECTED  2008-05-07 19:15:10 
Using a composite SQL type in C
heron@[EMAIL PROTECTED]   2008-05-07 17:29:32 
Re: Custom Base Type in C
odnamr@[EMAIL PROTECTED]   2008-05-07 18:02:29 
Re: Custom Base Type in C
odnamr@[EMAIL PROTECTED]   2008-05-07 18:14:46 
Re: Custom Base Type in C
dim@[EMAIL PROTECTED] (D  2008-05-08 14:03:39 
Re: Using a composite SQL type in C
odnamr@[EMAIL PROTECTED]   2008-05-08 11:11:26 
Re: Using a composite SQL type in C
heron@[EMAIL PROTECTED]   2008-05-08 11:20:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 11:50:35 CST 2008.