Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Simon Riggs
On Wed, 2009-02-04 at 03:00 +, Greg Stark wrote: > We already have autovacuum, which runs VACUUM and ANALYZE to a set > > schedule. We could have kept that outside core, but didn't. > > > > It's not too big a stretch to imagine we could redesign autovacuum > as a > > GP scheduler, with autovac

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Simon Riggs
On Wed, 2009-02-04 at 02:39 +, Greg Stark wrote: > On Tue, Feb 3, 2009 at 10:06 PM, Simon Riggs wrote: > > > > On Tue, 2009-02-03 at 15:03 -0500, Chris Mayfield wrote: > > > >> 1. Having to rewrite entire tables out to disk the first time I scan > >> them, for example: > >> > >> CREATE TABLE

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Karsten Hilbert
> > Craig, what kind of "events" are you thinking about? Triggers are > > already pieces of code that run upon "certain events", namely insert, > > update or delete events. What others do you have in mind? > > That's a good point, actually. I can't think of much you can't do with a > trigger

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Richard Huxton
Gregory Stark wrote: > Steve Crawford writes: > 3. Date handling Sometimes I've got data with invalid dates and it would be great if it could replace all the bad ones with, say "-00-00". >> Oh dear $DEITY, no. > > I think it would be best if we limited ourselves rig

[GENERAL] installation

2009-02-04 Thread Kusuma Pabba
Hello all, i am new to postgresql, i want to create tables in this i have followed 10 Steps to Installing PostgreSQL which is chapter two of installing postgresql i could follow upto step no 7 but i am getting errors from step 8 while following the steps i got message like post

[GENERAL] field with Password

2009-02-04 Thread Iñigo Barandiaran
Hi. I would like to create a new table where one of the field would be a user password. Is there any data type for supporting this functionality? Something like Password DataType. I've taken a look of the available data types in PgAdmin Application and there is nothing similar to this. Than

Re: [GENERAL] field with Password

2009-02-04 Thread Thomas Markus
what do you expect from such type? try to use a text field for plain passwords or better store only hashvalues. see md5() regards thomas Iñigo Barandiaran schrieb: Hi. I would like to create a new table where one of the field would be a user password. Is there any data type for supporting t

Re: [GENERAL] Connecting to old 7.1 Database

2009-02-04 Thread Schwaighofer Clemens
On Tue, Nov 18, 2008 at 18:34, Andy Greensted wrote: > So, two questions: > > - Is there anyway to run a newer version (8.3.5) of psql in some sort of > 'backwards compatible' mode? > > - Do you have any tips on making 7.1.3 compile on a newer system? The last time I had to compile super old cod

Re: [GENERAL] field with Password

2009-02-04 Thread Adam Rich
> >> I would like to create a new table where one of the field would be a > >> user password. Is there any data type for supporting this > >> functionality? Something like Password DataType. I've taken a look > of > >> the available data types in PgAdmin Application and there is nothing > >> simila

[GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Emilie Laffray
Hello, I am sending this email since I am hitting a snag with postgresql. I am currently running the following version of postgresql: Postgresql 8.3.5 on Windows XP Pro 32bits I am getting a crash whenever I try to perform an update on some rows. More precisely, I have recently imported a dataset

Re: [GENERAL] Vacuums taking forever :(

2009-02-04 Thread Gregory Stark
Phoenix Kiula writes: > Thanks, Gregory and Simon, for the very useful posts. > > I have increased the vacuum_cost_limit to 2000 for now, just to see if > that has an impact. Hopefully positive. Note that that was offhand speculation. Conventional wisdom is that it should make things *worse* --

[GENERAL] PGAdmin and records as inserts (like in SQLyog)

2009-02-04 Thread durumdara
Hi! I wanna ask, that have the PGAdmin same possibility (like in SQLyog) to copy records (from the Query, from the Table View) to clipboard in the "INSERT SQL" format? This can speed up the work, and I can insert the record to another table that have similar (but a little different) format

Re: [GENERAL] PGAdmin and user privileges - what I do wrong?

2009-02-04 Thread Raymond O'Donnell
On 04/02/2009 12:40, durumdara wrote: > When I want to manually assign this user to a table, I have problem in > the PGAdmin's Privilege tab. > The privileges GroupBox have a ComboBox, named Role. This ComboBox is > not containing the zx user in it's list. By default, that combo box shows only gr

Re: [GENERAL] PGAdmin and user privileges - what I do wrong?

2009-02-04 Thread Dave Page
On Wed, Feb 4, 2009 at 12:40 PM, durumdara wrote: > Hi! > > Please help me a little. > > I used PGAdmin to administrate my databases. > I created a new user named "zx". > > CREATE ROLE zx LOGIN > ENCRYPTED PASSWORD '*' > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; > > When I want to manually

Re: [GENERAL] C function question

2009-02-04 Thread Gregory Stark
Tom Lane writes: > Alvaro Herrera writes: >> Grzegorz Jaśkiewicz wrote: >>> looks like it really has to be defined with "char" in double quotes. I >>> thought just char is enough... > >> They're different types. > > You know, maybe we should stop holding our noses and do something about > this

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Emilie Laffray
Hello, 1) I can perform a query on the rows that I am trying to update. I have also successfully updated rows before in the same table and also after. 2) I have no reason to believe that the filesystem got corrupted. I have started a scan before you asked the question wondering if it could be

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Richard Huxton
Andrew Gould wrote: > On Wed, Feb 4, 2009 at 6:18 AM, Emilie Laffray > wrote: >> UPDATE gtable AS g >> SET code = '00' -- 04 >> WHERE g.code = '04' >> AND g.cc = 'TW'; > What does '--' do? It's a comment delimeter -- Richard Huxton Archonet Ltd -- Sent via

Re: [GENERAL] field with Password

2009-02-04 Thread Iñigo Barandiaran
Thanks! Ok. I've found http://256.com/sources/md5/ library. So the idea is to define in the dataBase a Field of PlainText type. When I want to insert a new user, I define a password, convert to MD5 hash with the library and store it in the DataBase. Afterwards, any user check should get the

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Richard Huxton
Emilie Laffray wrote: > 3) I have an antivirus running, but again this antivirus has been > running for months and I have worked on postgresql also for months. > There has been an update yesterday to that antivirus, but I don't think > it had an impact. > I tried also in the meantime to run a vacu

Re: [GENERAL] C function question

2009-02-04 Thread Merlin Moncure
On Tue, Feb 3, 2009 at 6:16 PM, Tom Lane wrote: > Merlin Moncure writes: >> On Tue, Feb 3, 2009 at 4:28 PM, Tom Lane wrote: >>> You know, maybe we should stop holding our noses and do something about >>> this old gotcha. That type's not going away anytime soon, but could we >>> rename it to cha

Re: [GENERAL] field with Password

2009-02-04 Thread Raymond C. Rodgers
Iñigo Barandiaran wrote: Thanks! Ok. I've found http://256.com/sources/md5/ library. So the idea is to define in the dataBase a Field of PlainText type. When I want to insert a new user, I define a password, convert to MD5 hash with the library and store it in the DataBase. Afterwards, any u

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Emilie Laffray
Hello, well Icouldn't turn off my antivirus since it is controlled by our IT management team. However, since I rebuilt the indexes, the query has been running fine. I don't understand what happpened. Before asking for help, I made sure I could repeat the problem over several reboots. Emilie

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Richard Huxton
Emilie Laffray wrote: > Hello, > > well Icouldn't turn off my antivirus since it is controlled by our IT > management team. However, since I rebuilt the indexes, the query has > been running fine. I don't understand what happpened. Before asking for > help, I made sure I could repeat the problem o

Re: [GENERAL] ramblings about password exposure (WAS: field with Password)

