Re: [GENERAL] SET LOCAL synchronous_commit TO OFF

2015-06-11 Thread Thom Brown
On 11 June 2015 at 17:34, Robert DiFalco wrote: > I want to make sure I understand the repercussions of this before making it > a global setting. > > As far as I can tell this will put data/referential integrity at risk. It > only means that there is a period of time (maybe 600 msecs) between when

Re: [GENERAL] Exclusively locking parent tables while disinheriting children.

2015-08-07 Thread Thom Brown
On 30 July 2015 at 13:35, Rowan Collins wrote: > Hi, > > When working with partition sets, we're seeing occasional errors of "could > not find inherited attribute..." in Select queries. This is apparently > caused when an "ALTER TABLE ... NO INHERIT" runs concurrently with another > transaction s

Re: [GENERAL] Exclusively locking parent tables while disinheriting children.

2015-09-15 Thread Thom Brown
On 7 August 2015 at 12:34, Thom Brown wrote: > > On 30 July 2015 at 13:35, Rowan Collins wrote: > >> Hi, >> >> When working with partition sets, we're seeing occasional errors of >> "could not find inherited attribute..." in Select queries. T

Re: [GENERAL] Grant SELECT/Execute to View/Function but not underlying Table

2015-09-24 Thread Thom Brown
On 24 September 2015 at 12:28, Alex Magnum wrote: > Hi, > is it possible to grant select to views and functions without the need to > also grant the user the SELECT privileges to the Tables used in the views or > functions? > > That way I could create read only users on a website and limit their a

Re: [GENERAL] pg_restore fails to restore sequences

2015-09-28 Thread Thom Brown
On 28 September 2015 at 21:47, Tom Lane wrote: > Spencer Gardner writes: >> I'm transferring all of the databases on my old postgres server to a new >> server. To do this I'm using pg_dump and then pg_restore: > >> pg_dump --host localhost --port 5432 --username "postgres" --format custom >> --bl

Re: [GENERAL] pg_restore fails to restore sequences

2015-09-28 Thread Thom Brown
On 28 September 2015 at 22:21, Spencer Gardner wrote: > Actually, yes. That's the reason for backing up. We had been playing with > BDR on a custom build but have reverted to the stock Ubuntu build for the > time being. So it sounds like the issue is caused by dumping from our custom > BDR build.

Re: [GENERAL] How to drop user if objects depend on it

2015-10-07 Thread Thom Brown
On 7 October 2015 at 11:42, Andrus wrote: > Hi! > > Database idd owner is role idd_owner > Database has 2 data schemas: public and firma1. > User may have directly or indirectly assigned rights in this database and > objects. > User is not owner of any object. It has only rights assigned to object

Re: [GENERAL] postgresql 9.4 streaming replication

2015-10-19 Thread Thom Brown
On 19 October 2015 at 09:41, Sven Löschner wrote: > I inserted the following in my pg_hba.conf to test, but it does not work: > > hostreplication rep_user0.0.0.0/0 trust > hostall postgres0.0.0.0/0 trust > > thank you in advan

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Thom Brown
On 20 January 2016 at 12:15, Sachin Srivastava wrote: > I am unable to find out the syntax error in below code, please suggest? > > > > ERROR: syntax error at or near "select" > LINE 44: select Count(0) into sFound from budget_period ... > ^ > ** Error **

[GENERAL] Very slow DELETEs with foreign keys

2016-02-08 Thread Thom Brown
Hi, I've just noticed a general delete performance issue while testing a patch, and this can be recreated on all recent major versions. I have 2 tables: CREATE TABLE countries ( country text PRIMARY KEY, continent text ); CREATE TABLE contacts ( id serial PRIMARY KEY, first_name

Re: [GENERAL] Very slow DELETEs with foreign keys

2016-02-08 Thread Thom Brown
On 8 February 2016 at 14:52, Tom Lane wrote: > Thom Brown writes: >> I've just noticed a general delete performance issue while testing a >> patch, and this can be recreated on all recent major versions. > >> I have 2 tables: > >> CREATE TABLE count

Re: [GENERAL] VACUUM FULL for performance

