Skip site navigation (1) Skip section navigation (2)

Review: [PL/pgSQL] %TYPE and array declaration - second patch

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Wojciech Muła <wojciech_mula(at)poczta(dot)onet(dot)pl>
Subject: Review: [PL/pgSQL] %TYPE and array declaration - second patch
Date: 2011-10-23 17:33:56
Message-ID: CAFj8pRBX+EfFW+zF2mGaRpABAtn8gRP8VgKBvmEHue7GwCHetw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello

I did a review this final patch

1) we want this feature - it is long time in ToDo
2) this feature support all types where it has sense
3) patch respect PostgreSQL's coding standards
4) patch was applied cleanly
5) code was compiled without warnings
6) regress tests was passed

This patch is ready for commit

I fixed a few  comments

Regards

Pavel Stehule


2011/10/23 Wojciech Muła <wojciech_mula(at)poczta(dot)onet(dot)pl>:
> Hi
>
> Pavel Stehule reviewed my first patch and pointed many
> issues - thanks! This patch resolves three problems:
>
> 1. The main issue -  variables with copied types (%TYPE
>   and %ROWTYPE attributes) can be declared as arrays.
>   Grammar has been extended to match new syntax.
>
> 2. It's possible to copy type from function argument of
>   composite type[1].
>
> 3. Enabling copying types from wider range of objects,
>   data type resolution takes into account more cases.
>   For example it wasn't possible to declare variable
>   of row type, and then copy type from field of such
>   variable (something like: declare x table%ROWTYPE;
>   y x.field%TYPE).
>
> Patch includes new test cases and few words in documentation.
>
> best regards
> Wojciech Muła
>
> [1] http://stackoverflow.com/questions/7634704/declare-variable-of-composite-type-in-postgresql-using-type
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

Attachment: plpgsql_type_array-1.ps.patch
Description: text/x-patch (65.4 KB)

Responses

pgsql-hackers by date

Next:From: Marti RaudseppDate: 2011-10-23 18:12:51
Subject: Re: [PATCH] Deferrable unique constraints vs join removal -- bug?
Previous:From: threadyDate: 2011-10-23 15:17:20
Subject: Re: Visual Studio 2010/Windows SDK 7.1 support

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group