Re: [GENERAL] Version management for extensions

2015-10-18 Thread Jeff Janes
On Fri, Oct 9, 2015 at 1:36 AM, Albe Laurenz 
wrote:

> Jeff Janes wrote:
> > I am facing a scenario where I have different version of an extension,
> say 1.0 and 2.0, which have
> > some different functionality between them (so not merely a bug fix), so
> people might want to continue
> > to use 1.0.
> >
> > But changes to the PostgreSQL software between major versions requires
> changes to the extension's
> > source code.
> >
> > So I  basically have 4 versions to carry:
> >
> > 1.0_for_9.4_or_before
> > 2.0_for_9.4_or_before
> > 1.0_for_9.5
> > 2.0_for_9.5
> >
> >
> > Is there some easy way to handle this?  Are there examples of existing
> modules which have a similar
> > situation (and which handle it well) on PGXN or pgfoundry or other
> public repositories?
>
> I don't think that there is an easy solution.
>
> Could some #ifdefs make the same code work for 9.4 and 9.5?
>

Probably.  But I probably shouldn't just pretend that the #ifdefs were
there all along for the already-released code. So if 1.0 was already in the
wild while 2.0 was not, you would still be left with something like:

1.0_for_9.4_or_before (perhaps make it uninstallable for new installations)
1.1_for_any_version_(so_far)
2.0_for_any_version_(so_far)

It seems like there should be some way to mark a feature-release of an
extension, versus a server-compatibility-only release (also versus a
bug-fix-in-extension release).


Cheers,

Jeff


Re: [GENERAL] PSQL Tools

2015-10-18 Thread Nicolas Paris
2015-10-19 0:08 GMT+02:00 dinesh kumar :

> On Sun, Oct 18, 2015 at 7:04 AM,  wrote:
>
>> Hello
>>
>> Is anyone aware of any tools like TOAD that are available for Postgresql?
>>
>>
> PgAdmin fits here.
>
>
>> Regards
>>
>> John Wiencek
>>
>
>
>
> --
>
> Regards,
> Dinesh
> manojadinesh.blogspot.com
>


​I didn't know DBeaver, it looks great ! (I personnally have many
bugs/freeze with pgadmin3 on ubuntu, moreover the interface is not
userfriendly)​


Re: [GENERAL] PSQL Tools

2015-10-18 Thread Melvin Davidson
PgAdmin works great on Windows and is also available for the Mac.

You can find both versions here:

http://www.pgadmin.org/download/windows.php
or
http://www.pgadmin.org/download/macosx.php

On Sun, Oct 18, 2015 at 6:37 PM, Nicolas Paris  wrote:

>
>
> 2015-10-19 0:08 GMT+02:00 dinesh kumar :
>
>> On Sun, Oct 18, 2015 at 7:04 AM,  wrote:
>>
>>> Hello
>>>
>>> Is anyone aware of any tools like TOAD that are available for Postgresql?
>>>
>>>
>> PgAdmin fits here.
>>
>>
>>> Regards
>>>
>>> John Wiencek
>>>
>>
>>
>>
>> --
>>
>> Regards,
>> Dinesh
>> manojadinesh.blogspot.com
>>
>
>
> ​I didn't know DBeaver, it looks great ! (I personnally have many
> bugs/freeze with pgadmin3 on ubuntu, moreover the interface is not
> userfriendly)​
>
>


-- 
*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 dinesh kumar
On Sun, Oct 18, 2015 at 7:04 AM,  wrote:

> Hello
>
> Is anyone aware of any tools like TOAD that are available for Postgresql?
>
>
PgAdmin fits here.


> Regards
>
> John Wiencek
>



-- 

Regards,
Dinesh
manojadinesh.blogspot.com


Re: [GENERAL] Can we make regexp processing more friendly by recognizing "\r\n" as a "newline" for "^$" purposes?

2015-10-18 Thread Francisco Olarte
Hi David:

On Sun, Oct 18, 2015 at 7:49 PM, David G. Johnston
 wrote:
> Other implementation of regular expressions handle "newline" mechanics
> related to "^" and "$" semantically instead of literally.  By that I mean
> that both "\r\n" and "\n" are considered "newlines" instead of just "\n".

Which ones ? AFAIK this kind of thing is usually done by C ( and
related ) runtimes when reading text files.

At least in my machine perl does not do it:

censored:~$ perl -e 'print( ("A\r\n" =~ /A$/) ? "matched\n" : "NO MATCH\n");'
NO MATCH
censored:~$ perl -e 'print( ("A\r\n" =~ /A.$/) ? "matched\n" : "NO MATCH\n");'
matched
censored:~$ perl -e 'print( ("A\r\n" =~ /A\s$/) ? "matched\n" : "NO MATCH\n");'
matched