2010-10-07 Thread Thom Brown
k your query plans to see where the real bottlenecks are. Is your system properly configured too? Check out http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailin

Re: [GENERAL] Understanding PostgreSQL Storage Engines

2010-10-13 Thread Thom Brown
er of gotchas, but also means supporting all these engines requires an extra level of knowledge. I think focus on a single storage engine means it's extremely mature, predictable and stable... IMHO. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] Adding a New Column Specifically In a Table

2010-10-14 Thread Thom Brown
that important? You can select the columns in any order you wish in queries. And even if you had the ability to specify placement of a column before another column, its unlikely it would physically rewrite the column data to match that, so the column position would only be cosmetic. -- Thom B

Re: [GENERAL] Adding a New Column Specifically In a Table

2010-10-14 Thread Thom Brown
port it...that sucks :( > > http://wiki.postgresql.org/wiki/Alter_column_position The question is, why do you require it? -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Adding a New Column Specifically In a Table

2010-10-14 Thread Thom Brown
hen do: > >  create table new_table as >    select [columns in desired order] from old_table; > >  drop table old_table; > >  alter table new_table rename to old_table; > > ...remembering to deal with foreign key constraints as you go. ..and indexes, triggers, rules, view

Re: [GENERAL] Adding a New Column Specifically In a Table

2010-10-14 Thread Thom Brown
n names swap round, but then the data will appear as if it's coming from the wrong column. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] How to remove "enter" or new line

2010-10-14 Thread Thom Brown
#x27;) Bear in mind, the above example would mean that if there was no whitespace between the newline and the words either side of it, they would effectively be concatenated, so you may wish to replace with a space, or use a better regular expression. -- Thom Brown Twitter: @darkixion IRC (freenode

Re: [GENERAL] Problem with initdb: creates database which do not exists

2010-10-18 Thread Thom Brown
create it manually from within psql. The parameter you're passing is the directory where the cluster is to be created, so it will appear in the foo directory relative to wherever you're running that command from. What you probably want is: initdb --locale=de_DE.UTF-8 --lc-collate=de_DE.UTF-8 --lc-ctype=de_DE.UTF-8 --lc-messages=de_DE.UTF-8 --lc-monetary=de_DE.UTF-8 --lc-numeric=de_DE.UTF-8 --lc-time=de_DE.UTF-8 createdb -h localhost -p 5432 foo Regards Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Can't take base back up with Postgres 9.0 on Solaris 10

2010-10-28 Thread Thom Brown
disables Go into psql and type "SHOW wal_level;" What does it say? If it doesn't say "archive" then you've either not restarted PostgreSQL since you changed it, or you're looking at the wrong config file. As for the first error, have you tried just typing that comma

Re: [GENERAL] Can't take base back up with Postgres 9.0 on Solaris 10

2010-10-28 Thread Thom Brown
when you run psql. This also explains why you can't use the 2-parameter form of pg_start_backup as that wasn't introduced until 8.4. You need to connect to a 9.0 instance. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-gener

Re: [GENERAL] moving database objects from one schema to other

2010-10-28 Thread Thom Brown
> move, I am doing that using pg_restore. But I am finding it difficult for > functions, sequences > Thanks for your help > Regards Yes, you just need to assign a new schema: ALTER TABLE table_name SET SCHEMA new_schema; ALTER FUCNTION function_name SET SCHEMA new_schema; etc...

Re: [GENERAL] server gets slow at certain time

2010-10-29 Thread Thom Brown
nt_segments setting? You may wish to up it if you're getting many inserts/updates. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] server gets slow at certain time

2010-10-29 Thread Thom Brown
On 29 October 2010 14:34, AI Rumman wrote: > At present, > checkpoint_segment=3 > checkpoint_timeout=300 > > I'd recommend at least setting checkpoint_segments to 12 and you might want to increase checkpoint_timeout too, although not too high. Maybe try doubling it. And as Devrim pointed out, p

Re: [GENERAL] Temporary schemas

2010-11-01 Thread Thom Brown
space WHERE oid = pg_my_temp_schema(); to get the name of the current temporary schema for your session. And it's always pg_temp_[nnn] as far as I'm aware, with a corresponding pg_toast_temp_[nnn] schema. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] pgAdmin 3 index display problem

