Re: [GENERAL] Session Identifiers

2015-12-20 Thread Melvin Davidson
o postmaster.c, where these operations are > described. > > What I know, there are not any other session data - so when process is > destroyed, then all is destroyed by o.s. > > Can be totally different if you use some connection pooler like pgpool or > pgbouncer - these applic

Re: [GENERAL] how to create dump of selected rows from a table

2015-12-18 Thread Melvin Davidson
ql.org/docs/9.4/interactive/app-psql.html > > > >> Does anyone have any snippets on how to do that? >> >> Thank you >> > > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > -- > Sent via pgsql-general mailing list (pgsql-general@p

Re: [GENERAL] dblink_connect fails

2015-12-16 Thread Melvin Davidson
of viruses or other defects. If you have received >> this communication in error, you may not copy or distribute any part of >> it or otherwise disclose its contents to anyone. Please advise the >> sender of your incorrect receipt of this correspondence. >> >> > > -- &g

Re: [GENERAL] Interrupted streaming replication

2015-12-07 Thread Melvin Davidson
> prohibited. If you are not the intended recipient, please contact the > sender by reply email and destroy all copies of the original message. > Opinions, conclusions and other information in this message that do not > relate to the official business of Starpoint Solutions shall be underst

Re: [GENERAL] Selecting newly added column returns empty but only when selecting with other columns in table

2015-11-26 Thread Melvin Davidson
If I select my new column in combination with > other columns with no 'where' I get the correct value from my new column > but empty for the other columns: > > SELECT id, state, new_col FROM data limit 1; > Result: EMPTY ROW; EMPTY ROW; \x8481e7dec3650040b > > Thanks to anyo

Re: [GENERAL] Selecting newly added column returns empty but only when selecting with other columns in table

2015-11-26 Thread Melvin Davidson
s with queries that combine original columns and the new one. > > I created and filled in the new column externally using psycopg2 in Python > so I'm not sure if that could be the source of the problem... > > On Thu, Nov 26, 2015 at 5:39 PM, Melvin Davidson <melvin6...@gmail.com>

Re: [GENERAL] Selecting newly added column returns empty but only when selecting with other columns in table

2015-11-26 Thread Melvin Davidson
s in santa cruz > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Selecting newly added column returns empty but only when selecting with other columns in table

2015-11-26 Thread Melvin Davidson
titude | double precision | > geom | geometry(Point,4326) | > features_bin | bytea | > Indexes: > "ix_data_id" btree (id) > > > > > On Thu, Nov 26, 2015 at 6:19 PM, Melvin Davidson <melvin6...@gmail.com> > wrote: > >> OK, thanks fo

Re: [GENERAL] Taking lot time

2015-11-25 Thread Melvin Davidson
t; Can you Please let me know wt happen in query..?wt >> should i do.. >> >> >> And the query is? >> >> >> -- >> Adrian Klaver >> adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com> >> <mailto:adrian.kla...@aklaver.com >> <mailto:adrian.kla...@aklaver.com>> >> >> >> >> >> -- >> Adrian Klaver >> adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com> >> >> >> > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] error messages not getting logged when running script from cron

2015-11-23 Thread Melvin Davidson
> redirecting stderr to go where stdout goes. So all output is > going to the bit bucket, not the pipe. > > regards, tom lane > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://

Re: [GENERAL] current_query='IDLE" in pg_stat_activity

2015-11-23 Thread Melvin Davidson
t; > cheers, > > Chris > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or

Re: [GENERAL] Taking lot time

2015-11-18 Thread Melvin Davidson
er: (event_type = ANY ('{21,22,3,5}'::integer[]))" >>> " -> Hash (cost=20590.78..20590.78 rows=610978 width=331)" >>> "-> Seq Scan on inv_adj iad (cost=0.00..20590.78 rows=610978 >>> width=331)" >>> >>> Can yo

Re: [GENERAL] postgres zeroization of dead tuples ? i.e scrubbing dead tuples with sensitive data.

2015-11-18 Thread Melvin Davidson
Herrerahttp://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] postgres zeroization of dead tuples ? i.e scrubbing dead tuples with sensitive data.

2015-11-18 Thread Melvin Davidson
> > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] postgreSQL.conf has become zero byte file

