Thread: Date Style

Date Style

From
Alan Roberto Romaniuc
Date:
Hi everyone.

    I just discovered how to change datestyle in ALL  POSTGRESQl, but i
would like to set diferent datestyle in every database, example:
       createdb t1
       createdb t2
       createdb t3

       t1 has ISO,US
       t2 has ISO,European
       t3 has SQL,European.

     I ve tryed to change using set datestyle inside every database, but
when i log in again in that database, datestyle is system default
(PGDATESTYLE) again.

Anyone can help me?


Re: Date Style

From
Tom Lane
Date:
Alan Roberto Romaniuc <romaniuc@klais.com.br> writes:
>     I just discovered how to change datestyle in ALL  POSTGRESQl, but i
> would like to set diferent datestyle in every database, example:

In 7.3 you can set per-database or per-user defaults.  See ALTER
DATABASE and ALTER USER.

            regards, tom lane


Hide column in a view?

From
"Juliet May"
Date:
Is it possible to hide a column in a view so that it is only accessible to
postgresql and no other application. We are syncing a view in postgresql
with an application that does not allow you to create a column with the name
oid, however the psqlodbc driver requires the oid column in order to sync
with the postgresql database. Since the view does not contain the oid or
ctid column I selected them as part of the view definition. This works great
until we try to download the database and create it on the mobile
application.

Thanks for any help you can provide.

Julie


Re: Hide column in a view?

From
"Patrick Hatcher"
Date:
In ODBC, it's a setting.  You can turn if off.  Look click the Datasource
button on your ODBC entry.

>>We are syncing a view in postgresql
>>with an application that does not allow you to create a column with the
name
>>oid, however the psqlodbc driver requires the oid column in order to sync
>>with the postgresql database.

Patrick Hatcher
Macys.Com
Legacy Integration Developer
415-422-1610 office
HatcherPT - AIM


Re: Hide column in a view?

From
"Juliet May"
Date:
That option was already turned off. The problem is that views do not have
oids as system columns, yet the psqlodbc driver is looking for an oid column
when it tries to access a view. In order to provide the psqlodbc driver with
the oid column it was looking for we had to include the oid column in the
select statement in our definition of the view. Since it is now seen as a
user column the setting on the odbc panel does not affect it.

----- Original Message -----
From: "Patrick Hatcher" <PHatcher@macys.com>
To: <jmay@speark.com>
Cc: <pgsql-novice@postgresql.org>; <pgsql-novice-owner@postgresql.org>
Sent: Wednesday, April 16, 2003 9:53 AM
Subject: Re: [NOVICE] Hide column in a view?


>
> In ODBC, it's a setting.  You can turn if off.  Look click the Datasource
> button on your ODBC entry.


Re: Hide column in a view?

From
"Patrick Hatcher"
Date:
How about disabling the Updatable Cursors in the ODBC?  I had a problem
with a view showing error message: Attribute "oid" not found until I
unchecked it.





                    "Juliet May"
                    <jmay@speark.c       To:     "Patrick Hatcher" <PHatcher@macys.com>
                    om>                  cc:     <pgsql-novice@postgresql.org>,
                                          <pgsql-novice-owner@postgresql.org>
                    04/16/2003           Subject:     Re: [NOVICE] Hide column in a view?
                    09:38 AM





That option was already turned off. The problem is that views do not have
oids as system columns, yet the psqlodbc driver is looking for an oid
column
when it tries to access a view. In order to provide the psqlodbc driver
with
the oid column it was looking for we had to include the oid column in the
select statement in our definition of the view. Since it is now seen as a
user column the setting on the odbc panel does not affect it.

----- Original Message -----
From: "Patrick Hatcher" <PHatcher@macys.com>
To: <jmay@speark.com>
Cc: <pgsql-novice@postgresql.org>; <pgsql-novice-owner@postgresql.org>
Sent: Wednesday, April 16, 2003 9:53 AM
Subject: Re: [NOVICE] Hide column in a view?


>
> In ODBC, it's a setting.  You can turn if off.  Look click the Datasource
> button on your ODBC entry.