Normally when reading lines in CP/M and related ( MSDOS, Windows ) the
CRT does collapse them ( and sometimes just zaps \r, or collapse any
run, or consider [\r*]\n[\r*] or ). But I normally do not see that
behaviour in regexes.

> If changing behavior is not desirable I would be content with another flag
> that would toggle such behavior.
> In code - both of these subqueries should match whereas presently only the
> first one does.
> SELECT regexp_matches(E'123\n',   E'123$', 'w');
> SELECT regexp_matches(E'123\r\n', E'123$', 'w');
> I don't know if this is server O/S dependent...but I would not expect it to
> be so.

Neither do I ( expect it to be os dep. ) , but I find the current
behaviour correct. I mean, newline stuff is OS dependent, and you
should convert when ingesting data, when matching them it should
already have been converted to whatever the language uses for newlines
( in C and perl that means \n, which needs not be \012, BTW . In unix
\n=\012 on disk, on CP/M it's \015\012 and when I worked with Mac (
before the unixy osX they use now ) it was \015, and I cannot think on
what they can use on EBCDIC machines ).

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


Re: [GENERAL] PSQL Tools

2015-10-18 Thread jwiencek3
windows or Mac OS 

- Original Message -

From: "Melvin Davidson"  
To: jwienc...@comcast.net 
Cc: "Adrian Klaver" , pgsql-general@postgresql.org 
Sent: Sunday, October 18, 2015 9:55:26 AM 
Subject: Re: [GENERAL] PSQL Tools 

PgAdmin seems to fit those requirements. It's free.and available for multiple 
platforms. 

http://www.pgadmin.org/ 

What O/S do you wish to install on? 



On Sun, Oct 18, 2015 at 10:48 AM, < jwienc...@comcast.net > wrote: 




Hello 

I am looking for a tool like TOAD for DBA's. I would like something that can 
generate/extract DDL; report manage tablespace, create explain plans, 
create/mange users, synonyms, triggers, etc. 


regards 

John Wiencek 

From: "Adrian Klaver" < adrian.kla...@aklaver.com > 
To: jwienc...@comcast.net , pgsql-general@postgresql.org 
Sent: Sunday, October 18, 2015 9:32:45 AM 
Subject: Re: [GENERAL] PSQL Tools 

On 10/18/2015 07:04 AM, jwienc...@comcast.net wrote: 
> Hello 
> 
> Is anyone aware of any tools like 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] ID column naming convention

2015-10-18 Thread Karsten Hilbert
> > Here's a real live schema using (mostly) the above approach:
> >
> > http://www.gnumed.de/~ncq/gnumed/schema/gnumed_v20/
> >
> > in case anyone is interested in taking a look.
> >
> > Karsten
> 
> Apparently (according to your naming convention) several tables (such as 
> 'clin.substance_intake') have 2 PRIMARY KEYs!!!

You've picked perhaps the most complex table in there :-)

> Can you tell us more about the database (ignoring nit-picking!)?

Sure. All the clinical tables inherit from clin.clin_root_item
which itself has a primary key (pk_item) and which, in turn,
inherits from audit.audit_fields, which, again, has a primary
key of its own (pk_audit). That is what makes several tables
appear to have more than one primary key. However, only the
top level serial column is declaratively set to be the actual
primary key of any one table. Certainly, hose columns all _do_
have the properties of primary keys.

Inheritance from clin.clin_root_item is leveraged for cross-table
search of clinical narrative, for one thing.

That table is also overly complex as it needs to take account
of patients being documented to be on treatment regimes with
a mixture of either branded drugs, possibly containing several
active substances, and generic substances without a documented
brand. That's why it is overly complex (I haven't found a
better way to implement this requirement).

Anything else you'd like to know ?

Karsten


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PSQL Tools

2015-10-18 Thread jwiencek3
Hello 

Is anyone aware of any tools like TOAD that are available for Postgresql? 

Regards 

John Wiencek 


Re: [GENERAL] PSQL Tools

2015-10-18 Thread jwiencek3

Hello 

I am looking for a tool like TOAD for DBA's. I would like something that can 
generate/extract DDL; report manage tablespace, create explain plans, 
create/mange users, synonyms, triggers, etc. 


regards 

John Wiencek 
- Original Message -

From: "Adrian Klaver"  
To: jwienc...@comcast.net, pgsql-general@postgresql.org 
Sent: Sunday, October 18, 2015 9:32:45 AM 
Subject: Re: [GENERAL] PSQL Tools 

On 10/18/2015 07:04 AM, jwienc...@comcast.net wrote: 
> Hello 
> 
> Is anyone aware of any tools like 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 



