Re: Question about the new PostgreSQL 16 availability on Ubuntu

2023-10-25 Thread John W Higgins
On Wed, Oct 25, 2023 at 8:36 AM Momchil Milev wrote: > Hello, > > I am trying to install PostgreSQL 16 on Ubuntu 18 and added your > repository *deb https://apt.postgresql.org/pub/repos/apt > bionic-pgdg main* but it seems > that version 16 is not

Re: Window function?

2022-06-04 Thread John W Higgins
On Sat, Jun 4, 2022 at 1:18 AM Robert Stanford wrote: > Hi, > > From this: > Input Start End > 5 2022-06-04 09:09:00 2022-06-04 09:09:29 > 4 2022-06-04 09:08:50 2022-06-04 09:09:00 > 4 2022-06-04 09:08:10 2022-06-04 09:08:50 > 4 2022-06-04

Re: TO_DATE function between PostgreSQL 8.2 and 9.4

2022-05-17 Thread John W Higgins
Good Morning, On Tue, May 17, 2022 at 8:55 AM gzh wrote: > Hi, > > > > > ERROR: function to_date(timestamp with time zone, unknown) does not exist > > LINE 1: SELECT to_date(now() + '-7day', '-MM-DD') > >

Re: PL/pgSQL: Spurious 22P02 error on "select col into var" when col is user-defined type

2021-08-09 Thread John W Higgins
On Mon, Aug 9, 2021 at 12:41 PM Bryn Llewellyn wrote: > > *https://stackoverflow.com/questions/41843016/how-do-i-pass-a-user-defined-type-variable-to-a-function-as-a-parameter >

Re: UUID or auto-increment

2020-08-10 Thread John W Higgins
On Mon, Aug 10, 2020 at 1:45 PM Israel Brewster wrote: > > > > On Aug 10, 2020, at 12:06 PM, Peter J. Holzer wrote: > > > > On 2020-08-10 09:10:00 -0800, Israel Brewster wrote: > >> I would point out, however, that using a V1 UUID rather than a V4 can > >> help with this as it is sequential,

Re: Bug on version 12 ?

2020-05-15 Thread John W Higgins
on the page marked "Tip" - the second one is of interest here. Apparently the portable format for your need would be select to_timestamp('2020-04-02T18:26:50.941531-03:00', '-MM-DDtHH24:MI:SS'); That works on both PG 11 and PG 12. John W Higgins [1] - https://www.postgresql.org/docs/12/functions-formatting.html

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-20 Thread John W Higgins
minute would that work? Does it need to be quicker than that? Slower than that? Or is it an immediate need? That's a starting point..... John W Higgins

Re: How to handle CASE statement with PostgreSQL without need for typecasting

2020-02-18 Thread John W Higgins
Good Morning, > > NOTE: From my research online, I found that typecasting works and also > the error from the database suggests typecasting. > > This statement works: > > UPDATE t_update SET F1 = (CASE WHEN (?::timestamp(6) IS NULL ) THEN > (?::timestamp(6) ) ELSE (?::timestamp(6) ) END) > >

Re: Is this a bug ?

2019-10-23 Thread John W Higgins
On Wed, Oct 23, 2019 at 8:56 AM Ravi Krishna wrote: > > > > Simplify: > > > > select 'a' > > db-# 'b'; > > ?column? > > -- > > ab > > (1 row) > > > > This is not a bug. > > > > https://www.postgresql.org/docs/9.2/sql-syntax-lexical.html > > > > Two string constants that are only

Re: Thoughts on a cosntraint ?

2019-09-29 Thread John W Higgins
nstrain such that only on row of mfg, vendor and project can > be set to TRUE. > > Partial unique index Example 3 on this page https://www.postgresql.org/docs/current/indexes-partial.html is exactly what you are looking for. John W Higgins > >

Re: PG SQL and LIKE clause

2019-09-13 Thread John W Higgins
Is this a possibility? From https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP - ~ 'ali[ ]*$' matches strings ending in ali that have zero of more spaces after ali this would match 'bali' 'ali' 'ali ' 'bali ' If you need full string then it would be like

Re: Query help

2019-01-01 Thread John W Higgins
On Tue, Jan 1, 2019 at 11:06 AM Chuck Martin wrote: > Sorry if this is too basic a question for this list, but I don't fully get > how to use aggregates (sum()) and group-by together. I'm trying to get a > list of transactions where the total for a given account exceeds a given > number. I'm not