> Given the following table, I would like to ensure that all the rows for an
> email that have a user defined map to the same user.
>
> CREATE TABLE person (
> id INTEGER PRIMARY KEY,
> user TEXT,
> email TEXT NOT NULL);
>
>
> What I think I'm looking for is something like this:
>
> CREATE TA
> The other line of attack would be to deprecate all the fuzzy comparison
> behavior in the geometric types, and just make it exact. Don't know how
> much pain that would add, but surely it would also subtract some.
How can we go forward about this? The current state of the operators
stand in th
>> From the above, may I presume that it is best to cluster (or sort), the
>> table based on the intended
>> BRIN column(s) before actually creating the index to insure the pages are
>> adjacent? If so, should
>> that not be included in the documentation, instead of implied?
The same question is
> - Why is PostgreSQL not using the functional index I created and why is it
> not being ordered correctly?
Your example works for me:
> hasegeli=# CREATE TABLE device_port (port text);
> CREATE TABLE
>
> hasegeli=# CREATE INDEX idx_device_port_port_proper ON device_port
> (cast_to_port(port)
> Although, I do find your output very strange. You wrote ORDER BY port, which
> is a text type. Why does Postgres order using the ordering operators of the
> "Port" data type rather than the "text" type, even though you haven't
> performed a cast?
That is an editing mistake. I mean
> hasegeli=#
> I have 2 tables and I must make asure unique values like this.
>
> table1
> id
> nr - integer
>
> table2
> id
> id_table1 - FK in Table 1
> valid_from - timestamp
>
> There must be unique values for:
> - nr - from table1
> and
> - YEAR(MIN(valid_from)) from table 2
In situations like this, I add
> Could I use lock tables to fix this? Is postgres automaticaly locking a
> table while running a trigger on that table?
You can use LOCK TABLE. See the documentation:
http://www.postgresql.org/docs/current/static/explicit-locking.html
--
Sent via pgsql-general mailing list (pgsql-general@post
> or is there something built in that I have missed?
The intarray extension in the contrib provides a GiST operator class
for int[]. That can be used with exclusion constraints:
> hasegeli=# create extension intarray;
> CREATE EXTENSION
>
> hasegeli=# create type e as enum ('a', 'b');
> CREATE T
On 24 March 2011 18:06, salah jubeh wrote:
> Hello,
>
> How can I determine the views which are using a certain view.
>
>
Name of the view can be searched on the "view_definition" column of the
"views" view of the information schema.
On 25 March 2011 19:13, salah jubeh wrote:
> Hello Guys
>
> The query in this function returns the dependency for level one. However, I
> need the dependency for all level. I am still new with plpgsql so; how can I
> use recursive function to return all dependency for all levels
>
> CREATE OR REP
> I've been using Postgres for a small project and I've been very impressed
> by its flexibility in defining new types and functions. I very much like
> having the ability to define a clean relational model and then a set of
> functions that act as the API to the data stored in my model.
>
> Does
2013-03-08 13:27:16 +0200 Emre Hasegeli :
PostgreSQL writes several following logs during the problem which I never
saw before 9.2.3:
LOG: process 4793 acquired ExclusiveLock on extension of relation
305605 of database 16396 after 2348.675 ms
I tried
* to downgrade to 9.2.2
* to disable
> Maybe it will be useful for you! Or maybe there is already some built-in way
> to treat cidr columns like ranges?
There is GiST operator class since version 9.4 and SP-GiST operator
class on version 9.6:
CREATE INDEX ON tracked_ip_address USING gist (ip_address inet_ops);
CREATE INDEX ON track
2014-03-23, Andreas Joseph Krogh :
> I'm trying to define the following exclusion-constraint
>
>
> *alter table *my_table *add EXCLUDE USING gist *(is_default *WITH *=,
> *daterange*(valid_from, valid_to, *'[)'*) *WITH *&&) *WHERE *(is_default =
> *true*);
>
> is_default should not be in the ind
14 matches
Mail list logo