Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Ryan Murphy
> Because I specifically aliased the first task reference using AS task_1. > > Ok, totally. I missed that when I first read your query, didn't read it closely enough. Thanks.

Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Ryan Murphy
> You're confused about the input vs. the output. The output columns > of a view all have to have distinct names, just like you can't do > "create table foo (f1 int, f1 int)". They can be reading the same > values, though. > > regards, tom lane > Ok, that makes sense. Tha

Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Ryan Murphy
> You're confused about the input vs. the output. The output columns > of a view all have to have distinct names, just like you can't do > "create table foo (f1 int, f1 int)". They can be reading the same > values, though. > > regards, tom lane > Ok, that makes sense. Tha

Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Tom Lane
Ryan Murphy writes: > Interesting, thanks! Do you know why the first one fails instead of doing > that renaming process, while your version succeeds? You're confused about the input vs. the output. The output columns of a view all have to have distinct names, just like you can't do "create tabl

Re: [GENERAL] Get date timestamp(3) without time zone column - PGSQL 9.5

2016-09-05 Thread Patrick B
Hi guys, You were right, there was something wrong with my original query: SELECT cast(tasks_start as date) FROM "tasks" WHERE (Date(tasks_start) in > ('2016-08-10'); I was able to get the expected data using the above query... Cheers Patrick

Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Adrian Klaver
On 09/05/2016 01:13 PM, Ryan Murphy wrote: Interesting, thanks! Do you know why the first one fails instead of doing that renaming process, while your version succeeds? Because I specifically aliased the first task reference using AS task_1. On Monday, September 5, 2016, Adrian Klaver mailt

Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Ryan Murphy
Interesting, thanks! Do you know why the first one fails instead of doing that renaming process, while your version succeeds? On Monday, September 5, 2016, Adrian Klaver wrote: > On 09/05/2016 12:55 PM, Ryan Murphy wrote: > >> Hello, I have a question about views in Postgres. >> >> Given a tabl

Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Adrian Klaver
On 09/05/2016 12:55 PM, Ryan Murphy wrote: Hello, I have a question about views in Postgres. Given a table like so: create table todo ( id serial, task text, done_time timestamp default null ); it is legal (though perhaps not advised, by some) to query it like so: select task, * from to

[GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Ryan Murphy
Hello, I have a question about views in Postgres. Given a table like so: create table todo ( id serial, task text, done_time timestamp default null ); it is legal (though perhaps not advised, by some) to query it like so: select task, * from todo; This gives a result with 2 redundant "ta

Re: [GENERAL] postgres driver for mysql

2016-09-05 Thread Adrian Klaver
On 09/05/2016 11:38 AM, Mimiko wrote: Hello to all. I want to move applications to postgres. But there are applications which can use only mysql or local mdb or mssql. For now I run a mysql server to which this applications are connected. Long time ago I've encountered a federeted module for mys

[GENERAL] postgres driver for mysql

2016-09-05 Thread Mimiko
Hello to all. I want to move applications to postgres. But there are applications which can use only mysql or local mdb or mssql. For now I run a mysql server to which this applications are connected. Long time ago I've encountered a federeted module for mysql to allow to store data in postgr

Re: [GENERAL] Restricted access on DataBases

2016-09-05 Thread Charles Clavadetscher
Hello On 09/05/2016 05:56 PM, Charles Clavadetscher wrote: Hello On 09/05/2016 04:19 PM, Adrian Klaver wrote: On 09/05/2016 05:45 AM, Durumdara wrote: Dear PG-masters! We want to put more databases to one server, to "public" schema: DB_A, DB_B, DB_C. The PUBLIC schema is contained within a

Re: [GENERAL] Restricted access on DataBases

2016-09-05 Thread rob stone
Hello, On Mon, 2016-09-05 at 14:45 +0200, Durumdara wrote: > Dear PG-masters! > > We want to put more databases to one server, to "public" schema: > DB_A, DB_B, DB_C. > And users: > US_A, US_B, US_C, and Main_Admin. > We want to setup the environment. > Every simple user can access his database: >

Re: [GENERAL] Restricted access on DataBases

2016-09-05 Thread Charles Clavadetscher
Hello On 09/05/2016 04:19 PM, Adrian Klaver wrote: On 09/05/2016 05:45 AM, Durumdara wrote: Dear PG-masters! We want to put more databases to one server, to "public" schema: DB_A, DB_B, DB_C. The PUBLIC schema is contained within a database not the other way around, so further explanation is

Re: [GENERAL] Restricted access on DataBases

2016-09-05 Thread Adrian Klaver
On 09/05/2016 05:45 AM, Durumdara wrote: Dear PG-masters! We want to put more databases to one server, to "public" schema: DB_A, DB_B, DB_C. The PUBLIC schema is contained within a database not the other way around, so further explanation is necessary. And users: US_A, US_B, US_C, and Main

Re: [GENERAL] Restricted access on DataBases

2016-09-05 Thread amul sul
I think, it worth to try pg_hba.conf configuration[1]. [1]. https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html Regards, Amul Sul On Mon, Sep 5, 2016 at 6:15 PM, Durumdara wrote: > Dear PG-masters! > > We want to put more databases to one server, to "public" schema: > DB_A, D

[GENERAL] Restricted access on DataBases

2016-09-05 Thread Durumdara
Dear PG-masters! We want to put more databases to one server, to "public" schema: DB_A, DB_B, DB_C. And users: US_A, US_B, US_C, and Main_Admin. We want to setup the environment. Every simple user can access his database: DB_A - US_A DB_B - US_B DB_C - US_C They can't access other databases only

Re: [GENERAL] IDE for function/stored proc development.

2016-09-05 Thread Martijn Tonies (Upscene Productions)
Good morning, >I looked at your purchase, and did not see any Postgres version. Am I missing >(/misunderstanding) something here? It’s not yet available, please wait until the end of the week That being said, the pricing will be the same as for MySQL. With regards, Martijn Tonies Upscene Prod

Re: [GENERAL] IDE for function/stored proc development.

2016-09-05 Thread Daevor The Devoted
On Mon, Sep 5, 2016 at 10:02 AM, Martijn Tonies (Upscene Productions) < m.ton...@upscene.com> wrote: > Hello Tim, > > We will be releasing Database Workbench with PostgreSQL support later this > week, it’s a Windows application but works fine on Linux/MacOS via Wine. > > Here’s the link to our web

Re: [GENERAL] IDE for function/stored proc development.

2016-09-05 Thread Martijn Tonies (Upscene Productions)
Hello Tim, We will be releasing Database Workbench with PostgreSQL support later this week, it’s a Windows application but works fine on Linux/MacOS via Wine. Here’s the link to our website, feel free to check some screenshots http://www.upscene.com/database_workbench/ With regards, Martijn To