pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Change column type macaddr to macaddr[]
3+ messages / 3 participants
[nested] [flat]

* Change column type macaddr to macaddr[]
@ 2017-12-30 23:53 Ertan Küçükoðlu <ertan.kucukoglu@1nar.com.tr>
  2017-12-30 23:56 ` Re: Change column type macaddr to macaddr[] David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Ertan Küçükoðlu @ 2017-12-30 23:53 UTC (permalink / raw)
  To: pgsql-general

Hello,

I am using PostgreSQL 9.6.6 on armv8l-unknown-linux-gnueabihf, compiled by
gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516, 32-bit

I have a table with column name mac type macaddr. I need to change it into
array of macaddr ( macaddr[] ) type. Among all others I did try below:

licenses=# alter table licreqm alter column mac type macaddr[] using
mac::macaddr[];
ERROR:  cannot cast type macaddr to macaddr[]
LINE 1: ... licreqm alter column mac type macaddr[] using mac::macaddr[...
                                                             ^
I believe there should be a way, I just do not know it myself. Anyone can
help me?

Thanks & regards,
Ertan Küçükoðlu






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

* Re: Change column type macaddr to macaddr[]
  2017-12-30 23:53 Change column type macaddr to macaddr[] Ertan Küçükoðlu <ertan.kucukoglu@1nar.com.tr>
@ 2017-12-30 23:56 ` David G. Johnston <david.g.johnston@gmail.com>
  2017-12-31 00:01   ` RE: Change column type macaddr to macaddr[] Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2017-12-30 23:56 UTC (permalink / raw)
  To: Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>; +Cc: pgsql-general

On Saturday, December 30, 2017, Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>
wrote:

> Hello,
>
> I am using PostgreSQL 9.6.6 on armv8l-unknown-linux-gnueabihf, compiled by
> gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516, 32-bit
>
> I have a table with column name mac type macaddr. I need to change it into
> array of macaddr ( macaddr[] ) type. Among all others I did try below:
>
> licenses=# alter table licreqm alter column mac type macaddr[] using
> mac::macaddr[];
> ERROR:  cannot cast type macaddr to macaddr[]
> LINE 1: ... licreqm alter column mac type macaddr[] using mac::macaddr[...
>                                                              ^
> I believe there should be a way, I just do not know it myself. Anyone can
> help me?
>

Maybe try:

Using array[mac]::macaddr[]

David J.

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

* RE: Change column type macaddr to macaddr[]
  2017-12-30 23:53 Change column type macaddr to macaddr[] Ertan Küçükoðlu <ertan.kucukoglu@1nar.com.tr>
  2017-12-30 23:56 ` Re: Change column type macaddr to macaddr[] David G. Johnston <david.g.johnston@gmail.com>
@ 2017-12-31 00:01   ` Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>
  0 siblings, 0 replies; 3+ messages in thread

From: Ertan Küçükoğlu @ 2017-12-31 00:01 UTC (permalink / raw)
  To: pgsql-general

>From: David G. Johnston [mailto:david.g.johnston@gmail.com] 
>Sent: Sunday, December 31, 2017 2:56 AM
>To: Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>
>Cc: pgsql-general@postgresql.org
>Subject: Re: Change column type macaddr to macaddr[]
>
>Maybe try:
>
>Using array[mac]::macaddr[]
>
>David J. 

Yes, that did the job.

Thank you.





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


end of thread, other threads:[~2017-12-31 00:01 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-12-30 23:53 Change column type macaddr to macaddr[] Ertan Küçükoðlu <ertan.kucukoglu@1nar.com.tr>
2017-12-30 23:56 ` David G. Johnston <david.g.johnston@gmail.com>
2017-12-31 00:01   ` Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>

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