Thank-you, mystery solved! I was reading the "CREATE TABLE" docs and not
the "CREATE TABLE AS" docs. My mistake.
David Waddy
On Sun, Feb 12, 2012 at 3:50 PM, Adrian Klaver wrote:
> On Sunday, February 12, 2012 11:42:37 am David Waddy wrote:
> > This works:
> > CREATE TEMP TABLE temp_medical_sum
On Sunday, February 12, 2012 11:42:37 am David Waddy wrote:
> This works:
> CREATE TEMP TABLE temp_medical_summary AS (SELECT * from
> bov.medical_summary)
>
> This gives an error:
> CREATE TEMP TABLE IF NOT EXISTS temp_medical_summary AS (SELECT * from
> bov.medical_summary)
>
> It would seem th
This works:
CREATE TEMP TABLE temp_medical_summary AS (SELECT * from
bov.medical_summary)
This gives an error:
CREATE TEMP TABLE IF NOT EXISTS temp_medical_summary AS (SELECT * from
bov.medical_summary)
It would seem that CREATE TABLE AS does not support IF NOT EXISTS. Is this
true?
David Waddy
On 12 February 2012 18:49, Tom Lane wrote:
> Thom Brown writes:
>> What am I missing?
>
> I might be more confused than you, but I think you're supposing that
> the result of ascii(E'\\1') has something to do with the match that
> the surrounding regexp_replace function will find, later on when i
On Feb 12, 2012, at 13:26, Thom Brown wrote:
> Hi,
>
> Could someone explain the following behaviour?
>
> SELECT regexp_replace(E'Hello & goodbye ',E'([&])','' ||
> ascii(E'\\1') || E';\\1');
>
> This returns:
>
> regexp_replace
>
> Hello \& goodbye
> (1 row)
>
Thom Brown writes:
> What am I missing?
I might be more confused than you, but I think you're supposing that
the result of ascii(E'\\1') has something to do with the match that
the surrounding regexp_replace function will find, later on when it
gets executed. The actual arguments seen by regexp_
Hi,
Could someone explain the following behaviour?
SELECT regexp_replace(E'Hello & goodbye ',E'([&])','' ||
ascii(E'\\1') || E';\\1');
This returns:
regexp_replace
Hello \& goodbye
(1 row)
So it matched:
SELECT chr(92);
chr
-
\
(1 row)
But notice that w