From: | Max Fonin <fonin(at)ziet(dot)zhitomir(dot)ua> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions |
Date: | 2000-11-24 11:02:14 |
Message-ID: | 20001124130214.339bf000.fonin@ziet.zhitomir.ua |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Thu, 23 Nov 2000 11:13:28 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Max Fonin <fonin(at)ziet(dot)zhitomir(dot)ua> writes:
> > I guess the problem is that PL/pgSQL doesn't handle opaque type correctly.
>
> No it doesn't, which is not surprising considering that opaque isn't
> really a type at all. The error message could be improved though :-(
Well, I understood that the C is the only way very quick.
Really, OPAQUE is just reference type like char* or void*, isn't it ?
OK, I implemented emulation and now have some working version at http://ziet.zhitomir.ua/~fonin/code/my2pg.pl.
This is MySQL->Postgres dump converter and I've succeed with loading my production MySQL database converted
with it to Postgres.
However it still needs manuall correction (see BUGS section in POD).
BTW, can't somebody tell me when PG 7.1 will be released :) ?
> Currently I believe that the only way to write datatype I/O routines
> is to do it in C, because what they really need to deal in is C-style
> strings, and those are not an SQL-level type.
>
> regards, tom lane
Thanks,
Max Rudensky.
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2000-11-24 11:09:45 | create snapshot? |
Previous Message | Olivier Cherrier | 2000-11-24 10:51:57 | Re: pgaccess |
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Chmara | 2000-11-24 11:52:27 | Re: Re: re : PHP and persistent connections |
Previous Message | GH | 2000-11-24 09:36:37 | Re: Re: re : PHP and persistent connections |