2015-11-17 Thread Melvin Davidson
hanges to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general >> > > > > -- > > Schrodinger's backup: The condition of any backup is unknown until a > restore is attempted. > > Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be. > > He's about as useful as a wax frying pan. > > 10 to the 12th power microphones = 1 Megaphone > > Maranatha! <>< > John McKown > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Querying same lookup table with multiple columns based on another view

2015-11-17 Thread Melvin Davidson
chool of Archaeology > University College Dublin > > academia.edu/KillianDriscoll <https://ucd.academia.edu/KillianDriscoll> > www.lithicsireland.ie > ca.linkedin.com/in/killiandriscoll > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] can postgres run well on NFS mounted partitions?

2015-11-16 Thread Melvin Davidson
ruption more obvious. > > Yours, > Laurenz Albe > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL]

2015-11-13 Thread Melvin Davidson
; pg_restore: [archiver (db)] Error while PROCESSING TOC: > pg_restore: [archiver (db)] Error from TOC entry 21; 2615 80924 > SCHEMA icare icare > pg_restore: [archiver (db)] could not execute query: ERROR: > permission denied for database icare >

[GENERAL] Re: [GENERAL] pg_restore tells schema “test” already exists but it isn't actually

2015-11-12 Thread Melvin Davidson
temp_1 > pg_toast_temp_1 > pg_catalogpublic > information_schema > > It seems like schema "test" doesn't exist yet,why do I got this kind of > error? > > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Three Variations of postgresql.conf

2015-11-12 Thread Melvin Davidson
/log/postgresql/postgresql-9.4-qa.log On Thu, Nov 12, 2015 at 11:56 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 11/12/2015 08:37 AM, Melvin Davidson wrote: > >> To clarify. >> >> To see the ACTUAL clusters installed, and the LIVE config directorie

Re: [GENERAL] Three Variations of postgresql.conf

2015-11-12 Thread Melvin Davidson
> /usr/lib/tmpfiles.d/postgresql.conf > /etc/postgresql/9.4/main/postgresql.conf > > What is the difference between these files and which is the correct one to > change for modifying the configurations contained therein? > -- *Melvin Davidson* I reserve the right to fantasize. Whe

Re: [GENERAL] Three Variations of postgresql.conf

2015-11-12 Thread Melvin Davidson
that the 9.4 version of PostgreSQL is active and will also show you the command line arguments used to start it. On Thu, Nov 12, 2015 at 11:29 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Adrian Klaver <adrian.kla...@aklaver.com> writes: > > On 11/12/2015 08:07 AM, Melvin Davidson

Re: [GENERAL] get this warning from pgAdmin

2015-11-12 Thread Melvin Davidson
stgres db. Does this > indicate a real issue? Thanks > > Running VACUUM recommended > The estimated rowcount on the table "recorder" deviates significantly from > the actual rowcount. You should run VACUUM ANALYZE on this table. > -- *Melvin Davidson* I reserve the ri

Re: [GENERAL] Slow response if pulling through pgadmin

2015-11-10 Thread Melvin Davidson
e humans don't deal well with huge data sets. > -- > Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX > Experts in Analytics, Data Architecture and PostgreSQL > Data in Trouble? Get it in Treble! http://BlueTreble.com > > > -- > Sent via pgsql-general mailing list

Re: [GENERAL] is there any difference DROP PRIMARY KEY in oracle and postgres?

2015-11-05 Thread Melvin Davidson
ete primary key I am using second approach, so is there any difference > between two? > > > > Regards > > Tarkeshwar > > > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Taking lot time

2015-11-03 Thread Melvin Davidson
ery..?wt should i do.. > > I could be way off base (again) but I think the first thing you do is > supply the query (sql). > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] does pg_dump get delayed if I have a loop that does continuous insertions

2015-10-29 Thread Melvin Davidson
if there are better ones. > > It does a lot more but: > https://github.com/wal-e/wal-e > > -- > http://yves.zioup.com > gpg: 4096R/32B0F416 > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subs

Re: [GENERAL] Importing CSV File

2015-10-27 Thread Melvin Davidson
Admin. > > Cheers, > > Jeff > > > > Whence the csv file? If it starts out in spreadsheet, can you not export > only the columns you want in the database? > > Google "postgres import tool" finds several options > > > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] psql --quiet

2015-10-27 Thread Melvin Davidson
7 ZL Hilversum > serviced...@omroep.nl, 035-6773555 > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Recursive Arrays 101

