pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Create lo Data type
2+ messages / 2 participants
[nested] [flat]

* Create lo Data type
@ 2003-06-28 10:53  A  Mohan <abmohan75@rediffmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: A Mohan @ 2003-06-28 10:53 UTC (permalink / raw)
  To: pgsql-odbc

We are having Postgrsql 7.3.2.
To create lo type we gave the following SQL.
CREATE TYPE lo (
     internallength=4,  externallength=10,
     input=int4in, output=int4out,
     default='',  passedbyvalue
);

But we could not create this lo type. It gives the following 
error.
**********
Failed to execute SQL : SQL CREATE TYPE lo ( internallength=4, 
externallength=10, input=int4in, output=int4out, default='', 
passedbyvalue ); failed : ERROR: TypeCreate: function int4out(lo) 
does not exist
*************

Can any one help us? please....

Regards,
A.Mohan
___________________________________________________
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan & Kareena Kapoor http://www.mpkdh.com




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Create lo Data type
@ 2003-06-28 16:06  Tom Lane <tgl@sss.pgh.pa.us>
  parent: A  Mohan <abmohan75@rediffmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2003-06-28 16:06 UTC (permalink / raw)
  To: A Mohan <abmohan75@rediffmail.com>; +Cc: pgsql-odbc

"A  Mohan" <abmohan75@rediffmail.com> writes:
> To create lo type we gave the following SQL.
> CREATE TYPE lo (
>      internallength=4,  externallength=10,
>      input=int4in, output=int4out,
>      default='',  passedbyvalue
> );

> But we could not create this lo type.

You can't cheat like that anymore in defining a type.  You have to
provide real I/O functions for it.

A more appropriate way to define LO in 7.3 is as a domain:

	CREATE DOMAIN lo AS int4;

(although actually I'd think it should be a domain of OID not INT4).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-06-28 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-06-28 10:53 Create lo Data type A  Mohan <abmohan75@rediffmail.com>
2003-06-28 16:06 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox