On Fri, May 22, 2015 at 5:52 AM, Piotr Gasidło wrote:
> Got strange problem. Unable to repeat, but got logs.
>
> Simple master-slave using streaming replication.
> Master is running. Slave is down.
> Segment 00044C4D0090 was successfully archived and send
> from master to slave.
>
> No
On 05/21/2015 09:04 PM, Alvaro Herrera wrote:
Adrian Klaver wrote:
SELECT
extract (
YEAR
FROM
school_day ) AS YEAR,
Reformatting courtesy of pgFormatter(http://sqlformat.darold.net/).
FWIW I think this indenting of FROM inside an extract() call is odd and
ugly -
Adrian Klaver wrote:
> SELECT
> extract (
> YEAR
> FROM
> school_day ) AS YEAR,
> Reformatting courtesy of pgFormatter(http://sqlformat.darold.net/).
FWIW I think this indenting of FROM inside an extract() call is odd and
ugly --- probably just an accident resulting from
On 05/21/2015 11:56 AM, Steve Crawford wrote:
On 05/21/2015 10:45 AM, Paul Jungwirth wrote:
You really shouldn't use WITHOUT TIME ZONE.
I'd like to know more about this. Can you say why?
Start by reading about the date and time data types with special
attention to section 8.5.3:
www.postgres
On Thu, 21 May 2015 13:57:24 -0400
Tom Lane wrote:
> Bill Moran writes:
> > My other question: is there a specific reason why PostgreSQL doesn't support
> > this syntax, aside from "nobody has bothered to add such support"? Because
> > I'm considering writing a patch to Postgres and submitting i
On 05/21/2015 11:02 AM, Daniel Torres wrote:
Sorry, forgot to told you what I'm trying, I have climate data and want
to obtain mean temperature and total precipitation and that sort of
things per month and year. Think date_trunc is a good solution, but any
other advice would be very welcome.
As
On Fri, May 22, 2015 at 6:52 AM, Piotr Gasidło
wrote:
> Got strange problem. Unable to repeat, but got logs.
>
> Simple master-slave using streaming replication.
> Master is running. Slave is down.
> Segment 00044C4D0090 was successfully archived and send
> from master to slave.
>
> N
On 21/05/15 04:23, Peter Swartz wrote:
> I'm creating a foreign table (foo_table) in database_a. foo_table lives in
> database_b.foo_table has an enum (bar_type) as one of its columns. Because
> this enum is in database_b, the creation of the foreign table fails in
> database_a. database_a doesn't
Ted,
* Ted Toth (txt...@gmail.com) wrote:
> I'd also expect that the "rewrite" would have added the POLICY SELECT
> USING clause to the query but I don't see any indication of that in
> the details that follow:
Just running 'explain' should show the policy.
Are you running this as the owner of t
I'm work on understanding and implementing RLS. Since I work on
systems using SELinux (MLS policy) I'm using the sepgsql module that
I've modified slightly i.e. I've added a function named
sepgsql_check_row_perm that I'm using in the policy for example I have
a 'reports' table that looks like:
> It's probably worth noting that both the Ruby 'best practice' AND
> Postgres have a failure case when dealing with future dates precisely
> because they are storing the data as UTC with a time zone. This is
> one case where storing the data WITHOUT TIME ZONE would actually save
> your bacon.
>
On Thu, May 21, 2015 at 1:34 PM, Martijn van Oosterhout
wrote:
> On Thu, May 21, 2015 at 12:39:01PM -0700, Andy Chambers wrote:
> > Hey All,
> >
> > I've started trying to use foreign key constraints in my schema but it
> > seems to make it more difficult to write unit tests that touch the
> data
On Thu, May 21, 2015 at 5:27 PM, Thomas Kellerer wrote:
> Postgres does not store the time zone. When storing a timestamp with time
> zone, it
> is normalized to UTC based on the timezone of the client. When you retrieve
> it,
> it is adjusted to the time zone of the client.
>
Sorry, I misspoke.
what you've said above is incorrect.
All "WITH TIME ZONE" does is tell PostgreSQL to apply timezone
conversions during various operations. The stored data is represented
as an epoch without any concept of the source data's timezone
representation.
Oh, very interesting! Thank you for pointing th
On Thu, May 21, 2015 at 01:33:46PM -0700, Dave Owens wrote:
> >
> > I know some say your unit tests shouldn't touch the DB but the more full
> > stack tests I have, the better I sleep at night :-))
> >
>
> Unit tests really should be about testing individual bits of logic. Does a
> single method
> Anyway, I agree that you have to store the time zone *somewhere*, and I
> suppose that's the reason Joshua remarked that you really shouldn't use
> WITHOUT TIME ZONE. And often a time has one perspective that is
> "canonical" or "preferred", e.g. the time zone of the user who created
> the ob
Brian Dunavant wrote on 21.05.2015 21:51:
It's probably worth noting that both the Ruby 'best practice' AND
Postgres have a failure case when dealing with future dates precisely
because they are storing the data as UTC with a time zone. This is
one case where storing the data WITHOUT TIME ZONE w
On Thu, May 21, 2015 at 2:10 PM, Paul Jungwirth wrote:
> Anyway, I agree that you have to store the time zone *somewhere*, and I
> suppose that's the reason Joshua remarked that you really shouldn't use
> WITHOUT TIME ZONE. And often a time has one perspective that is "canonical"
> or "preferred"
On Thu, May 21, 2015 at 1:33 PM, Nicolas Paris wrote:
> Hi,
>
> To me this would be great. Why not the ability to restrict lines too
> COPY stafflist (userid, username, staffid)
> FROM 'myfile.txt'
> WITH (FORMAT text, DELIMITER E'\t', COLUMNS (1, 2, 7),
> LINES(2:1000,2000:3000), ENCODING 'windo
Hi Steve,
Thanks for such a thorough response! I agree that time is a lot trickier
and trappier than one might expect, so it's good to learn how others
grapple with it.
> Your original question had to do with month/year.
Just to clarify, that was Daniel's original question, but you're
reply
Got strange problem. Unable to repeat, but got logs.
Simple master-slave using streaming replication.
Master is running. Slave is down.
Segment 00044C4D0090 was successfully archived and send
from master to slave.
Now I've started slave, and:
ay 21 21:23:37 d8 postgres[50645]: [3-1]
I understand what you want with regards to skipping columns in input, but
rather than wait to see if that feature is added to a future version of
PostgreSQL, probably the best work around is to
1. CREATE an intermediate table with all columns in the input text file.
2. COPY into the intermediate
>
> I know some say your unit tests shouldn't touch the DB but the more full
> stack tests I have, the better I sleep at night :-))
>
Unit tests really should be about testing individual bits of logic. Does a
single method do the desired thing, and not the undesired thing...
Ideally, your data ac
On Thu, May 21, 2015 at 12:39:01PM -0700, Andy Chambers wrote:
> Hey All,
>
> I've started trying to use foreign key constraints in my schema but it
> seems to make it more difficult to write unit tests that touch the database
> because each test now requires more setup data to satisfy the foreign
Hi,
To me this would be great. Why not the ability to restrict lines too
COPY stafflist (userid, username, staffid)
FROM 'myfile.txt'
WITH (FORMAT text, DELIMITER E'\t', COLUMNS (1, 2, 7),
LINES(2:1000,2000:3000), ENCODING 'windows-1250')
=> subset of full data.
2015-05-21 22:25 GMT+02:00 Stefa
Hi,
Maybe I need to clarify a little.
The suggested option “[SKIP] COLUMNS ”
would contain columns' positions in the file so that only some of the columns
in a text file would be read into a table.
Example: copy the first, second and seventh columns form myfile.txt into table
"stafflist". myf
On May 21, 2015 11:56:52 AM Steve Crawford wrote:
> The article does also display a couple attitudes that I feel are especially
> rampant in the web-development community. The first is that web developers
> shouldn't become educated about the capabilities of a database but rather
> use the database
It's probably worth noting that both the Ruby 'best practice' AND
Postgres have a failure case when dealing with future dates precisely
because they are storing the data as UTC with a time zone. This is
one case where storing the data WITHOUT TIME ZONE would actually save
your bacon.
>From the po
Hey All,
I've started trying to use foreign key constraints in my schema but it
seems to make it more difficult to write unit tests that touch the database
because each test now requires more setup data to satisfy the foreign key
constraint. (I know some say your unit tests shouldn't touch the DB
On May 21, 2015 06:04:37 PM Brown, Joseph E.
wrote:
> Unsubscribe pgsql-general
This doesn't work. See the footer of the posts to the
mailing list.
On 05/21/2015 10:45 AM, Paul Jungwirth wrote:
You really shouldn't use WITHOUT TIME ZONE.
I'd like to know more about this. Can you say why?
Start by reading about the date and time data types with special
attention to section 8.5.3:
www.postgresql.org/docs/current/static/datatype-datetime.
You will want to setup your replication user to connect to PostgreSQL
directly. Going through pgBouncer is asking for trouble.
-Joseph Kregloh
Since you did not specify your O/S and PostgreSQL version, I'll just
point you to the documentation for 9.1.
We're using CentOS 6.5 with PostgreSQL 9.4.1.
Like the original post mentioned, we use a hot standby for replication.
The question is whether we can do the hot standby through pgbouncer
Since you did not specify your O/S and PostgreSQL version, I'll just point
you to the documentation for 9.1.
http://www.postgresql.org/docs/9.1/interactive/different-replication-solutions.html
It looks very much to me like you are trying to use a hammer to turn a
screw. pg_bouncer is not designed
Unsubscribe pgsql-general
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Tom Lane
Sent: Thursday, May 21, 2015 1:57 PM
To: Bill Moran
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Allowing postgresql to accept
Sorry, forgot to told you what I'm trying, I have climate data and want to
obtain mean temperature and total precipitation and that sort of things per
month and year. Think date_trunc is a good solution, but any other advice
would be very welcome.
(I need to read more about time zones, I'm new at
On 5/21/15 12:12 PM, Andomar wrote:
> Hi,
>
> Today I installed pgbouncer. I added a second installation as a hot
> standby. Before starting the standby, I configured "recovery.conf" to
> connect to pgbouncer.
>
> This results in an error message:
>
> Pooler Error: Unsupported startup para
Bill Moran writes:
> My other question: is there a specific reason why PostgreSQL doesn't support
> this syntax, aside from "nobody has bothered to add such support"? Because
> I'm considering writing a patch to Postgres and submitting it, but I'm not
> going to go down that path if there's a spec
I'm doubtful. Why do you think you need such a capability?
For simplicity. If I can replicate through pgbouncer, I'll need only
one open port on the machine. Postgres would just listen on localhost.
If not, I'll have to make Postgres listen on an interface on a different
port.
-Andomar
You really shouldn't use WITHOUT TIME ZONE.
I'd like to know more about this. Can you say why? Are there any
articles you'd recommend? I'm fond of normalizing all times to UTC and
only presenting them in a time zone when I know the current
"perspective". I've written about that approach in a
On 05/21/2015 10:01 AM, Daniel Torres wrote:
I everybody, I'm new in the Postgresql world, and have an easy
question: Is it possible to have date type data that only contain
month and year?, how can I obtain that from a timestamp (without time
zone) column?...
Others have offered good tips bu
On 05/21/2015 10:01 AM, Daniel Torres wrote:
I everybody, I'm new in the Postgresql world, and have an easy question:
Is it possible to have date type data that only contain month and year?,
how can I obtain that from a timestamp (without time zone) column?
I've made this, but I think the result
On Thursday, May 21, 2015, Daniel Torres wrote:
> I everybody, I'm new in the Postgresql world, and have an easy question:
> Is it possible to have date type data that only contain month and year?,
> how can I obtain that from a timestamp (without time zone) column?
>
> I've made this, but I thin
Is it possible to have date type data that only contain month and year?,
how can I obtain that from a timestamp (without time zone) column?
I think you want date_trunc, which will cut everything down to the first
of the month, e.g 2015-01-01, 2015-02-01, etc. The results will still be
dates, s
On Thu, May 21, 2015 at 12:01 PM, Daniel Torres wrote:
> I everybody, I'm new in the Postgresql world, and have an easy question:
> Is it possible to have date type data that only contain month and year?,
> how can I obtain that from a timestamp (without time zone) column?
>
> I've made this, but
I everybody, I'm new in the Postgresql world, and have an easy question: Is
it possible to have date type data that only contain month and year?, how
can I obtain that from a timestamp (without time zone) column?
I've made this, but I think the result is a text, not a date
select extract (Year fr
On Thursday, May 21, 2015, Andomar wrote:
> Hi,
>
> Today I installed pgbouncer. I added a second installation as a hot
> standby. Before starting the standby, I configured "recovery.conf" to
> connect to pgbouncer.
>
> This results in an error message:
>
> Pooler Error: Unsupported startup
On Thu, May 21, 2015 at 11:33 AM, Steve Midgley wrote:
> I would update the IDs using SQL before dumping if possible. If necessary
> clone the tables, adjust the IDs and then dump. SQL has better tools than
> most languages/scripts to adjust values in columns across multiple
> entities. Plus it s
I would update the IDs using SQL before dumping if possible. If necessary
clone the tables, adjust the IDs and then dump. SQL has better tools than
most languages/scripts to adjust values in columns across multiple
entities. Plus it should be easier to build some test queries in SQL to
validate tha
Hi Folks:
I'm looking at directions or help in extracting data from production and
alter employee id information while extracting. But at the same time
maintain referential integrity across tables. Is it possible to dump data
to flat file and then run some script to change emp id data on all file
Hi,
Today I installed pgbouncer. I added a second installation as a hot
standby. Before starting the standby, I configured "recovery.conf" to
connect to pgbouncer.
This results in an error message:
Pooler Error: Unsupported startup parameter: replication
Is it possible to replicate ov
I'm working on a project converting a bunch of code from another database
system to PostgreSQL.
One of the issues is that the previous system accepted integers and binary
data in the same hex format as C ... i.e. 0xff
I understand that the proper way to handle this in postgres is x'ff', but
the
52 matches
Mail list logo