Fwd: Unexpected Multiple Records from Randomized Query

2024-02-23 Thread 김명준
Hello. I encountered a problem while setting up a test environment to learn the use of the random() function. The query is as follows: CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(100), email VARCHAR(100), signup_date DATE ); INSERT INTO users (name, email, signup_d

Re: Creating table and indexes for new application

2024-02-23 Thread sud
On Fri, 23 Feb, 2024, 1:28 pm yudhi s, wrote: > > > On Fri, 23 Feb, 2024, 1:20 pm sud, wrote: > >> >> >> On Fri, 23 Feb, 2024, 12:41 pm Laurenz Albe, >> wrote: >> >>> On Fri, 2024-02-23 at 02:05 +0530, yudhi s >>> >>> > 2)Should we be creating composite indexes on each foreign key for >>> table

Unable to get PostgreSQL 15 with Kerberos (GSS) working

2024-02-23 Thread Matthew Dennison
Hi All Would really like some help to get this working, I'm not sure where to turn next? About things: PostgreSQL 15 Running of RHEL8 Using official repo Build-in OS version(s) of PostgreSQL are disabled Postgresql15-server & postgresql15-contrib installed via dnf PostgreSQL 15 up to date via dn

Re: How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored)

2024-02-23 Thread Vick Khera
On Thu, Feb 22, 2024 at 5:06 PM Erik Wienhold wrote: > On 2024-02-22 22:14 +0100, Vick Khera wrote: > > On Wed, Feb 21, 2024 at 4:27 PM Tom Lane wrote: > > > > > For the moment, I think the only feasible solution is for your trigger > > > function to set the search path it needs by adding a "SET

Re: Fwd: Unexpected Multiple Records from Randomized Query

2024-02-23 Thread Tom Lane
=?UTF-8?B?6rmA66qF7KSA?= writes: > explain analyze > SELECT * FROM users WHERE name = 'User '||trunc(random()*100) ; > I expected the result to return one record. However, in some cases, the > result comes back with 2 or 3 records. What am I doing wrong? random() is re-evaluated at each row, so