2009-02-04 Thread Sam Mason
On Wed, Feb 04, 2009 at 09:34:56AM -0500, Raymond C. Rodgers wrote: > You don't need to depend on an external library for this functionality; > it's built right into Postgres. Personally, in my own apps I write in > PHP, I use a combination of sha1 and md5 to hash user passwords, > without depe

Re: [GENERAL] PGAdmin and records as inserts (like in SQLyog)

2009-02-04 Thread Raymond O'Donnell
On 04/02/2009 12:31, durumdara wrote: > I wanna ask, that have the PGAdmin same possibility (like in SQLyog) to > copy records (from the Query, from the Table View) to clipboard in the > "INSERT SQL" format? > > This can speed up the work, and I can insert the record to another table > that have

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Richard Huxton
Emilie Laffray wrote: > Hello, > > I am sending this email since I am hitting a snag with postgresql. I > am currently running the following version of postgresql: > Postgresql 8.3.5 on Windows XP Pro 32bits > > I am getting a crash whenever I try to perform an update on some rows. > More precise

Re: [GENERAL] field with Password

2009-02-04 Thread Iñigo Barandiaran
Thanks for your answers. Sorry for the questions but I'm new to Postgre :) The problem with a plain text password is that a user can see it by looking at the user table. Both suggest to use MD5. How can i use it? Any link, example about this would be very appreciated. Thanks in advance! Iñi

[GENERAL] Sort method: external merge

2009-02-04 Thread wstrzalka
It's kind of lame questions, possibly I'm missing something but my doubts are as follow: When planner/executor needs to sort rowsit sorts whole records (i think so). So in the case when there are many wide columns it takes quite a lot of memory and sort goes out to the disk because it excess the w

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Grzegorz Jaśkiewicz
what about free disc space ? aren't you running out of ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Which is best, timestamp as float or integer ?

2009-02-04 Thread A B
Hi. >From the manual I read that timestamps are stored as double but they can also be stored as 8 byte integers. I understand the precision problem with floats and the limited range of the integers and I feel confident that I should not worry about the Year 294276 or Year 5874897 problems (highest

Re: [GENERAL] field with Password

2009-02-04 Thread hubert depesz lubaczewski
On Wed, Feb 04, 2009 at 11:09:51AM +0100, Iñigo Barandiaran wrote: > I would like to create a new table where one of the field would be a > user password. Is there any data type for supporting this functionality? > Something like Password DataType. I've taken a look of the available > data ty

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread A.M.
On Feb 3, 2009, at 11:55 PM, Guy Rouillier wrote: Craig Ringer wrote: An internal job scheduler with the ability to fire jobs on certain events as well as on a fixed schedule could be particularly handy in conjunction with true stored procedures that could explicitly manage transactions.

Re: [GENERAL] field with Password

2009-02-04 Thread John R Pierce
Iñigo Barandiaran wrote: Hi. I would like to create a new table where one of the field would be a user password. Is there any data type for supporting this functionality? Something like Password DataType. I've taken a look of the available data types in PgAdmin Application and there is nothi

Re: [GENERAL] field with Password

2009-02-04 Thread A. Kretschmer
In response to Iñigo Barandiaran : > Hi. > > > I would like to create a new table where one of the field would be a > user password. Is there any data type for supporting this functionality? > Something like Password DataType. I've taken a look of the available > data types in PgAdmin Applicat

Re: [GENERAL] field with Password

2009-02-04 Thread Iñigo Barandiaran
Thanks! This is great. I'm now implementing this functionality. Thank you all. You are great! Best, You should always salt your password hashes. Ie randomly generate a salt string, the store this and the password hash:         insert into auth (user_id, salt, password) va

Re: [GENERAL] field with Password

2009-02-04 Thread Iñigo Barandiaran
Thanks Raymond That is something I wanted! It's Great if it is already integrated in Postgre! Superb. This is much more easy. Thank you All. Best, Iñigo Barandiaran wrote: Well, you can use the built-in md5 function for this purpose. For instance, you could

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Tommy Gildseth
Andrew Gould wrote: What does '--' do? -- Is an SQL comment -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22 85 29 39 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] field with Password