2015-10-26 Thread Melvin Davidson
e. thread >>> on ignore. >>> >>> >>> >>> I think its proof that Apple products rot your brain! >> >> >> >> >> -- >> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general >> > > > > -- > David Blomstrom > Writer & Web Designer (Mac, M$ & Linux) > www.geobop.org > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Service not starting on Ubuntu 15.04

2015-10-26 Thread Melvin Davidson
>> >> Are you sure the same script is being called in cloud-init and >> outside of it? >> >> Or more to the point, what script actually starts Postgres? >> >> >> >> >> -- >> Adrian Klaver >> adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com> >> >> >> > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Melvin Davidson
; Announcing "I'm offended" is basically telling the world you can't > control your own emotions, so everyone else should do it for you. > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] clone_schema function

2015-10-23 Thread Melvin Davidson
220 || ' ADD CONSTRAINT ' || > quote_ident(ct.conname) || ' ' || replace(pg_get_constraintdef(ct.oid), > quote_ident(source_schema) || '.', quote_ident(dest_schema) || '.') || ';' > > I'm attaching the updated script. > -- *Melvin Davidson* I reserve the r

Re: [GENERAL] interperting type oid in C code

2015-10-19 Thread Melvin Davidson
k whether Oid X refers to type > int4, or whatever? > > Thanks. > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] PSQL Tools

2015-10-18 Thread Melvin Davidson
>>> >>> >> PgAdmin fits here. >> >> >>> Regards >>> >>> John Wiencek >>> >> >> >> >> -- >> >> Regards, >> Dinesh >> manojadinesh.blogspot.com >> > > > ​I didn't know DBeaver, it looks g

Re: [GENERAL] PSQL Tools

2015-10-18 Thread Melvin Davidson
TOAD that are available for Postgresql? > > The universe of database management tools is large. In order to answer > the above, what is is that you want to do? > > > > > Regards > > > > John Wiencek > > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] question

2015-10-15 Thread Melvin Davidson
nks for your inputs! >> > > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] question

2015-10-15 Thread Melvin Davidson
x Experts >> >> >> http://openscg.com >> >> >>> >>> >>>> -bash-4.1$ ./pg_dump -t RECORDER postgres --format=t -w > /tmp/dump >>>> pg_dump: [archiver (db)] connection to database "postgres" failed: >>>&g

Re: [GENERAL] question

2015-10-15 Thread Melvin Davidson
zip > \tmp\db.out-`date +\%Y\%m\%d\%H`.gz > -bash: pg_dumpall: command not found > -bash: tmpdb.out-2015101510.gz: Permission denied > -bash-4.1$ ./pg_dumpall | gzip > \tmp\db.out-`date +\%Y\%m\%d\%H`.gz > > > Thank you so much for replying and accepting my post to

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

2015-10-07 Thread Melvin Davidson
ts? > > >> I can add some rights to user who invokes this command if this helps. >> >> Andrus. >> >> >> > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

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

2015-10-07 Thread Melvin Davidson
d by farukkugay to postgres; > drop user farukkugay ; > > This causes error > > ERROR: role "farukkugay" cannot be dropped because some objects depend on > it > DETAIL: privileges for schema public > > So even superuser cannot delete. > > Andrus. >

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

2015-10-07 Thread Melvin Davidson
s roles, assigns rights and drop users using scripts > which I provided. > Those scripts work OK on most cases. > > For some users, vantaa and farukkugan delete script causes error which I > described. For farukkugan it occurs also if running under superuser. > > So it

Re: [GENERAL] Processing data from table using awk.

2015-10-06 Thread Melvin Davidson
. Assimilated, you will be. > > He's about as useful as a wax frying pan. > > 10 to the 12th power microphones = 1 Megaphone > > Maranatha! <>< > John McKown > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] How to speed up delete where not in

2015-09-26 Thread Melvin Davidson
e NOT EXISTS version instead. > > I mocked up your tables locally, and populated them with the same number > of records as your row estimates in the EXPLAIN you pasted and I got: > > test=# delete from omdok where not exists (select 1 from omrid where > omdok.dokumn = omrid.dokumnr); > DELETE 0 > Time: 1698.233 ms > > Whereas with the NOT IN() I cancelled it after 10 minutes. > > Regards > > David Rowley > > -- > David Rowley http://www.2ndQuadrant.com/ > <http://www.2ndquadrant.com/> > PostgreSQL Development, 24x7 Support, Training & Services > > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Convert number to string

