Re: [HACKERS] case_preservation_and_insensitivity = on

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: [HACKERS] case_preservation_and_insensitivity = on
Дата
Msg-id 34db7e21-88b7-100e-1592-49db06964e0a@BlueTreble.com
обсуждение исходный текст
Ответ на Re: [HACKERS] case_preservation_and_insensitivity = on  (Joel Jacobson <joel@trustly.com>)
Список pgsql-hackers
On 2/24/17 11:34 AM, Joel Jacobson wrote:
> SELECT  SomeCol,  OtherCol,   FooCol,   BarCol,   MyCol,   ExtraCol,   LastCol
> INTO     _SomeCol, _OtherCol, _FooCol, _BarCol, _MyCol, _ExtraCol, _LastCol
> FROM Foo
> WHERE Bar = 'Baz';
>
> This is to avoid typos that are then visually easy to spot, thanks to
> all chars being aligned.

Why not just use a record or the table composite? I'll commonly do stuff 
like:

DECLARE  r record
BEGIN  SELECT INTO STRICT r      blah, foo, bar, baz    FROM pirate  ;
  IF r.blah THEN RAISE 'Yaaarrrrr!' END IF;
...

(Well, to be honest I always try to write pirate apps in plR... ;P)
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: [HACKERS] Poor memory context performance in large hash joins
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Checksums by default?