2009-02-04 Thread Chris . Ellis
You should always salt your password hashes. Ie randomly generate a salt string, the store this and the password hash: insert into auth (user_id, salt, password) values (1,'blah',md5('blah' + 'test')) ; then to check the password select true from auth where user_id = 1 and pass

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Andrew Gould
On Wed, Feb 4, 2009 at 6:18 AM, Emilie Laffray wrote: > Hello, > > I am sending this email since I am hitting a snag with postgresql. I > am currently running the following version of postgresql: > Postgresql 8.3.5 on Windows XP Pro 32bits > > I am getting a crash whenever I try to perform an upda

Re: [GENERAL] installation

2009-02-04 Thread Grzegorz Jaśkiewicz
On Wed, Feb 4, 2009 at 9:09 AM, Kusuma Pabba wrote: > Hello all, > i am new to postgresql, i want to create tables in this > > i have followed > 10 Steps to Installing PostgreSQL which is chapter two of installing > postgresql > > i could follow upto step no 7 > but i am getting errors from

[GENERAL] PGAdmin and user privileges - what I do wrong?

2009-02-04 Thread durumdara
Hi! Please help me a little. I used PGAdmin to administrate my databases. I created a new user named "zx". CREATE ROLE zx LOGIN ENCRYPTED PASSWORD '*' NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; When I want to manually assign this user to a table, I have problem in the PGAdmin's Privil

Re: [GENERAL] field with Password

2009-02-04 Thread John R Pierce
Iñigo Barandiaran wrote: Thanks for your answers. Sorry for the questions but I'm new to Postgre :) The problem with a plain text password is that a user can see it by looking at the user table. Both suggest to use MD5. How can i use it? Any link, example about this would be very appreciated

Re: [GENERAL] field with Password

2009-02-04 Thread Iñigo Barandiaran
Thanks Raymond That is something I wanted! It's Great if it is already integrated in Postgre! Superb. This is much more easy. Thank you All. Best, Iñigo Barandiaran wrote: Thanks! Ok. I've found http://256.com/sources/md5/ library. So the idea is to define in the da

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Guy Rouillier
Karsten Hilbert wrote: Craig, what kind of "events" are you thinking about? Triggers are already pieces of code that run upon "certain events", namely insert, update or delete events. What others do you have in mind? That's a good point, actually. I can't think of much you can't do with a tri

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread John DeSoi
On Feb 3, 2009, at 3:41 PM, Peter Geoghegan wrote: What about postgreSQL's inability to re-order columns? Please don't point out that I shouldn't rely on things being in a certain order when I SELECT * FROM table. I'm well aware of that, I just generally have an aesthetic preference for a tabl

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Karsten Hilbert
On Wed, Feb 04, 2009 at 12:37:31PM -0500, Guy Rouillier wrote: > Karsten Hilbert wrote: Craig, what kind of "events" are you thinking about? Triggers are already pieces of code that run upon "certain events", namely insert, update or delete events. What others do you have in mi

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Grzegorz Jaśkiewicz
I dream about db wide checks on tables, without need to write expensive triggers. Basically, something that would run a select query after insert/update/delete and based on result commit or rollback. unless there's something like that already in SQL (I am not aware of all features in sql2008 draft)

Re: [GENERAL] field with Password