2015-09-24 Thread Melvin Davidson
ep2) > , step4(s) as (select replace(s,'oo','p') from step3) > select * from step4; > s > -- > gp > gc > ffjo > hb > (4 rows) > > clasical trick. But, as I said above, you need to specify it much better. > > Francisco Olarte. > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] postgres 9.3

2015-09-21 Thread Melvin Davidson
Support, Remote DBA, Training & Services > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] postgres 9.3

2015-09-21 Thread Melvin Davidson
ch_path to preview. > show search_path; > .. > preview. > > > when disconnect and connect database it's showing $user$:public schema not > showing preview. > > what is the problem..?how to resolve the issue...? > > > when session closed showing postgres user..even set prev

Re: [GENERAL] clone_schema function

2015-09-20 Thread Melvin Davidson
Additional revision to avoid duplicating RI_Constraint triggers. On Fri, Sep 18, 2015 at 4:09 PM, Melvin Davidson <melvin6...@gmail.com> wrote: > Revised to add rules after all tables are create to avoid error where > table referenced in rule was not created yet. > > Added

Re: [GENERAL] clone_schema function

2015-09-18 Thread Melvin Davidson
wrote: > > -- > *Von:* Melvin Davidson [melvin6...@gmail.com] > *Gesendet:* Donnerstag, 17. September 2015 17:11 > *An:* Marc Mamin > *Cc:* pgsql-general@postgresql.org > *Betreff:* Re: [GENERAL] clone_schema function > > Thanks, > > >I'm not sure why yo

Re: [GENERAL] clone_schema function

2015-09-17 Thread Melvin Davidson
ablename will be changed to destination schema name. However, since good developers and DBA's use the form of alias.column, this should rarely be a problem. On Tue, Sep 15, 2015 at 12:37 PM, Melvin Davidson <melvin6...@gmail.com> wrote: > David, > > Yes, it would be nice, but > 1

Re: [GENERAL] clone_schema function

2015-09-17 Thread Melvin Davidson
t; > > > > moreover, you don't take care of the column statistic targets > > (i.e. ALTER TABLE t ALTER COLUMN c SET STATISTICS n;) > > > > > > regards, > > > > Marc Mamin > > > > > > *From:* pgsql-general-ow...@postgresql.org [mailto:

Re: [GENERAL] clone_schema function

2015-09-15 Thread Melvin Davidson
m table “new”, which does not exists. > > Not sure, what other example you need. > > Regards, > > Igor Neyman > > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] clone_schema function

2015-09-15 Thread Melvin Davidson
nner > aided by correctly configured tools and advice. > > On Tue, Sep 15, 2015 at 12:20 PM, Melvin Davidson <melvin6...@gmail.com> > wrote: > >> Igor, >> I understand your point, however, I have spent over a week making a >> function >> that previ

Re: [GENERAL] clone_schema function

2015-09-15 Thread Melvin Davidson
obvious problem is that there is no table “new” in schema “new”, the > table will still be called “old”. > > > > Jim’s example is very similar to what I provided a few days ago. > > > > Regards, > > Igor Neyman > > > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] clone_schema function

2015-09-15 Thread Melvin Davidson
g_ example of what you think the problem is. On Tue, Sep 15, 2015 at 3:22 AM, Jim Nasby <jim.na...@bluetreble.com> wrote: > On 9/14/15 8:02 PM, Melvin Davidson wrote: > >> Actually, on further thought, you example shows that it works correctly >> because we do wan

Re: [GENERAL] clone_schema function

2015-09-14 Thread Melvin Davidson
that's also the biggest blocker for allowing extensions that refer to > other schemas to be relocatable. It would be interesting if we had some way > to handle this inside function bodies, perhaps via something equivalent to > @extschema@. > -- > Jim Nasby, Data Architect, Blue Treble Consulti

Re: [GENERAL] clone_schema function

2015-09-14 Thread Melvin Davidson
, 2015 at 8:42 PM, Melvin Davidson <melvin6...@gmail.com> wrote: > Jim, > > Have you actually tried this, or is it just a theory? AFAIK, the function > will work because only the schema name is changed.. So please provide > a full working example of a function that fai