Re: [GENERAL] PSQL Tools

2015-10-18 Thread Melvin Davidson
PgAdmin seems to fit those requirements. It's free.and available for
multiple platforms.

http://www.pgadmin.org/

What O/S do you wish to install on?



On Sun, Oct 18, 2015 at 10:48 AM,  wrote:

>
> Hello
>
> I am looking for a tool like TOAD for DBA's.   I would like something that
> can generate/extract DDL; report manage tablespace, create explain plans,
> create/mange users, synonyms, triggers, etc.
>
>
> regards
>
> John Wiencek
> --
> *From: *"Adrian Klaver" 
> *To: *jwienc...@comcast.net, pgsql-general@postgresql.org
> *Sent: *Sunday, October 18, 2015 9:32:45 AM
> *Subject: *Re: [GENERAL] PSQL Tools
>
> On 10/18/2015 07:04 AM, jwienc...@comcast.net wrote:
> > Hello
> >
> > Is anyone aware of any tools like 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] PSQL Tools

2015-10-18 Thread Thomas Kellerer

jwienc...@comcast.net schrieb am 18.10.2015 um 16:04:

Is anyone aware of any tools like TOAD that are available for Postgresql?


https://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools




--
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] PSQL Tools

2015-10-18 Thread Adrian Klaver

On 10/18/2015 07:48 AM, jwienc...@comcast.net wrote:


Hello

I am looking for a tool like TOAD for DBA's.   I would like something
that can generate/extract DDL; report manage tablespace, create explain
plans, create/mange users, synonyms, triggers, etc.


Well psql can do that:):

http://www.postgresql.org/docs/9.4/interactive/app-psql.html

Though I am guessing you are looking for a GUI interface, so:

http://www.pgadmin.org/

Synonyms do not exist in the community Postgres.




regards

John Wiencek

*From: *"Adrian Klaver" 
*To: *jwienc...@comcast.net, pgsql-general@postgresql.org
*Sent: *Sunday, October 18, 2015 9:32:45 AM
*Subject: *Re: [GENERAL] PSQL Tools

On 10/18/2015 07:04 AM, jwienc...@comcast.net wrote:
 > Hello
 >
 > Is anyone aware of any tools like 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




--
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


Re: [GENERAL] PSQL Tools

2015-10-18 Thread Yves Dorfsman
On 2015-10-18 08:04, jwienc...@comcast.net wrote:
> Hello
> 
> Is anyone aware of any tools like TOAD that are available for Postgresql?

DBeaver works will all kinds of databases, DB2, Sybase, Oracle, SQLite, MySQL
and PostgreSQL. It's written in Java and runs anywhere a JVM will:

http://dbeaver.jkiss.org/


PostgreSQL only:

http://www.pgadmin.org/


-- 
http://yves.zioup.com
gpg: 4096R/32B0F416



-- 
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] PSQL Tools

2015-10-18 Thread vincent



Op 18-10-2015 om 16:04 schreef jwienc...@comcast.net:

Hello

Is anyone aware of any tools like TOAD that are available for Postgresql?

Regards

John Wiencek


There are several, I use EMS SQL-manager freeware version. The commecial 
version has more features, but the freeware version supports enough to 
get all your basic work done; browse data, modify DDL, including 
functions and triggers. It is a windows program but runs well on wine.


Re: [GENERAL] PSQL Tools

2015-10-18 Thread Adrian Klaver

On 10/18/2015 07:04 AM, jwienc...@comcast.net wrote:

Hello

Is anyone aware of any tools like 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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Can we make regexp processing more friendly by recognizing "\r\n" as a "newline" for "^$" purposes?

2015-10-18 Thread David G. Johnston
Other implementation of regular expressions handle "newline" mechanics
related to "^" and "$" semantically instead of literally.  By that I mean
that both "\r\n" and "\n" are considered "newlines" instead of just "\n".

If changing behavior is not desirable I would be content with another flag
that would toggle such behavior.

In code - both of these subqueries should match whereas presently only the
first one does.

SELECT regexp_matches(E'123\n',   E'123$', 'w');
SELECT regexp_matches(E'123\r\n', E'123$', 'w');

I don't know if this is server O/S dependent...but I would not expect it to
be so.

Having to say something like:  , 'wr'  (r =
combine-\r-with-adjacent-newline) would be OK but not ideal.  I'm not
seeing much risk in changing this particular behavior.

Thanks!

David J.

P.S. Forgive me for re-iterating the dislike of calling and describing "w"
as "weird" and "rarely useful".  I find it to be quite useful and my source
material doesn't seem particularly unusual.