2009-02-04 Thread Sam Mason
On Wed, Feb 04, 2009 at 04:42:05PM +, chris.el...@shropshire.gov.uk wrote: > If you want to be really secure, use both a md5 and sha1 hash, snice it > has been proved you can generate hash collisions so you could use: > > insert into auth (user_id, salt, password) values > (1,'blah',

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Simon Riggs
On Wed, 2009-02-04 at 14:09 +0900, Craig Ringer wrote: > Guy Rouillier wrote: > > Craig Ringer wrote: > >> An internal job scheduler with the ability to fire jobs on certain > >> events as well as on a fixed schedule could be particularly handy in > >> conjunction with true stored procedures tha

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Mark Roberts
On Thu, 2009-01-29 at 13:16 +, Gregory Stark wrote: > I'm putting together a talk on "PostgreSQL Pet Peeves" for discussion at > FOSDEM 2009 this year. I have a pretty good idea what some them are of course, > but I would be interested to hear if people have any complaints from personal > exper

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Merlin Moncure
On Mon, Feb 2, 2009 at 4:54 PM, Christopher Browne wrote: > - Stored procedures that can manage transactions (e.g. - contrast with > present stored functions that forcibly live *inside* a transaction > context; the point isn't functions vs procedures, but rather to have > something that can do txn

[GENERAL] case sensitive db name?

2009-02-04 Thread Thomas Finneid
I have a case sensitivity problem I dont understand. On a Solaris 10 with pg 8.2.6 (Sun build) I get problems when I do a CREATE DATABASE with a db name with case. On a Kubuntu machine with pg 8.2.7 it is not a problem. More specifically the problem arises after the CREATE DATABASE, it occurs

[GENERAL] Array, bytea and large objects

2009-02-04 Thread David Wall
I am trying to assess the db issues surrounding several constructs allowed in PG 8.3, including ARRAY, BYTEA and large objects (LO). We store a lot of data as encrypted XML structures (name-value pairs mostly) that can be updated many times during its lifetime (most updates occur over several

[GENERAL] SELECT on a table with Time values

2009-02-04 Thread Anderson dos Santos Donda
Hi all!! I have a simple table with two column. The first column is a time type and the other is a integer type. This table have datas from each minute of day. Example : 15:00:00, 15:01:00, 15:02:00 etc... I want a SELECT command wich return for me the datas from each five minutes of day. Exam

Re: [GENERAL] SELECT on a table with Time values

2009-02-04 Thread Dann Corbit
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Anderson dos Santos Donda Sent: Wednesday, February 04, 2009 12:05 PM To: pgsql-general@postgresql.org Subject: [GENERAL] SELECT on a table with Time values Hi all!! I have a simple table with two

Re: [GENERAL] case sensitive db name?

2009-02-04 Thread Richard Huxton
Thomas Finneid wrote: > I have a case sensitivity problem I dont understand. > > On a Solaris 10 with pg 8.2.6 (Sun build) I get problems when I do a > CREATE DATABASE with a db name with case. > > On a Kubuntu machine with pg 8.2.7 it is not a problem. > > More specifically the problem arises a

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Peter Eisentraut
On Wednesday 04 February 2009 20:36:24 Grzegorz Jaśkiewicz wrote: > I dream about db wide checks on tables, without need to write > expensive triggers. > Basically, something that would run a select query after > insert/update/delete and based on result commit or rollback. > unless there's somethin

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Peter Eisentraut
On Wednesday 04 February 2009 19:39:42 John DeSoi wrote: > Somewhat related, it would be nice if columns had a unique identifier > in the catalog rather than just a sequence number for the table. This > would make it possible to distinguish between altering a column versus > dropping/adding when co

Re: [GENERAL] Which is best, timestamp as float or integer ?

2009-02-04 Thread Peter Eisentraut
On Wednesday 04 February 2009 15:48:41 A B wrote: > From the manual I read that timestamps are stored as double but they > can also be stored as 8 byte integers. The advantage of the integer storage is mainly that calculations and comparisons have a predictable error and don't suffer from some of

[GENERAL] Elapsed time between timestamp variables in Function

2009-02-04 Thread Nico Callewaert
Hi ! I saw previous postings about elapsed time between 2 timestamps, using SELECT EXTRACT... I have similar question, but it's not in a select statement, but between 2 variables in a function. To keep it simple, I have 2 variables, let's say A and B, both TimeStamp. Now I would like to know

Re: [GENERAL] ramblings about password exposure (WAS: field with Password)

2009-02-04 Thread Adam Rich
> On Wed, Feb 04, 2009 at 09:34:56AM -0500, Raymond C. Rodgers wrote: > > You don't need to depend on an external library for this > functionality; > > it's built right into Postgres. Personally, in my own apps I write in > > PHP, I use a combination of sha1 and md5 to hash user passwords, > > wit

Re: [GENERAL] Elapsed time between timestamp variables in Function

2009-02-04 Thread Raymond O'Donnell
On 04/02/2009 21:59, Nico Callewaert wrote: > To keep it simple, I have 2 variables, let's say A and B, both > TimeStamp. Now I would like to know the absolute value of elapsed > seconds between the 2 timestamps. Has to be absolute value, because > can be positive or negative, depends if A > B o

Re: [GENERAL] Pet Peeves?

2009-02-04 Thread Grant Allen
Mark Roberts wrote: - It'd be nice if the query planner was more "stable" - sometimes the queries run fast, and then sometimes they randomly take 2 hours for a delete that normally runs in a couple of minutes. I was going to stay silent, because my pet peeves were already covered or had been f

Re: [GENERAL] Sort method: external merge

2009-02-04 Thread Jeff Davis
On Wed, 2009-02-04 at 02:15 -0800, wstrzalka wrote: > Isn't it possible to sort only fields that order matters & some row > identifier/position (don't really know what - oid/ctid are tight to > table but something temporary tight to 'resultset')? It would take > much less memory and could be proces

[GENERAL] debugging plpgsql functions

2009-02-04 Thread Chris
Hi all, I have a few plpgsql functions to debug to see why they are slow. They consist of a bunch of sql statements using new.* / old.* variables (ie not using "EXECUTE", the sql is being called directly). Is there a way to capture the actual sql that's being executed with variables substitu

Re: [GENERAL] Elapsed time between timestamp variables in Function

2009-02-04 Thread Osvaldo Kussama
2009/2/4 Nico Callewaert : > Hi ! > > I saw previous postings about elapsed time between 2 timestamps, using > SELECT EXTRACT... > I have similar question, but it's not in a select statement, but between 2 > variables in a function. > > To keep it simple, I have 2 variables, let's say A and B, both

Re: [GENERAL] debugging plpgsql functions

2009-02-04 Thread justin
Chris wrote: Hi all, I have a few plpgsql functions to debug to see why they are slow. They consist of a bunch of sql statements using new.* / old.* variables (ie not using "EXECUTE", the sql is being called directly). Is there a way to capture the actual sql that's being executed with vari

[GENERAL] running postgres

2009-02-04 Thread Kusuma Pabba
may this be a silly doubts but , i am new to postgres, please answer to these:: /usr/local/pgsql/bin/psql test test=# sudo su postgres -c psql template1 template=# what is the difference between the above two and, why is the path different in both cases which should i use now how can i c

Re: [GENERAL] running postgres

2009-02-04 Thread Schwaighofer Clemens
On Thu, Feb 5, 2009 at 15:35, Kusuma Pabba wrote: > > may this be a silly doubts but , i am new to postgres, please answer to > these:: > > /usr/local/pgsql/bin/psql test > test=# > > > sudo su postgres -c psql template1 > template=# > > > what is the difference between the above two and, > why is

Re: (Questioning the planner's mind) - was Re: [GENERAL] Fastest way to drop an index?

2009-02-04 Thread Alban Hertroys
On Feb 4, 2009, at 5:23 AM, Phoenix Kiula wrote: On Wed, Feb 4, 2009 at 5:13 AM, Tom Lane wrote: Phoenix Kiula writes: Index Scan using new_idx_testimonials_userid on testimonials (cost=0.00..157.78 rows=1 width=9) (actual time=8809.715..8809.715 rows=0 loops=1) Index Cond: ((user_id)::tex