Re: [GENERAL] clone_schema function

2015-09-12 Thread Melvin Davidson
of the schema to duplicate the problem. On Sat, Sep 12, 2015 at 10:38 AM, Daniel Verite <dan...@manitou-mail.org> wrote: > Melvin Davidson wrote: > > > "seriously flawed" is a bit of a stretch. Most sane developers would not > > have schema names of one lett

Re: [GENERAL] clone_schema function

2015-09-11 Thread Melvin Davidson
Herrera <alvhe...@2ndquadrant.com> wrote: > Melvin Davidson wrote: > > Here is one more tweak of clone_schema. > > Are you updating the wiki to match? If not (why?), I think at the very > least you should add a link in the wiki page to this thread. > > -- > Álvaro

Re: [GENERAL] clone_schema function

2015-09-11 Thread Melvin Davidson
Thank you very much Alvaro. Now I can go back to being Chief Engineer of Sleeping Late @ retired. :) On Fri, Sep 11, 2015 at 2:21 PM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > Melvin Davidson wrote: > > Alvaro, > > > > no I haven't updated the wiki (or git)

Re: [GENERAL] clone_schema function

2015-09-11 Thread Melvin Davidson
the option of using the method of dumping the schema, editing the dump and reloading. Or, I invite you to use your great skills and write a better method. On Fri, Sep 11, 2015 at 4:06 PM, Daniel Verite <dan...@manitou-mail.org> wrote: > Melvin Davidson wrote: > > > I've added e

Re: [GENERAL] clone_schema function

2015-09-11 Thread Melvin Davidson
blem, the least they can do is suggest a fix, as you have David. I'll try that and test over the weekend.. Or I also invite you to submit a fixed version. On Fri, Sep 11, 2015 at 4:39 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Sep 11, 2015 at 4:23 PM, Melvin Davi

Re: [GENERAL] clone_schema function

2015-09-11 Thread Melvin Davidson
at 11:52 AM, Melvin Davidson <melvin6...@gmail.com> wrote: > Yes, however, the documentation would be a lot clearer if it said "copies > all constraints except foreign keys". I've made this known. > > At any rate, I've attached a new version of the function that now does

Re: [GENERAL] Bugs with like_option in CREATE TABLE

2015-09-10 Thread Melvin Davidson
d, Sep 09, 2015 at 07:51:48PM -0400, Melvin Davidson wrote: > > *O/S = Windows 10PostgreSQL 9.2.10, compiled by Visual C++ build 1600, > > 32-bit* > > http://www.postgresql.org/docs/9.1/interactive/sql-createtable.html > > > > and like_option is: > > { INC

Re: [GENERAL] clone_schema function

2015-09-10 Thread Melvin Davidson
15 at 9:09 AM, Igor Neyman <iney...@perceptron.com> wrote: > > > > > *From:* Melvin Davidson [mailto:melvin6...@gmail.com] > *Sent:* Wednesday, September 09, 2015 4:48 PM > *To:* Igor Neyman <iney...@perceptron.com> > *Cc:* pgsql-general@postgresql.org &g

[GENERAL] Bugs with like_option in CREATE TABLE

2015-09-09 Thread Melvin Davidson
not bring over the Foreign Keys2. INCLUDING ALL does not work and generates an ERROR;* -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Bugs with like_option in CREATE TABLE

2015-09-09 Thread Melvin Davidson
ep 9, 2015 at 8:51 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Sep 9, 2015 at 7:51 PM, Melvin Davidson <melvin6...@gmail.com> > wrote: > >> >> >> >> *O/S = Windows 10PostgreSQL 9.2.10, compiled by Visual C++ build 1600, >

[GENERAL] clone_schema function

2015-09-09 Thread Melvin Davidson
r checking and verified that it now copies the current sequnce values, table data, views and functions. As always, use with caution. -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you. -- Function: clone_schema(text, text) -- DRO

Re: [GENERAL] clone_schema function

2015-09-09 Thread Melvin Davidson
e meantime. On Wed, Sep 9, 2015 at 3:43 PM, Igor Neyman <iney...@perceptron.com> wrote: > > > > > *From:* pgsql-general-ow...@postgresql.org [mailto: > pgsql-general-ow...@postgresql.org] *On Behalf Of *Melvin Davidson > *Sent:* Wednesday, September 09, 2015 12:31 PM

