Re: postgres sql assistance

2024-01-17 Thread Jim Nasby
On 1/16/24 10:04 PM, arun chirappurath wrote: Architect is pressing for a native procedure to data load. It's possible to write a loader in pl/pgsql but it would be easily twice as complex as where you got on your first attempt. It would also never perform anywhere near as well as a dedicated

Re: postgres sql assistance

2024-01-16 Thread arun chirappurath
Hi Jim, Thank you so much for the kind review. Architect is pressing for a native procedure to data load. I shall Google ans try to find more suitable one than writing one by myself. Thanks again, Arun On Wed, 17 Jan, 2024, 01:58 Jim Nasby, wrote: > On 1/16/24 6:34 AM, arun chirappurath wr

Re: postgres sql assistance

2024-01-16 Thread Jim Nasby
On 1/16/24 6:34 AM, arun chirappurath wrote: I am trying to load data from the temp table to the main table and catch the exceptions inside another table. I don't have a specific answer, but do have a few comments: - There are much easier ways to do this kind of data load. Search for "postgre

Re: postgres sql assistance

2024-01-16 Thread Ron Johnson
"*invalid input syntax for type boolean: "15"*" That is the problem. You can't insert 15 into a column of type "boolean". On Tue, Jan 16, 2024 at 7:35 AM arun chirappurath wrote: > Dear all, > > I am an accidental postgres DBA and learning things every day. Apologies > for my questions if not

Re: postgres sql assistance

2024-01-16 Thread Rob Sargent
On 1/16/24 06:00, Raul Giucich wrote: Hi Arun, can you share the sql used for this insert. Visually it seems some character are affecting the data. Best regards, Raul Raul, the OP attached the sq.

Re: postgres sql assistance

2024-01-16 Thread Raul Giucich
Hi Arun, can you share the sql used for this insert. Visually it seems some character are affecting the data. Best regards, Raul El mar, 16 ene 2024 a la(s) 9:35 a.m., arun chirappurath ( arunsnm...@gmail.com) escribió: > Dear all, > > I am an accidental postgres DBA and learning things every day

Re: Postgres SQL

2023-07-20 Thread Maciek Sakrejda
On Wed, Jul 19, 2023, 22:40 Anthony Apollis wrote: > Hi > > What list can i post sql related errors etc? > This is a good place to start, but you may want to review https://wiki.postgresql.org/wiki/Guide_to_reporting_problems to make it easier to get help if you're not already familiar with it.

Re: Postgres SQL unable to handle Null values for Text datatype

2022-09-06 Thread Christophe Pettus
> On Sep 5, 2022, at 23:10, Karthik K L V wrote: > The above query fails with the below exception when the value of ?1 resolves > to null. > org.postgresql.util.PSQLException: ERROR: operator does not exist: character > varying = bytea > Hint: No operator matches the given name and argument

Re: Postgres SQL unable to handle Null values for Text datatype

2022-09-06 Thread Mladen Gogala
On 9/6/22 02:10, Karthik K L V wrote: We are migrating from Oracle 12C to Aurora Postgres 13 and running into query failures when the bind value of a Text datatype resolves to nul Oracle is actually in the wrong here. Nothing should be equal to null, ever. There is also different behavior with

Re: Postgres SQL unable to handle Null values for Text datatype

2022-09-05 Thread Lutz Horn
> org.postgresql.util.PSQLException: ERROR: operator does not exist: character > varying = bytea This has been discussed on Stack Overflow[0]. The answer with the highest approval suggests to use coalesce[1]: ``` Select * from A where middle_name = coalesce(?1) ``` Lutz [0] https://stackover