Re: [PHP-DB] create type
Yesterday, I saw in Postgres User Manual that plpgsql cannot define function for create type. The function must be define in C language. But i don't understand this language. Thanks a lot. Le Jeudi 12 Avril 2001 06:25, vous avez écrit : > Why you want to create MAC address type? It's already there in V7. > > macaddr| XX:XX:XX:XX:XX, MAC address > > Besides, do you have functions defined for INPUT and OUTPUT? > You must define them. Refer to PostgreSQL User Manual for details. > > Regards, > -- > Yasuo Ohgaki > > > "Olivier Thauvin" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Is somebody an example of create type under Postgres (v. 7) I have a > > probleme > > with the input function of the new type: > > parcmicro=# CREATE TYPE "macad" ( internallength = variable, > > externallength = > > variable, input = macadi, output = macado, PASSEDBYVALUE); > > > CREATE > > parcmicro=# create table toto (mac macad); > > CREATE > > parcmicro=# insert into toto (mac) values ('AA:AA:AA:AA:AA:AA'); > > NOTICE: plpgsql: ERROR during compile of macadi near line 0 > > ERROR: cache lookup for return type 0 failed > > > > > > What i'm doing wrong ? Thanks a lot. > > > > -- > > Olivier Thauvin-CNRS Service Aeronomie > > [EMAIL PROTECTED] > > Téléphone: > > 01 64 47 43 60 à Verrières (lundi,mercredi et vendredi) > > 01 44 27 47 59 à Jussieu (Mardi et Jeudi) > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Olivier Thauvin-CNRS Service Aeronomie [EMAIL PROTECTED] Téléphone: 01 64 47 43 60 à Verrières (lundi,mercredi et vendredi) 01 44 27 47 59 à Jussieu (Mardi et Jeudi) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] create type
Why you want to create MAC address type? It's already there in V7. macaddr| XX:XX:XX:XX:XX, MAC address Besides, do you have functions defined for INPUT and OUTPUT? You must define them. Refer to PostgreSQL User Manual for details. Regards, -- Yasuo Ohgaki "Olivier Thauvin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Is somebody an example of create type under Postgres (v. 7) I have a probleme with the input function of the new type: > > > parcmicro=# CREATE TYPE "macad" ( internallength = variable, externallength = variable, input = macadi, output = macado, PASSEDBYVALUE); > CREATE > parcmicro=# create table toto (mac macad); > CREATE > parcmicro=# insert into toto (mac) values ('AA:AA:AA:AA:AA:AA'); > NOTICE: plpgsql: ERROR during compile of macadi near line 0 > ERROR: cache lookup for return type 0 failed > > > What i'm doing wrong ? Thanks a lot. > > -- > Olivier Thauvin-CNRS Service Aeronomie > [EMAIL PROTECTED] > Téléphone: > 01 64 47 43 60 à Verrières (lundi,mercredi et vendredi) > 01 44 27 47 59 à Jussieu (Mardi et Jeudi) > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] create type
Is somebody an example of create type under Postgres (v. 7) I have a probleme with the input function of the new type: parcmicro=# CREATE TYPE "macad" ( internallength = variable, externallength = variable, input = macadi, output = macado, PASSEDBYVALUE); CREATE parcmicro=# create table toto (mac macad); CREATE parcmicro=# insert into toto (mac) values ('AA:AA:AA:AA:AA:AA'); NOTICE: plpgsql: ERROR during compile of macadi near line 0 ERROR: cache lookup for return type 0 failed What i'm doing wrong ? Thanks a lot. -- Olivier Thauvin-CNRS Service Aeronomie [EMAIL PROTECTED] Téléphone: 01 64 47 43 60 à Verrières (lundi,mercredi et vendredi) 01 44 27 47 59 à Jussieu (Mardi et Jeudi) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]