Re: [GENERAL] view

2015-09-08 Thread Melvin Davidson
i try to select view ,it had return > select * from art; > ERROR: permission denied for relation sub_item > SQL state: 42501 > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] table dependencies

2015-09-07 Thread Melvin Davidson
gt; > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up

Re: [GENERAL] Partitioning and constraint exclusion

2015-09-07 Thread Melvin Davidson
anner just use > constraint exclusion and not go for the index scan? Anyone faced a similar > issue? > > Thanks, > Jayadevan > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] get first and last row in one sql as two columns

2015-09-02 Thread Melvin Davidson
stgresql.org/wiki/First/last_(aggregate) > > I am wondering why these two functions are not part of postgresql built-in > functions as it has many use cases > > Thanks > > If you're ordering by col1, does > > select min(col1), max(col1) from table order by col1 > > not d

Re: [GENERAL] bdr admin role

2015-09-02 Thread Melvin Davidson
Oops postgres On Sep 2, 2015 6:06 PM, "Melvin Davidson" <melvin6...@gmail.com> wrote: > Initdb as user "postgred", not "postgresql" > This doc specifies to initdb with the admin user "postgres," > http://bdr-project.org/docs/stable/quickstart

Re: [GENERAL] bdr admin role

2015-09-02 Thread Melvin Davidson
Initdb as user "postgred", not "postgresql" This doc specifies to initdb with the admin user "postgres," http://bdr-project.org/docs/stable/quickstart-instances.html but if I do that the supervisor falls over with: $ cat bdr5598.log LOG: registering background worker "bdr supervisor" LOG:

Re: [GENERAL] Detecting autoincrement columns

2015-09-01 Thread Melvin Davidson
ostgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-31 Thread Melvin Davidson
gt;> Hmm... > > Reminds me about a story I was told where a programmer had used names of > his favourite footballers as labels in an assembler program! :-) > > > -Gavin > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Need Database Backup

2015-08-30 Thread Melvin Davidson
://www.postgresql.org/mailpref/pgsql-general -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Need Database Backup

2015-08-30 Thread Melvin Davidson
Adrian From Murali N Rao 5:43 AM (4 hours ago) now i have installed new os and installed PGSQL again it working now but no data On Sun, Aug 30, 2015 at 10:21 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 08/30/2015 07:13 AM, Melvin Davidson wrote: You need to recreate the database

Re: [GENERAL] Need Database Backup

2015-08-30 Thread Melvin Davidson
Good catch Adrian, Murali, Please change the restore command to C:\PostgresDB\bin\psql.exe -U postgres -d the database name -f your backup file name On Sun, Aug 30, 2015 at 10:40 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 08/30/2015 07:27 AM, Melvin Davidson wrote: Adrian From

Re: [GENERAL] Execute DDL across multiple servers in an automated manner

