Re: How to store in hours:minutes:seconds where hours may be bigger than 24

2024-03-19 Thread Celia McInnis
Whoops - I hadn't changed the type of the column in the table that I was inserting into - it was of type "TIME WITHOUT TIMEZONE". Now that I have set the column type to INTERVAL, I can insert the string '25:17:07' into the column without even needing to do any casting. Thank goodness and thanks!

Re: How to store in hours:minutes:seconds where hours may be bigger than 24

2024-03-19 Thread Tom Lane
Celia McInnis writes: > Thanks for the suggestion, Steve, but No - when I insert 25:17:07::interval > into my table I get 01:17:07 into the table - i.e., it replaces 25 hours by > (25 mod 24) hours or 1 hour, and this is not what I want. There is definitely something you are not telling us,

Re: How to store in hours:minutes:seconds where hours may be bigger than 24

2024-03-19 Thread Christophe Pettus
> On Mar 19, 2024, at 19:56, Celia McInnis wrote: > > Thanks for the suggestion, Steve, but No - when I insert 25:17:07::interval > into my table I get 01:17:07 into the table - i.e., it replaces 25 hours by > (25 mod 24) hours or 1 hour, and this is not what I want. I really need the >

Re: How to store in hours:minutes:seconds where hours may be bigger than 24

2024-03-19 Thread Celia McInnis
Thanks for the suggestion, Steve, but No - when I insert 25:17:07::interval into my table I get 01:17:07 into the table - i.e., it replaces 25 hours by (25 mod 24) hours or 1 hour, and this is not what I want. I really need the number of hours rather than the number of hours mod 24. Do I have to

Re: How to store in hours:minutes:seconds where hours may be bigger than 24

2024-03-19 Thread Steve Baldwin
Could you use an interval data type? For example: b2bcreditonline=# create table interval_example (i interval); CREATE TABLE b2bcreditonline=# insert into interval_example values ('26:15:32'::interval); INSERT 0 1 b2bcreditonline=# select * from interval_example; i -- 26:15:32 (1

Re: How to store in hours:minutes:seconds where hours may be bigger than 24

2024-03-19 Thread Ron Johnson
On Tue, Mar 19, 2024 at 10:05 PM Celia McInnis wrote: > Hi: > > I want to store times in a database as hours:minutes:seconds where hours > can be greater than 24. How do I do this? I will want to be able to add > such times. > Try the INTERVAL data type.

How to store in hours:minutes:seconds where hours may be bigger than 24

2024-03-19 Thread Celia McInnis
Hi: I want to store times in a database as hours:minutes:seconds where hours can be greater than 24. How do I do this? I will want to be able to add such times. Thanks, Celia McInnis

RE: Postgres database encryption

2024-03-19 Thread Zahir Lalani
>On Tue, Mar 19, 2024 at 9:22 AM Johnathan Tiamoh > wrote: >Hello,  > > >Good morning. Please I wish to find out the best way of encrypting a Postgres >database.  > >This could either be encrypting a whole database ( I don’t if this is >possible), a specific

Re: Postgres database encryption

2024-03-19 Thread Ron Johnson
On Tue, Mar 19, 2024 at 9:22 AM Johnathan Tiamoh wrote: > Hello, > > > Good morning. Please I wish to find out the best way of encrypting a > Postgres database. > > This could either be encrypting a whole database ( I don’t if this is > possible), a specific table and a specific tablespace. >

Re: Postgres database encryption

2024-03-19 Thread Kai Wagner
Hey, On 19/03/2024 14:22, Johnathan Tiamoh wrote: Hello, Good morning. Please I wish to find out the best way of encrypting a Postgres database. This could either be encrypting a whole database ( I don’t if this is possible), a specific table and a specific tablespace. There is no

Re: Query on Postgres SQL transaction

2024-03-19 Thread Adrian Klaver
On 3/19/24 02:18, Bandi, Venkataramana - Dell Team wrote: Hi Greg, We are using hibernate framework to persist the data into Postgres SQL DB and data is persisting and committing for all the clients but one of the client data is not inserted into DB. What is different about that client?

Re: operator is only a shell - Error

2024-03-19 Thread Adrian Klaver
On 3/19/24 00:02, Rajesh S wrote: Sorry Adrian, my bad. I'd mentioned "deposit_sub_no='1'" by mistake, actually it was "deposit_sub_no=cast(1 as varchar)". This was throwing 1) Maybe you could explain the logic of taking a number and casting it to a string to compare it to a number? 2)

RE: Query on Postgres SQL transaction

2024-03-19 Thread Bandi, Venkataramana - Dell Team
Hi Greg, We are using hibernate framework to persist the data into Postgres SQL DB and data is persisting and committing for all the clients but one of the client data is not inserted into DB. Not getting any error/exception for this case. Could you please let us know how we can trace out this

Re: Postgres database encryption

2024-03-19 Thread Greg Sabino Mullane
What is your threat model? That will determine the best answer. The easiest thing is to use OS-level encryption. Cheers, Greg

Re: set local statement_timeout within a stored procedure

2024-03-19 Thread Tom Lane
"Abraham, Danny" writes: > Is there a way to integrate " set local statement_timeout" in a stored > procedure? Not usefully. statement_timeout bounds the time spent for a single command sent by the client. So by the time you're inside a procedure, the countdown is already running (or not) for

Postgres database encryption

2024-03-19 Thread Johnathan Tiamoh
Hello, Good morning. Please I wish to find out the best way of encrypting a Postgres database. This could either be encrypting a whole database ( I don’t if this is possible), a specific table and a specific tablespace. King regards Johnathan T.

set local statement_timeout within a stored procedure

2024-03-19 Thread Abraham, Danny
Hi, Is there a way to integrate " set local statement_timeout" in a stored procedure? Something like create or replace procedure call_sp() language plpgsql as $$ begin set local statement_timeout = 1; call sp(); end; $$

Re: operator is only a shell - Error

2024-03-19 Thread Rajesh S
Sorry Adrian, my bad. I'd mentioned "deposit_sub_no='1'" by mistake, actually it was "deposit_sub_no=cast(1 as varchar)". This was throwing error "SQL Error [42883]: ERROR: operator does not exist: numeric = character varying  Hint: No operator matches the given name and argument types. You