From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, "Thom Brown" <thombrown(at)gmail(dot)com>, "PGSQL Mailing List" <pgsql-general(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>, "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au> |
Subject: | Re: [HACKERS] Updating column on row update |
Date: | 2009-11-24 17:14:53 |
Message-ID: | 4B0BC02D020000250002CC20@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Part of the motivation for allowing inline blocks was to allow for
> conditional logic. So you can do things like:
>
> DO $$
>
> begin
> if not exists (select 1 from pg_tables
> where schemaname = 'foo'
> and tablename = 'bar') then
> create table foo.bar (x int, y text);
> end if;
> end;
>
> $$;
>
>
> It's a bit more verbose (maybe someone can streamline it) but it
> does give you CINE (for whatever flavor of CINE you want), as well
> as lots more complex possibilities than we can conceivably build
> into SQL.
So we're conceding that this is a valid need and people will now have
a way to meet it. Is the argument against having CINE syntax that it
would be more prone to error than the above, or that the code would be
so large and complex as to create a maintenance burden? (Is there
some other reason I'm missing?)
-Kevin
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-11-24 17:28:20 | Re: [HACKERS] Updating column on row update |
Previous Message | Lee Hachadoorian | 2009-11-24 17:03:28 | Re: Client Encoding and Latin characters |
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2009-11-24 17:16:10 | garbage in psql -l |
Previous Message | Hitoshi Harada | 2009-11-24 17:08:41 | Syntax conflicts in frame clause |