2015-08-28 Thread Melvin Davidson
andersonab...@gmail.com The judoka is what has: humility to learn what you teach, patience to teachwhat they learned to their fellow man and faith to believe in what you don't understand. Learn a little more every day and use it every day for the good (Jigoro Kano) -- *Melvin Davidson* I

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-25 Thread Melvin Davidson
: On Aug 24, 2015, at 6:53 PM, Melvin Davidson melvin6...@gmail.com wrote: You are right, he was probably talking about FK's. I was just so frustrated about people insisting that using ID as the primary key in every table is a good idea, I didn't bother to reply previously. I stand firm on my

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-25 Thread Melvin Davidson
Consistency in naming convention. Good suggestion! On Tue, Aug 25, 2015 at 12:33 PM, Marc Munro marc.mu...@gmail.com wrote: On Sat, 2015-08-22 at 15:15 +, Melvin Davidson wrote: I've been searching for a PostgreSQL Developer Best Practices with not much luck, so I've started my own

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-25 Thread Melvin Davidson
! -- Adrian Klaver adrian.kla...@aklaver.com -- Adrian Klaver adrian.kla...@aklaver.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- *Melvin Davidson* I reserve

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
, Thomas Kellerer spam_ea...@gmx.net wrote: Melvin Davidson schrieb am 22.08.2015 um 17:15: I've attached a file with a few starters that although are numbered, are in no special order. 2. End ALL queries with a semi-colon (;) EG: SELECT some_column FROM a_table; Although autocommit

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
: rgac...@appropriatesolutions.com skype: ray.cote -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
24, 2015 at 9:27 AM, Melvin Davidson melvin6...@gmail.com wrote: 9. 1) What happens if someone mis-types the account-id? To correct that, you also need to correct the FK field in the other dozen tables. 2) What happens when your company starts a new project (or buys a competitor

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
. On Mon, Aug 24, 2015 at 12:26 PM, Joshua D. Drake j...@commandprompt.com wrote: On 08/24/2015 08:56 AM, Melvin Davidson wrote: The serial key is the default primary key amongst every single web development environment in existence. Methinks thou doest take too much for granted. Yes

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
/mailpref/pgsql-general -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
: On 8/24/2015 9:34 AM, Melvin Davidson wrote: And again, I am talking about _database_ design, not Web apps. Letting Web developers design a database to work with their app, is a very, Very, VERY bad idea. It is far better to let DBA's and database develeopers design a good database, then to let

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
ON UPDATE CASCADE ? I believe he's talking about triggers. On Mon, Aug 24, 2015 at 8:00 PM, Berend Tober bto...@computer.org wrote: Melvin Davidson wrote: 9. 1) What happens if someone mis-types the account-id? To correct that, you also need to correct the FK field in the other

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-24 Thread Melvin Davidson
for the sake of having a unique numeric key. On Mon, Aug 24, 2015 at 8:39 PM, CaT c...@zip.com.au wrote: On Mon, Aug 24, 2015 at 08:22:17PM -0400, Melvin Davidson wrote: On Mon, Aug 24, 2015 at 8:00 PM, Berend Tober bto...@computer.org wrote: 1) What happens if someone mis-types the account

Re: [GENERAL] fastes way to retrieve segmented without using loop

2015-08-23 Thread Melvin Davidson
is unknown until a restore is attempted. Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be. He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! John McKown -- *Melvin Davidson* I reserve the right to fantasize

Re: [GENERAL] fastes way to retrieve segmented without using loop

2015-08-23 Thread Melvin Davidson
and again (even with prepared statement and using sql function). Thanks in Advance -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] fastes way to retrieve segmented without using loop

2015-08-23 Thread Melvin Davidson
Correction: SELECT DISTINCT ON EXTRACT(HOUR FROM you_time_column) * FROM table WHERE t =1 LIMIT 8; On Sun, Aug 23, 2015 at 5:38 PM, Melvin Davidson melvin6...@gmail.com wrote: Well, I would say the following might work: SELECT * FROM table WHERE t =1 LIMIT

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-22 Thread Melvin Davidson
failing, which is a lot less desirable that a simple warning. Therefore, I am trying to educate the developers in the proper method of escaping strings, instead of loading up the error log with annoying warnings. On Sat, Aug 22, 2015 at 1:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: Melvin Davidson

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-22 Thread Melvin Davidson
a...@squeakycode.net wrote: On Sat, Aug 22, 2015 at 1:16 PM, Tom Lane t...@sss.pgh.pa.us mailto: t...@sss.pgh.pa.us wrote: Melvin Davidson melvin6...@gmail.com mailto:melvin6...@gmail.com writes: Best Practice would rather be something along the lines: Avoid coding in a way

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-22 Thread Melvin Davidson
: On 8/22/2015 12:40 PM, Melvin Davidson wrote: What is occurring is that the developers are sending strings like 'Mr. M\'vey', which, if we set standard_conforming_strings = ON, would, and does, result in errors and the statement failing, which is a lot less desirable that a simple warning

[GENERAL] PostgreSQL Developer Best Practices

2015-08-22 Thread Melvin Davidson
with developers that are not familiar with PostgreSQL and are not hard and fast rules, but general guidelines. Hopefully this will result in something that brings about harmony between PostgreSQL DBA's and Developers. -- *Melvin Davidson* PostgreSQL Developer Best Practices 1. Prefix ALL

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-22 Thread Melvin Davidson
( accout_id bigint NOT NULL , Typo. So noted, I'll correct. On Sat, Aug 22, 2015 at 11:46 AM, Karsten Hilbert karsten.hilb...@gmx.net wrote: On Sat, Aug 22, 2015 at 11:15:07AM -0400, Melvin Davidson wrote: PostgreSQL Developer Best Practices 1. Prefix ALL literals with an Escape

<    1   2   3   4   5   6   7   >