2010-11-01 Thread Thom Brown
ary keys, but just not visible in pgAdmin as an actual index. The fact a primary key is there (listed in the contraints node) indicates that it automatically has an index anyway. And the name shown in constraints is the name of the index. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] migrate from 8.1 to 9.0

2010-11-08 Thread Thom Brown
.html#AEN101283 http://www.postgresql.org/docs/9.0/static/release-9-0.html#AEN98988 -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] The first dedicated PostgreSQL forum

2010-11-13 Thread Thom Brown
d with no sense of a focused community. It's a shame that a forum can't act as a front-end for a mailing list, so signing up to the forum actually signs you up to a mailing list (if you're not already signed up), but without receiving any emails. Messages posted to the forum would g

Re: [GENERAL] The first dedicated PostgreSQL forum

2010-11-13 Thread Thom Brown
On 13 November 2010 19:38, Joe Conway wrote: > On 11/13/2010 11:24 AM, Tom Lane wrote: > > Thom Brown writes: > >> It's a shame that a forum can't act as a front-end for a mailing list, > so > >> signing up to the forum actually signs you up to a ma

Re: [GENERAL] The first dedicated PostgreSQL forum

2010-11-13 Thread Thom Brown
On 13 November 2010 19:44, Thom Brown wrote: > On 13 November 2010 19:38, Joe Conway wrote: > >> On 11/13/2010 11:24 AM, Tom Lane wrote: >> > Thom Brown writes: >> >> It's a shame that a forum can't act as a front-end for a mailing list, >> so

Re: [GENERAL] Postgres forums ... take 2

2010-11-15 Thread Thom Brown
ubscribers have to subscribe on a list-by-list basis. So registration to the forum site wouldn't necessarily mean they'd want to join any particular mailing list. Similarly, could they unregister easily? And anyone who attempts to post to a mailing list they aren't subscribed to requires moderation, so we don't wish to exacerbate this. But that's a nice start. :) Cheers -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] Postgres forums ... take 2

2010-11-16 Thread Thom Brown
ough fine.  It would just have to work correctly the other way, in that it sends plain text emails with correct levels of chevrons. A test mailing list will no doubt need to be set up for testing such functionality. But before too much work commences on this, will this have the backing of

Re: [GENERAL] Counting boolean values (how many true, how many false)

2010-11-16 Thread Thom Brown
ut it also would let you do stuff like: SELECT countif(my_column > 3) AS 'stuff greater than 3', countif(this_column = that_column) AS 'balanced values' FROM my_table; -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgs

Re: [GENERAL] Counting boolean values (how many true, how many false)

2010-11-16 Thread Thom Brown
On 16 November 2010 17:02, Thom Brown wrote: > On 16 November 2010 16:49, maarten wrote: >> Hi, >> >> sum doesn't like booleans, but it does like integers so: >> sum(boolval::int) solves that problem for you. >> >> SELECT id,sum(good::int + fair::int

Re: [GENERAL] The first dedicated PostgreSQL forum

2010-11-18 Thread Thom Brown
rum hasn't been rejected out of hand is that we recognise that there is a demographic which probably see a mailing list as a barrier, hence our discussion about integrating a bidirection sync between a forum and a mailing list. And the reason why we like that idea is that it ensures that peo

Re: [GENERAL] subquery join order by

2010-11-18 Thread Thom Brown
. Don't bother with ordering sub-selects. So in your case, just use: SELECT * FROM (SELECT DISTINCT ON (b_id) * FROM a) sub LEFT JOIN b ON b.id = sub.b_id ORDER BY sub.b_id, sub.id; But why bother with a sub-select anyway? You can write it as: SELECT DISTINCT ON (a.b_id) * FROM a LEFT JOIN

Re: Fwd: [GENERAL] Postgres forums ... take 2

2010-11-23 Thread Thom Brown
ailing list conversations. You may wish to set up a wiki page to collate what has been discussed, proposed and agreed so far. If you haven't used the wiki before, you will need to set up a community account if you don't already have one, which you can do so at http://www.postgresql.org

Re: [GENERAL] How to find correct locale name for CREATE DATABASE

2010-11-30 Thread Thom Brown
> 3. 2. CREATE DATABASE "mydb" WITH TEMPLATE=template0 LC_COLLATE='et_EE.UTF8' > LC_CTYPE='et_EE.UTF8' OWNER="mydb_owner" ENCODING='UNICODE' > > in all cases same error > > invalid locale name > > occurs. > > Que

Re: [GENERAL] Postgres forums ... take 2

2010-12-20 Thread Thom Brown
ions so far onto the wiki. That should make it easier for everyone to keep up with developments :) -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] plpython returns integer[] fails for multi-dimensional array

