כתב:
On Mon, 20 Aug 2018 at 09:22, Nick Dro <postgre...@walla.co.il> wrote:
This incorrect.
SELECT position(substring('https://www.webexample.com/s/help?' FROM '/(s|b|t)/') IN 'https://www.webexample.com/s/help?');
Gives 5. It's wrong.On Mon
ning SUBSTRING with position. Something like:SELECT position(substring(URL FROM '/(s|b|t)/') IN URL);Cheers,KenOn Sun, Aug 19, 2018 at 11:27 PM Nick Dro <postgre...@walla.co.il> wrote:Position function allows only string as pattern parameter:
select position(sub-string in string)
Position function allows only string as pattern parameter:
select position(sub-string in string)
If you are looking for more than one sub-string you can't do it with a single call to position.
More info:
https://stackoverflow.com/questions/51925037/how-to-find-position-of-multiple-sub-string-i
n it make sence to have it in it's base code - ready for use rather than ask each one to implment his own.
ב דצמ׳ 19, 2017 17:51, Melvin Davidson כתב:
On Tue, Dec 19, 2017 at 4:54 AM, Pavel Stehule <pavel.steh...@gmail.com > wrote:
2017-12-19 10:13 GMT+01:00 Nick Dro <postg
postgresql should have build in function for percentage calculation it doesn't have to me the exact example I gave. Any thing will be better than none.
ב דצמ׳ 18, 2017 18:28, Michael Nolan כתב:
On Mon, Dec 18, 2017 at 6:23 AM, Nick Dro <postgre...@walla.co.il > wrote:
Hi,
Why
very basic mathematical operations.
Can you give a good reason why absolute value has a build in function while percentage is not?
ב דצמ׳ 18, 2017 17:44, hubert depesz lubaczewski כתב:On Mon, Dec 18, 2017 at 02:23:38PM +0200, Nick Dro wrote:
>Hi,
>Why PostgreSQL doesn't have build-in
Hi,
Why PostgreSQL doesn't have build-in function to calculate percentage? somthing like percent(number,%
for example:
select percent(100,1) will calculate 1% of 100 = 1
select percent(25,20) will calculate 20% of 25 = 5
Seems like a nice addition to the math functions list:
https://www.postgresq