wrote:
> - Oracle was developed earlier, and one can argue that in those days file
> systems
> were not so great, so there was more need to write your own
Correct me if I'm wrong, but didn't Postgres (or Ingres upon which it's based)
development start in the early-to-mid 70's and Oracle's
Hi, and thanks for all of the input - I think I'm beginning to grok it.
> On second thought you could probably use NFD normalization to separate
> base letters from accents, uppercase the base letters and then
> (optionally) NFC normalize everything again. Still insane ;-).
As far as I can see,
> `select upper(x) from test`
I know about the UPPER() and LOWER() functions - I don't want them!
> If you want to do something else, please describe the actual thing you
> want to do. Not "how", but "what".
I have described it - I want to do the *_same_* thing as UPPER() does using
REGEXP_
Hi again, and thanks for sticking with this.
> You haven't explained what you're trying to accomplish.
Ok.
CREATE TABLE test(x TEXT);
INSERT INTO test VALUES ('abc');
SELECT REGEXP_REPLACE(x, '', '', 'g') FROM test;
Expected result: ABC
See fiddle here: https://dbfiddle.uk/Q2qXXwtF
D
Ciao and thanks for your input.
> * `regexp_replace` doesn't work like that, at all
> * your logic only works by accident for some languages (try to upcase
> a `ß` or a `ı`)
If you have any ideas how it could be done indirectly/different strategy - I'm
all ears.
You can assume all English c
Hi, and thanks for your input.
> RegExp by itself cannot do this. You have to match all parts of the input
> into different capturing groups, then use lower() combined with format() to
> build a new string. Putting the capturing groups into an array is the most
> useful option.
OK - I *_ki
Hi, and thanks for your input,
> Tha said, the replacement string in some editors (like Vim) and some
> programming languages (like Perl) provides syntax for changing case
> (both vi(m) and Perl use \u and \U...\E for uppercasing).
This is probably why I was so frustrated - I thought that ther
Hi all,
as per the subject, I want a regular expression to do what the UPPER() function
does.
Obviously, I know about that function and it is not what I want.
This should be very (very) easy - I don't know what I'm missing - I've done
quite complex regular expressions before and I don't know w
Hi all,
I want a regex to change the case of a field from UPPER to lower.
I know about the UPPER() and LOWER() functions and they are not what I want.
I would have thought this should be very simple, but I've searched a lot and
can't seem to get an answer.
Here's a fiddle with a couple of thin
Hi all,
I'm puzzled by some behaviour of the ROW constructor that I noticed when I was
playing around.
>From the documentation
>(https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-ROW-CONSTRUCTORS),
> we have
NUMBER 1
> SELECT ROW(1,2.5,'this is a test') = ROW(1, 3, 'no
Hi,
I'm trying to do something like this.
SELECT
d.i,
h.i,
'2022-10-31 00:00:00'::TIMESTAMP + INTERVAL 'd.i DAY'
FROM
GENERATE_SERIES(0, 6) AS d(i),
GENERATE_SERIES(0, 23) AS h(i);
where I add d.i days (and also h.i hours) to a timestamp.
I can't seem to get this to work. Any ideas appreciated
> > ERROR: syntax error at or near "WHERE"
> > LINE 10: WHERE o.total_price > ISNULL(sub.paid, 0);
> There error here is because a JOIN clause requires a join condition. Adding an
> "ON true" is probably what you want. You would also need to change isnull()
> with coalesce().
> The final que
Good Morning all,
I am having a problem understanding a simple LATERAL join - I'm working on
grasping them.
All tables and data are at the bottom of this question and on the fiddles, SQL
Server (working) and Postgres (not working).
SQL Server fiddle - https://dbfiddle.uk/hjBBd87B
Postgres
13 matches
Mail list logo