2010-12-21 Thread Thom Brown
lid input syntax for integer: "[1, 2, 3]" > CONTEXT:  while creating return value > PL/Python function "atest" > > How can I return multi-dimensional arrays in plpython? Are you sure that "a" returns okay in that scenario. You're using a list. Shoul

Re: [GENERAL] Queyring for columns which are exist in table.

2011-01-27 Thread Thom Brown
On 27 January 2011 07:52, Santosh Bhujbal (sabhujba) wrote: > Hi All, > > > > I want to fire a query such that if the particular column does not exist > then query should return some default value. Why do you want to do this? What is it you using this for? -- Thom Brown T

Re: [GENERAL] Queyring for columns which are exist in table.

2011-01-27 Thread Thom Brown
hat is available beforehand. Is there any logic to which tables have the additional column and which ones don't? For example, do all tables with the additional column have a name containing a date after a certain point in time? -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Register

Re: [GENERAL] Problem with restoring from backup on 9.0.2

2011-01-27 Thread Thom Brown
 [15781]: [6-1] LOG:  restartpoint complete: > wrote 10779 buffers (16.4%); write=44.044 s, sync=2.710 s, total=47.082 s > 1277:2010-12-27 17:38:47 UTC  [15781]: [7-1] LOG:  recovery restart point at > 37/5F01F358 > 1278:2010-12-27 17:38:47 UTC  [15781]: [8-1] DETAIL:  last completed

Re: [GENERAL] Error trying to install Ruby postgres gems on OS/X

2011-01-28 Thread Thom Brown
ill remain installed in > /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28 for inspection. > Results logged to > /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28/ext/gem_make.out > > I have Postgres 9.0 installed at /Library/PostgreSQL/9.0.  Any ideas? > > Mike Hi Mike,

Re: [GENERAL] Error trying to install Ruby postgres gems on OS/X

2011-01-28 Thread Thom Brown
in > /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28 for inspection. > Results logged to > /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28/ext/gem_make.out > /Library/PostgreSQL/9.0> > > > On Fri, Jan 28, 2011 at 5:46 PM, Thom Brown wrote: >> On 29 January

