| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: can we enhance regtype infunction to support %type and %type[] |
| Date: | 2010-09-04 16:52:51 |
| Message-ID: | AANLkTi=sHkNaH7_tnc_qfcc8qc732JLjA9Ez_-MZAHNm@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
2010/9/4 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> I am looking on ToDo topic - Allow handling of %TYPE arrays, e.g.
>> tab.col%TYPE[]
>
>> Some the most simple solution can be enhancing regtype to support this
>> syntax
>
> I'm not really in favor of adding a wart like that to regtype, and
> I don't see how it would do anything to advance the TODO item anyway.
it can reduce a duplicate code - it is used on PL level and on PLpgSQL.
and be very useful as protection to SQL injection, where you have to
check if some table has some column.
Regards
Pavel Stehule
>
> regards, tom lane
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2010-09-04 17:26:41 | 9.1alpha1 bundled -- please verify |
| Previous Message | Tom Lane | 2010-09-04 16:16:26 | Re: git: uh-oh |