Re: [GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Thom Brown
rom 270 milliseconds to 173 seconds! The index > scan on bprofile_comments_status_idx suddenly shows 15288 loops, where it > should be 1 loop just like before. So > shomehow the 9.0 planner gets it all wrong. > > I also noticed that normally I get an iowait with a few percent during

Re: [GENERAL] pymssql: Problem with Unicode string

2011-01-29 Thread Thom Brown
my question: > How to get Unicode data from MSSQL database using pymssql library? > > Any suggestion would be highly appreciated! > regards, > Orgil.D This is a PostgreSQL mailing list. Please direct this question to an MSSQL or Python list instead. -- Thom Brown Twitter:

Re: [GENERAL] pymssql Connection to the database failed for an unknown reason

2011-01-29 Thread Thom Brown
me! > > Any suggestion would be highly appreciated! > > Best regards, > Orgil Again, this is a PostgreSQL list. Please use this list for PostgreSQL-related queries only. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Issues with generate_series using integer boundaries

2011-01-31 Thread Thom Brown
eries(-2147483648::int4, -2147483644::int4) AS a(x); ERROR: integer out of range postgres=# SELECT x FROM generate_series(-9223372036854775808::int8, -9223372036854775804::int8) AS a(x); ERROR: bigint out of range I've recreated this on 9.0.1 and 9.1devel on a 64-bit platform. Bug? -- Thom Bro

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-01-31 Thread Thom Brown
On 1 February 2011 00:15, Thom Brown wrote: > Hi, > > I've noticed that if I try to use generate_series to include the upper > boundary of int4, it never returns: > > SELECT x FROM generate_series(2147483643::int4, 2147483647::int4) AS a(x); > > But the same quer

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-01-31 Thread Thom Brown
On 1 February 2011 00:36, Tom Lane wrote: > Thom Brown writes: >> Actually, those lower bound errors aren't related to generate_series, >> but I'd still like to know why -2147483648::int4 is out of range. > > :: binds tighter than - (and everything else too).  Writ

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-01-31 Thread Thom Brown
On 1 February 2011 00:41, Thom Brown wrote: > On 1 February 2011 00:36, Tom Lane wrote: >> Thom Brown writes: >>> Actually, those lower bound errors aren't related to generate_series, >>> but I'd still like to know why -2147483648::int4 is out of rang

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-01-31 Thread Thom Brown
On 1 February 2011 01:05, Tom Lane wrote: > Thom Brown writes: >> I've noticed that if I try to use generate_series to include the upper >> boundary of int4, it never returns: > > I'll bet it's testing "currval > bound" without considering the

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-01 Thread Thom Brown
On 1 February 2011 01:05, Tom Lane wrote: > Thom Brown writes: >> I've noticed that if I try to use generate_series to include the upper >> boundary of int4, it never returns: > > I'll bet it's testing "currval > bound" without considering the

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-01 Thread Thom Brown
On 1 February 2011 21:32, Alban Hertroys wrote: > On 1 Feb 2011, at 21:26, Thom Brown wrote: > >> On 1 February 2011 01:05, Tom Lane wrote: >>> Thom Brown writes: >>>> I've noticed that if I try to use generate_series to include the upper >>>>

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-03 Thread Thom Brown
On 1 February 2011 23:08, Thom Brown wrote: > On 1 February 2011 21:32, Alban Hertroys > wrote: >> On 1 Feb 2011, at 21:26, Thom Brown wrote: >> >>> On 1 February 2011 01:05, Tom Lane wrote: >>>> Thom Brown writes: >>>>> I've notice

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-03 Thread Thom Brown
On 3 February 2011 11:31, Thom Brown wrote: > On 1 February 2011 23:08, Thom Brown wrote: >> On 1 February 2011 21:32, Alban Hertroys >> wrote: >>> On 1 Feb 2011, at 21:26, Thom Brown wrote: >>> >>>> On 1 February 2011 01:05, Tom Lane wrote: >&

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-03 Thread Thom Brown
On 3 February 2011 11:34, Thom Brown wrote: > On 3 February 2011 11:31, Thom Brown wrote: >> On 1 February 2011 23:08, Thom Brown wrote: >>> On 1 February 2011 21:32, Alban Hertroys >>> wrote: >>>> On 1 Feb 2011, at 21:26, Thom Brown wrote: >>>&

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-03 Thread Thom Brown
On 3 February 2011 13:32, Thom Brown wrote: > Actually, further testing indicates this causes other problems: > > postgres=# SELECT x FROM generate_series(1, 9,-1) AS a(x); >  x > --- >  1 > (1 row) > > Should return no rows. > > postgres=# SELECT x FROM gene

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-03 Thread Thom Brown
that is desired behaviour is separate as I only wish to fix the bug. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-04 Thread Thom Brown
On 3 February 2011 13:58, Thom Brown wrote: > On 3 February 2011 13:32, Thom Brown wrote: >> Actually, further testing indicates this causes other problems: >> >> postgres=# SELECT x FROM generate_series(1, 9,-1) AS a(x); >>  x >> --- >>  1 >> (1 row

Re: [HACKERS] [GENERAL] Issues with generate_series using integer boundaries

2011-02-07 Thread Thom Brown
On 7 February 2011 09:04, Itagaki Takahiro wrote: > On Fri, Feb 4, 2011 at 21:32, Thom Brown wrote: >> The issue is that generate_series will not return if the series hits >> either the upper or lower boundary during increment, or goes beyond >> it.  The attached patch fixe

Re: [HACKERS] [GENERAL] Issues with generate_series using integer boundaries

2011-02-08 Thread Thom Brown
On 8 February 2011 09:22, Itagaki Takahiro wrote: > On Mon, Feb 7, 2011 at 20:38, Thom Brown wrote: >> Yes, of course, int8 functions are separate.  I attach an updated >> patch, although I still think there's a better way of doing this. > > Thanks. Please add

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
;t automatically do this is because since it's binary data, it's up to you to define what its content format is. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
On 8 February 2011 12:45, Michael wrote: > > Hello Thom, > > I sent this accidentally to you directly, here's a copy for the > list as well. > > On Tues., Feb 08, 2011, Thom Brown wrote: >>On 8 February 2011 10:39, Michael wrote: >>> opensips=> s

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
On 8 February 2011 13:19, Michael wrote: > > Hello Thom, > > On Tues., Feb 08, 2011, Thom Brown wrote: >>On 8 February 2011 12:45, Michael wrote: >>> On Tues., Feb 08, 2011, Thom Brown wrote: >>>>On 8 February 2011 10:39, Michael wrote: >>>

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
On 8 February 2011 13:43, Thom Brown wrote: > On 8 February 2011 13:19, Michael wrote: >> >> Hello Thom, >> >> On Tues., Feb 08, 2011, Thom Brown wrote: >>>On 8 February 2011 12:45, Michael wrote: >>>> On Tues., Feb 08, 2011, Thom Brown wro

Re: [GENERAL] When will old wal segments get removed?

2011-02-08 Thread Thom Brown
them go away? > > tried select pg_switch_xlog(), but it was just allocating new wal segments. > > version of pg is 8.4.2. Well normally those would get deleted automatically after archiving, but since you're suggesting the previous archive_command didn't return a zer

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
On 8 February 2011 14:30, Michael wrote: > > Hello Thom, > > On Tues., Feb 08, 2011, Thom Brown wrote: >>On 8 February 2011 13:43, Thom Brown wrote: >>> On 8 February 2011 13:19, Michael wrote: >>>> On Tues., Feb 08, 2011, Thom Brown wrote: >>>>

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
> set: > > bytea_output = 'escape' That won't help as the msg column is actually text... for some reason. And they want to see the converted ASCII text based on the hex-represented binary data. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
On 8 February 2011 19:28, Andreas Kretschmer wrote: > Thom Brown wrote: > >> On 8 February 2011 18:45, Andreas Kretschmer >> wrote: >> > Michael wrote: >> > >> >> >> >> Hello list, >> >> >> >> I'm tryin

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Thom Brown
On 8 February 2011 22:27, Michael wrote: > > On Tues., Feb 08, 2011, Thom Brown wrote: >>On 8 February 2011 19:28, Andreas Kretschmer >>wrote: >>> Thom Brown wrote: >>>> On 8 February 2011 18:45, Andreas Kretschmer >>>> wrote: >>>&

Re: [HACKERS] [GENERAL] Issues with generate_series using integer boundaries

2011-02-09 Thread Thom Brown
her option would be to add this here: > > http://wiki.postgresql.org/wiki/PostgreSQL_9.1_Open_Items I've removed it from the commitfest because it really doesn't belong there, and I've added it to the open items list. Thanks -- Thom Brown Twitter: @darkixion IRC (freenode):

Re: [GENERAL] Auto-Increment in Postgres

2011-02-11 Thread Thom Brown
alues every time you remove anything isn't really treating it as a key so much as ranking them in order of insertion. Why do you want to reset the sequence? If it's a primary key, it shouldn't matter. But if you really insist, you can do this: ALTER SEQUENCE meta_test_metadataid

Re: [GENERAL] Comparing md5 hash with md5 password hash

2011-03-01 Thread Thom Brown
ere any possibility to checkout > passwords in pg_authid table ? > > P.S. Sorry for my awfull english. > > s/rolename/rolname/ The password isn't hashed on its own; it's salted with the username, so you'd really want: rolpassword = 'md5' || md5('password' || rolname); -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread Thom Brown
ng a NULL exception?  Should I only > specify DEFAULT and drop the NOT NULL constraint? If you pass in a NULL to a column with a NOT NULL and a DEFAULT, the DEFAULT won't take effect as you've already passed the value, even though it's NULL, and it would produce the error.

[GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
ng obvious. I'm using 9.1dev if it's relevant. Thanks -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:06, Raymond O'Donnell wrote: > On 29/03/2011 19:44, Thom Brown wrote: >> >> Hi all, >> >> I've just set up a test user, revoked all access from them to a >> database, then tried to connect to that database and it let me in. >> W

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:28, hubert depesz lubaczewski wrote: > On Tue, Mar 29, 2011 at 07:44:51PM +0100, Thom Brown wrote: >> So, I'm overlooking something.  Could someone tell me what it is?  I >> bet it's something obvious.  I'm using 9.1dev if it's relevant. &g

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:51, Adrian Klaver wrote: > On 03/29/2011 01:32 PM, Thom Brown wrote: >> >> On 29 March 2011 21:28, hubert depesz lubaczewski >>  wrote: >>> >>> On Tue, Mar 29, 2011 at 07:44:51PM +0100, Thom Brown wrote: >>>> >>>>

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:59, Guillaume Lelarge wrote: > Le 29/03/2011 20:44, Thom Brown a écrit : >> Hi all, >> >> I've just set up a test user, revoked all access from them to a >> database, then tried to connect to that database and it let me in. >> When I try i

Re: [GENERAL] PostgreSQL documentation on kindle - best practices?

2011-04-04 Thread Thom Brown
fixed-size, in that you have to zoom in and scroll around the page to read everything on a Kindle. An e-book format would re-flow content to match the e-book reader and allow the user to adjust text size. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935

Re: [GENERAL] forums.postgresql.com.au

2011-04-06 Thread Thom Brown
mes in the past, especially since the core developers and main contributors exclusively use the mailing list. At least this way they can be brought into a forum transparently. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 EnterpriseDB UK

Re: [GENERAL] Critical Bug

2011-04-06 Thread Thom Brown
u're evaluating a scalar against a subquery expression, and it's the 670th record which returns more than 1 record in the subquery. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 EnterpriseDB UK: http://www.enterprisedb.com The Enterpri

[GENERAL] Non-capturing expressions

2014-10-25 Thread Thom Brown
Hi all, It must be that I haven't had enough caffeine today, but I can't figure out why the following expression captures the non-capturing part of the text: # SELECT regexp_matches('postgres','(?:g)r'); regexp_matches {gr} (1 row) I'm expecting '{r}' in the output as I though

Re: [GENERAL] Non-capturing expressions

2014-10-25 Thread Thom Brown
On 25 October 2014 11:49, Francisco Olarte wrote: > Hi Thom: > > On Sat, Oct 25, 2014 at 11:24 AM, Thom Brown wrote: > >> It must be that I haven't had enough caffeine today, but I can't figure >> out why the following expression captures the non-capturin

Re: [GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-28 Thread Thom Brown
On 28 October 2014 15:10, Andrus wrote: > Hi! > > I'm looking for finding ealiest possible start times from reservations > table. > > People work from 10:00AM to 21:00PM in every week day except Sunday and > public holidays. > > Jobs for them are reserved at 15 minute intervals and whole job must

Re: [GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-28 Thread Thom Brown
On 28 October 2014 19:14, Andrus wrote: > Hi! > > >Would you be able to adapt this to your needs?: > > Thank you very much. > Great solution. > I refactored it as shown below. > Query returns only dates for single day. Changing limit clause to 300 > does not return next day. > How to retur

Re: [GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-28 Thread Thom Brown
On 28 October 2014 20:04, Thom Brown wrote: > On 28 October 2014 19:14, Andrus wrote: > >> Hi! >> >> >Would you be able to adapt this to your needs?: >> >> Thank you very much. >> Great solution. >> I refactored it as shown below. >>

Re: [GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-28 Thread Thom Brown
On 28 October 2014 21:07, Andrus wrote: > Hi! > > >A correction to this. As it stands, it will show times like the > following: > > Thank you. > I posted your solution as alternative to Erwin answer in > > http://stackoverflow.com/questions/26608683/how-to-find-first-free-start-times-from-r

Re: [GENERAL] What is default password for user postgres

2014-12-01 Thread Thom Brown
On 1 December 2014 at 09:08, M Tarkeshwar Rao wrote: > Hi all, > > > > I installed version 9.1 in my Ubuntu OS, but not able to login. > > What is default password for user Postgres? > The postgres user doesn't have a password by default, which is probably how you should keep it. Typically the

Re: [GENERAL] regex help wanted

2013-04-25 Thread Thom Brown
On 25 April 2013 15:32, Tom Lane wrote: > Karsten Hilbert writes: >> What I don't understand is: Why does the following return a >> substring ? > >> select substring ('junk $$ junk' from >> '\$<[^<]+?::[^:]+?>\$'); > > There's a perfectly valid match in which [^<]+? matches allergy::test >

Re: [GENERAL] UPDATE using 3 medium-sized tables causes runaway hash table and fills disk

2013-04-29 Thread Thom Brown
On 26 April 2013 15:39, Rowan Collins wrote: > Hi All, > > I've come upon some very strange behaviour with an UPDATE query which causes > Postgres to consume all the disk space on the server for no apparent reason. > > Basically, I'm trying to run an UPDATE involving three medium-sized tables > (~

Re: [GENERAL] "Unlogged indexes"

2013-05-03 Thread Thom Brown
On 3 May 2013 21:06, Yang Zhang wrote: > Guessing the answer's no, but is there any way to construct indexes > such that I can safely put them on (faster) volatile storage? (Just to > be clear, I'm asking about indexes for *logged* tables.) Yes: CREATE INDEX ... TABLESPACE tablespacename; ALTER

Re: [GENERAL] Foreign Key violated

2013-05-23 Thread Thom Brown
On 23 May 2013 10:15, Keith Fiske wrote: > Client reported an issue where it appears a foreign key has been violated > > prod=#\d rma_items > [snip] > rma_items_rma_id_status_fk" FOREIGN KEY (rma_id, rma_status) REFERENCES > rmas(id, status) ON UPDATE CASCADE ON DELETE CASCADE > > prod=# select i.

Re: [GENERAL] Foreign Key violated

2013-05-29 Thread Thom Brown
On 23 May 2013 15:33, Thom Brown wrote: > On 23 May 2013 10:15, Keith Fiske wrote: >> Client reported an issue where it appears a foreign key has been violated >> >> prod=#\d rma_items >> [snip] >> rma_items_rma_id_status_fk" FOREIGN KEY (rma_id, rma_sta

Re: [GENERAL] ~/.psqlrc file is ignored

2017-07-19 Thread Thom Brown
On 18 July 2017 at 19:02, vstuart wrote: > My ~/.psqlrc file is ignored by my PostgreSQL installation (v.9.6.3; Arch > Linux x86_64 platform). > > Suggestions? Do you get anything with "psql -a"? If not, what do you get when you use "psql -af ~/.psqlrc" ? Thom -- Sent via pgsql-general maili

Re: [GENERAL] ~/.psqlrc file is ignored

2017-07-21 Thread Thom Brown
On 19 July 2017 at 20:12, vstuart wrote: > Hi David: I see what you are saying; sorry for the confusion. This is how > postgres operates on my system: > > [victoria@victoria ~]$ echo $HOME > /home/victoria > > [victoria@victoria ~]$ which postgres > /usr/bin/postgres > > [victoria@victoria ~]$

[GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Thom Brown
Hi all, We're migrating the contents of an old MSSQL server to PostgreSQL 8.3.7, so a full conversion is required. Does anyone know of any guides which highlight common gotchas and other userful information? Thanks Thom

Re: [GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Thom Brown
> That's going to depend a lot on how many features of the database you > were using...especially higher level features like stored procedures. > Converting the schema and the data shouldn't be too bad -- there are a > number of relatively easy ways to do it including microsoft DTS > levering the p

  1   2   3   4   5   6   >