I beleieve that every information system has the needs to send emails.
Currently PostgreSQL doesn't have a function which gets TEXT and return true if it's valid email address (x...@yyy.com / .co.ZZ)
Do you believe such function should exist in PostgreSQL or it's best to let every user to implement
aviour you report.
Best regards
Nick
> On 27 Jul 2017, at 00:40, Peter Geoghegan wrote:
>
>> On Wed, Jul 26, 2017 at 2:05 PM, Peter Geoghegan wrote:
>>> On Tue, Jul 25, 2017 at 10:34 PM, Nick Brennan wrote:
>>> We've added duplicate indexes and analyzing,
(sorry for the top post, bitchy K9 Mail)
James,
are you sure you're scp'ing from the archive, not from pg_xlog?
Regards,
Gunnar "Nick" Bluth
Am 27. Juli 2017 05:00:17 MESZ schrieb James Sewell :
>Hi all,
>
>I've got two servers (A,B) which are part of a
efore.
All indexes show valid in pg_indexes.
We have tried increasing effective_cache_size but no effect (the queries
appear to go slower). The DB is 24x7 so we cannot reindex the tables/
partitions.
Can anyone suggest why this would be happening?
Many thanks
Nick
This is a join in a middle of query.
How can I use dynamic SQL in the middle of query?ב מאי 15, 2017 20:26, David G. Johnston כתב:On Mon, May 15, 2017 at 10:02 AM, Nick Dro <postgre...@walla.co.il> wrote:
Hi, I'm new to postgresql and couldn't find answer to this situation anywhe
Hi, I'm new to postgresql and couldn't find answer to this situation anywhere. I asked this here: http://stackoverflow.com/questions/43984208/coditional-join-of-query-using-postgresqlI hope there is a better solution rather than creating two separated functions :(
(sorry for the toppost, mobile device)
What you're looking for is pg_basebackup with - - xlog=stream, I guess.
Regards,
Nick
Am 17. Februar 2017 14:06:36 MEZ schrieb Gabriel Ortiz Lour
:
>Hi all,
>I've been searching for a way to initialize a new Hot Standby node
e done is:
on p2:
select * from pg_replication_origin;
will show all origins on p2, find the origin for p1;
on p3:
select pg_replication_origin_create('[origin name]');
Discussed here:
https://github.com/2ndQuadrant/pglogical/issues/23
Please ignore previous message;
Regards,
The solution was found thanks to Petr Jelinek from 2ndQ.
> Cascading wasn't much of a priority so far.
> Currently you have to create the origin manually using
> pg_replication_origin_create().
> I plan to make this work seamlessly in the future release.
So whats needed to be done is:
on p1:
Nevermind, I misunderstood your question.
The answer is an outer join and if you want the exact output you provided then
you can use the following clause.
coalesce(dx, dx1) as date
Is there any reason why these are two different tables? I'd consider changing
data structure.
- Original Mes
Whats exactly is wrong with the following query?
select
dx date,
nx,
nx1
from
test t
join test1 t1 on t.dx=t1.dx1
;
- Original Message -
From: "Tim Smith"
To: "pgsql-general"
Sent: Thursday, July 14, 2016 2:56:19 PM
Subject: [GENERAL] Me
I already tried to contact them, but no luck so far.
Although it seems to me that the change-set is actually forwarded, its the
decoding that is failing on the receiving host. Check the log output for p2 and
p3 in my previous message.
Regards,
Nick.
- Original Message -
From: "J
G: worker process: pglogical apply 13294:1876007473 (PID 14180) exited with
>exit code 1
>LOG: starting apply for subscription sub_p2_to_p3_insert_only
>ERROR: cache lookup failed for replication origin
>'pgl_test_node_p1_provider_sub_p1_t06410f8'
>LOG: worke
Thanks.
I ended up using pglogical, since I don't really need Bi-directional
replication and docs for UDR suggest using pglogical instead.
Although I ran into a problem there, but pglogical seems to be the answer.
Regards,
Nick.
- Original Message -
From: "Sylvain Marechal&q
I apologize if this is wrong place to ask the question.
A quote from pglogical FAQ:
> Q. Does pglogical support cascaded replication?
> Subscribers can be configured as publishers as well thus cascaded replication
> can be achieved
> by forwarding/chaining (again no failover though).
The only m
ive solution to this?
Regards,
Nick.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 2 June 2016 at 02:43, Jeff Beck wrote:
> Hi-
> We have a master (pg 9.4.4 on Ubuntu 14.10) and a slave (pg 9.4.8 on
> Centos 7). During a period of heavy use, the slave began complaining
> that the “requested WAL segment xx has already been removed”. But
> the WAL segment was still on the m
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Am 06.05.2015 um 09:57 schrieb David G. Johnston:
Ooops, accidentaly replied to David directly...
> Wednesday, May 6, 2015, Gunnar "Nick" Bluth
> mailto:gunnar.bl...@pro-open.de>>
> wrote:
>
> -BEGIN PGP SIGNED
(1 row)
I'm completely puzzled by this behaviour; at least it should cast the
"locale_specific" value into the JSON output, shouldn't it?
What am I missing? Any hints appreciated!
- --
Gunnar "Nick" Bluth
RHCE/SCLA
Mobil +49 172 8853339
Email: gunnar.bl...@pro-ope
> letters.. So my guestion is if it is possible to get the correct
> sort order without recreating all my databases or initialize
> PGSQL?
>
Sure (i.e., if you're on a half recent version):
ALTER TABLE ALTER COLUMN COLLATE
http://www.postgresql.org/docs/9.4/static/sql-alt
On Sat, Oct 11, 2014 at 5:01 AM, Adrian Klaver
wrote:
> On 10/10/2014 10:41 AM, Nick Barnes wrote:
>
>
>> I understand why the FK insert needs to lock on the PK row. But why is
>> the PK delete trying to lock the FK row? If it finds one, won't the
>> delete fai
On Sat, Oct 11, 2014 at 1:32 AM, Tom Lane wrote:
> Nick Barnes writes:
> > I'm looking at the code behind the foreign key checks in ri_triggers.c,
> and
> > something's got me a little confused.
>
> > In both cases (FK insert/update checking the PK, and PK u
I'm looking at the code behind the foreign key checks in ri_triggers.c, and
something's got me a little confused.
In both cases (FK insert/update checking the PK, and PK update/delete
checking the FK) the check is done with a SELECT ... FOR KEY SHARE.
This makes perfect sense for PK checks, but i
On September 29, 2014 11:08:55 AM EDT, Jonathan Vanasco
wrote:
>
>- use a "transaction" log. every write session gets logged into the
>transaction table (serial, timestamp, user_id). all updates to the
>recorded tables include the transaction's serial. then there is a
>"transactions" table,
On September 23, 2014 2:27:29 PM EDT, Adrian Klaver
wrote:
On 09/23/2014 11:05 AM, Nick Guenther wrote:
Quoting Seref Arikan :
On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer
wrote:
Hi all
I've had some issues with how the procedural languages are packaged
in
the Wi
40eea
SHA1 (/usr/local/lib/postgresql/plpython2.so) =
4dd79641cbad3f71466648559d74e6b0c4f174a3
Any other OpenBSD users that have run into this, here?
--
Nick Guenther
4B Stats/CS
University of Waterloo
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Ah! Your reply was excellent, David. I only found it now, cleaning out
my inbox. Comments inline!
Quoting David G Johnston :
Nick Guenther wrote
As you said, attaching the trigger to a view is useless (for
BEFORE/AFTER, which I'm interested in, also only works on statement
level ch
On September 14, 2014 6:01:15 PM EDT, cowwoc wrote:
>
>On 14/09/2014 5:52 PM, Nick Guenther [via PostgreSQL] wrote:
>>
>>
>> On September 14, 2014 5:01:54 PM EDT, cowwoc <[hidden email]
>> > wrote:
>> >Hi,
>> >
>> >I'd li
On September 14, 2014 5:01:54 PM EDT, cowwoc wrote:
>Hi,
>
>I'd like to propose the ability to create temporary schemas.
>
>This would facilitate running unit tests, where developers would like
>to run
>the same creation script for unit tests and production code but do not
What if you ran a tem
On August 16, 2014 11:41:02 AM EDT, lin wrote:
>Hi all,
>I change the value of "unix_socket_directories" in postgresql.conf ,
>then restart the database, but it cannot connect the database used like
>this
>"psql -d postgres -p 5432" , it must given the parameter " -h /xx/xx"
>to use the Unix
Quoting David G Johnston :
Nick Guenther wrote
Dear List,
In principle, I am looking for some way to say
```
CREATE VIEW view13131 AS select (id, name, bank_account) from actors
where age > 22;
WATCH view13131;
```
and get output to stdout like
```
INSERT view13131 VALUES (
s and gotchas you might have to share. If I
ALTER VIEW will the triggers all fire appropriately? Can I even set
triggers on views?
Thanks in advance
-Nick Guenther
4B Stats/CS
University of Waterloo
[1] Cubes <http://cubes.databrewery.org/>
[2] CouchDB. "Filtered Replication".
We've been running 9.2 on our later branches for a while now. We're
overdue to bump the older branches to a later 8.4 though, you're right.
Thanks for the reminder.
On Thu, Jul 3, 2014 at 7:46 PM, Michael Paquier
wrote:
> On Fri, Jul 4, 2014 at 7:41 AM, Nick Cabatoff
hat turns up.
On Thu, Jul 3, 2014 at 5:35 PM, Tom Lane wrote:
> Nick Cabatoff writes:
> > I'm having trouble making sense of the these two autovacuum log entries.
> > I'm running PostgreSQL 8.4.
>
> 8.4.what?
>
> It'd probably be a good idea to monito
Hi,
I'm having trouble making sense of the these two autovacuum log entries.
I'm running PostgreSQL 8.4.
[2014-05-22 04:56:43.486 EST] {537cf2c6.30f9} LOG: automatic vacuum of
table "postgres.globaldicom.requests": index scans: 1
pages: 0 removed, 163600 remain
tuples: 5916 rem
Am 19.04.2014 12:44, schrieb Gunnar "Nick" Bluth:
Heillo,
after stumbling across compile errors for odbc_fdw I realised it was
still on the 9.1. level.
I've patched it, based on the tds_fdw code (so it's still read-only).
It does compile, and I think it is general
.com/bluthg/odbc_fdw
According notes have been added to the Foreign_data_wrappers WIKI page
as well (no need for more people to try compiling it ;-).
Cheers,
--
Gunnar "Nick" Bluth
RHCE/SCLA
Mobil +49 172 8853339
E
Hello I am new to this site and also a student. I am working on an assignment
and was wondering if there is a way to make an alias for a boolean? For
example when I am making a table called club_games and it must contain the
memberID, gameID, count, and status as column fields. When I enter the dat
d show up in pg_relation_size and
friends, but it would get sent to psql of course.
Regards,
--
Gunnar "Nick" Bluth
RHCE/SCLA
Mobil +49 172 8853339
Email: gunnar.bl...@pro-open.de
__
In 1984 mainstream users w
round, should your primary server fail. The journal replay should not
hurt you too much, as the relevant I/O PG does is sync anyway.
Just my 2p,
--
Gunnar "Nick" Bluth
RHCE/SCLA
Mobil +49 172 8853339
Email: gunnar.bl...@pro-open.de
I have a table with 40 million rows and haven't had any performance issues yet.
Are there any rules of thumb as to when a table starts getting too big?
For example, maybe if the index size is 6x the amount of ram, if the table is
10% of total disk space, etc?
--
Sent via pgsql-general mailing
My read-only streaming replication servers are showing a much higher
CPU load than I would expect.
None of my queries are longer than 10ms.
My application server is connecting to this server via pgbouncer.
Other than that, its a pretty standard setup. I haven't toyed with too
many settings besid
BTW, Its version 9.1.4 on a 2.2Ghz dual processor with 17GB of ram.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Jul 19, 1:23 pm, Nick wrote:
> My read-only streaming replication servers are showing a much higher
> CPU load than I would expect.
>
> None of my queries are longer than 10ms.
>
> My application server is connecting to this server via pgbouncer.
>
> Other than tha
For the data...
INSERT INTO test (id,val) VALUES (1,a);
INSERT INTO test (id,val) VALUES (2,a);
INSERT INTO test (id,val) VALUES (3,a);
INSERT INTO test (id,val) VALUES (4,a);
INSERT INTO test (id,val) VALUES (5,b);
INSERT INTO test (id,val) VALUES (6,b);
How could I return an even amount of val?
On Jun 4, 5:27 pm, Nick wrote:
> For the data...
>
> INSERT INTO test (id,val) VALUES (1,a);
> INSERT INTO test (id,val) VALUES (2,a);
> INSERT INTO test (id,val) VALUES (3,a);
> INSERT INTO test (id,val) VALUES (4,a);
> INSERT INTO test (id,val) VALUES (5,b);
> INSERT I
thout the syntax or equivalent to what I originally
posted. Thanks for the help anyway.
On Mon, Apr 23, 2012 at 4:19 PM, Thom Brown wrote:
> On 23 April 2012 21:49, Nick Apperson wrote:
> > There are obviously workarounds for this, but I'm wondering why the
> > following query
There are obviously workarounds for this, but I'm wondering why the
following query shouldn't work. It seems like it should. With MVCC already
present on the back-end, I can't see any reason other than additional
parsing routines that this couldn't work:
INSERT INTO old_login_id_to_new_account_id(
I followed the instructions from
http://packetcloud.net/2010/12/09/setting-up-streaming-replication-in-postgresql-9-0/
When I start the standby I get this...
LOG: database system was shut down in recovery at 2012-03-26 17:36:32
PDT
LOG: entering standby mode
cp: cannot stat `/var/lib/postgresql
What is the best way to find an event with a yearly occurrence?
CREATE TABLE events (
start_date DATE,
end_date DATE,
recurring TEXT
);
INSERT INTO events (start_date, end_date, recurring) VALUES
('2010-02-28','2010-03-01','yearly');
SELECT * FROM events WHERE (start_date+'2 YEARS'::I
I have a pretty well tuned setup, with appropriate indexes and 16GB of
available RAM. Should this be taking this long? I forced it to not use
a sequential scan and that only knocked a second off the plan.
QUERY
PLAN
--
Is it possible (in a plperl function) to know if an update is from a
foreign key cascade, rather than just a user submitted update
statement?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-genera
On Jan 17, 3:33 am, t...@audioboundary.com (Tom Molesworth) wrote:
> Hi Nick,
>
> On 17/01/12 00:18, Nick wrote:
>
>
>
>
>
>
>
>
>
> > I have three tables (users, books, pencils) and would like to get a
> > list of all users with a count and total
On Jan 17, 3:33 am, t...@audioboundary.com (Tom Molesworth) wrote:
> Hi Nick,
>
> On 17/01/12 00:18, Nick wrote:
>
>
>
>
>
>
>
>
>
> > I have three tables (users, books, pencils) and would like to get a
> > list of all users with a count and total
On Jan 17, 3:33 am, t...@audioboundary.com (Tom Molesworth) wrote:
> Hi Nick,
>
> On 17/01/12 00:18, Nick wrote:
>
>
>
>
>
>
>
>
>
> > I have three tables (users, books, pencils) and would like to get a
> > list of all users with a count and total
I have three tables (users, books, pencils) and would like to get a
list of all users with a count and total price of their books and
pencils for 2012-01-01...
So with this data...
users (user_id)
1
2
3
books (user_id, price, created)
1 | $10 | 2012-01-01
1 | $10 | 2012-01-01
3 | $10 | 2012-01-0
Thanks raymond, you were right, i never think that psql was using .pgpass
file. When a delete it psql ask me for the password.
THANKS I’ll never figure that out.
2012/1/13 Raymond O'Donnell
> On 12/01/2012 05:16, debian nick wrote:
> > I have postgresql 8.4.9 installed now, my p
I have postgresql 8.4.9 installed now, my problem is that from time to time
my postgresql let psql version 8.4.9 access the database without asking for
password (psql -d mydatabase -h myhost -U myuser), and the connection
attempts from psql 8.3 are not allowed no matter what i got time out
exceptio
I am implementing some pl/pgsql functions.
Is there any way to change the input
for example- I got some value by $1. I want to modify this value (means
split that value), Can we do this and how?
Second thing,
Suppose i defined a function test as
select test('geom',the_geom,time) from tablename
.
On Tue, May 31, 2011 at 8:50 AM, Tom Lane wrote:
> Craig Ringer writes:
> > On 05/30/2011 08:53 PM, Nick Raj wrote:
> >> Cube code provided by postgres contrib folder. It uses the NDBOX
> structure.
> >> On creating index, it's size increase at a high rate.
&g
Can some one tell me why index is becoming so large?
How to compress or reduce its size?
Thanks
Nick
On Mon, May 23, 2011 at 7:35 PM, Tom Lane wrote:
> Nick Raj writes:
> >> Andrew Sullivan wrote:
> >>> It sounds like your index can't actually be used to satisfy your
> >>> query. Without seeing the table definition, index definition, and
> >&g
On Mon, May 23, 2011 at 5:44 PM, Andreas Kretschmer <
akretsch...@spamfence.net> wrote:
> Andrew Sullivan wrote:
>
> > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote:
> > > Hi,
> > > I have build an index. When, i execute the query, it gives the re
an idea to force postgres to use index scan?
Thanks
Nick
Hi,
I have defined some function and also used NDBOX structure that having
variable length.
typedef struct NDBOX
{
int32vl_len_;/* varlena length */
unsigned int dim;
doublex[1];
} NDBOX;
When i called my function, it gives NDBOX to be null
On debugging, i foun
Hi,
#define DatumGetNDBOX(x)((NDBOX*)DatumGetPointer(x))
#define PG_GETARG_NDBOX(x)DatumGetNDBOX(
PG_DETOAST_DATUM(PG_GETARG_DATUM(x)) )
Now i have to define
#define NDBOXGetDatum(x) ()PointerGetDatum(x)
Is there any need to replace this ?? with some toastable thing or is it
suff
, 2011 at 6:42 AM, Joshua Tolley wrote:
> On Fri, May 06, 2011 at 10:43:23AM +0530, Nick Raj wrote:
> > Hi,
> > I am using postgresql-8.4.6. I want to debug the contrib/cube code. Can
> we
> > able to debug that cube code? Because there is no .configure file to
> > ena
Hi,
I am using postgresql-8.4.6. I want to debug the contrib/cube code. Can we
able to debug that cube code? Because there is no .configure file to
enable debug. Is there is any way to change make file to enable debug?
Thanks
Nick
makes pointer from
integer without a cast
../../../include/utils/timestamp.h:205: note: expected
‘FunctionCallInfo’ but argument is of type ‘unsigned int’
Can anybody figure out what kind of mistake i am doing?
Also, why it got related to 'FunctionCallInfo' ?
Thanks
Nick
Thanks dude
On Mon, Apr 18, 2011 at 2:25 PM, Chetan Suttraway <
chetan.suttra...@enterprisedb.com> wrote:
>
>
> On Fri, Apr 15, 2011 at 10:29 PM, Nick Raj wrote:
>
>> Hi,
>> Can anybody tell me how to typecast data type Point into Datum?
>>
>> Thanks
&g
Hi,
Can anybody tell me how to typecast data type Point into Datum?
Thanks
Nick
Hi,
Can anyone know how to define global variable in plpgsql?
Thanks
Regards,
Raj
Hi all,
I have defined a new data type. I have defined in and out function for that
data type.
But i want to know how to integrate this data type with postgres (how
postgres compile my code or know my datatype) ?
Thanks,
Nirmesh
lue of Datum in postgres?
On Thu, Mar 24, 2011 at 2:35 AM, Tom Lane wrote:
> Nick Raj writes:
> > In postgres, typedef uintptr_t Datum
> > Datum is getting value from PG_GETARG_POINTER(1);
> > But, now problem is how would i know the type of PG_GETARG_POINTER(1)
> > (
?? How to
find out what type of pointer argument is PG_GETARG_POINTER(1)??
Thanks,
Nirmesh
On Wed, Mar 23, 2011 at 11:40 PM, Radosław Smogura wrote:
> Nick Raj Wednesday 23 March 2011 18:45:41
> > Hi,
> > I am understanding the postgres code. In code, i just want to see what
> a
Hi,
I am understanding the postgres code. In code, i just want to see what are
values that are passing through the variables?
Can you please tell me if the variable is of type Datum, then how to print
its value? Because i dont the variable v type.
And also what the structure of Datum?
Thanks,
Raj
x27;t reject the
reflex to post this here, wow...
Please excuse & all the best, Nick
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi all,
I want to construct an "Composite Index Structure" i.e. a combination of
gist and btree.
What i am thinking is that first creating a Rtree structure that is pointing
to another Btree structure.
For example, Suppose i want to find vehicles between 2 to 4 pm on 14/2/2011
on X road.
I am thi
Hi,
I am writing some function in postgres pl/sql.
My function is of type St_ABC((select obj_geom from XYZ),(select
boundary_geom from boundary))
I have table XYZ with 20,000 tuples and in boundary, i have only one
geometry.
In postgres, ST_intersects(obj_geom, boundary_geom) checks each obj_geom
architecture will do really significantly
slower than OODBMS/ORDBMS more specialized for that sake (the same with
rules...)?? Or is it worth to give it a try?
This would be my last resort,
Nick
Although postgres at one time had "ORDBMS" as a goal, I haven't seen any
real inte
allow them to use PostgreSQL for that sake.
So I am meaning OO in a very broad sense.
All the best,
Nick
On 01/21/2011 04:10 PM, Andy Colson wrote:
Short answer: no.
Here are some counter questions for you:
Have you ever seen any actual real world usage of OORDBMS?
Are there any products
ckend constrain this in regard of performance?
Thanks a lot in advance,
Nick
)
RETURNING id INTO NEW.last_name_id
So by adding both the surrogate and natural keys to users table and
toggling the surrogate on insert by 0 (must exist) or -1 (select or
insert) I can bypass a much more complex insert statement. Is this
frowned upon? I havent had many issues (but some ive been a
Are there any existing trigger functions (preferably C) that could
retrieve a missing value for a compound foreign key on insert or
update? If this overall sounds like a really bad idea, please let me
know as well. This functionality could really speed my project up
though.
For example,
CREATE TA
Thanks Guy, is it possible to get the 3rd column result as an array
instead of string? -Nick
On Oct 14, 9:27 pm, guyr-...@burntmail.com (Guy Rouillier) wrote:
> Sure:
>
> select
> t3.id,
> coalesce
> (
> t1.title,
> t2.
Found a solution for what I need. Please let me know if you know of
something better/faster. -Nick
CREATE AGGREGATE array_accum (anyelement) (
sfunc = array_append,
stype = anyarray,
initcond = '{}'
);
SELECT id, title, array_accum(t) AS ts FROM (
SELECT 'table_one
Is it possible to get the results of this snip of a function without
using a function? All tables include an id and title column.
tables := ARRAY[table_one,table_two,table_three]::VARCHAR;
CREATE TEMP TABLE final_results (id INTEGER, title VARCHAR, r_types
VARCHAR[]);
FOR t IN ARRAY_LOWER(tables,1
...
1 | new one | [table_one,table_three]
2 | new two | [table_two,table_three]
3 | three | [table_three]
On Oct 14, 4:49 pm, Nick wrote:
> Is it possible to get the results of this snip of a function without
> using a function? All tables include an id and title column.
>
> tables := ARR
CREATE FUNCTION test() RETURNS text
LANGUAGE plpgsql
AS $$DECLARE
num_var TEXT;
BEGIN
FOR i IN 1..10 LOOP
num_var := num_var || ',' || i;
END LOOP;
RETURN num_var;
END;$$;
SELECT test();
returns NULL
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To ma
Woops, figured it out. Just needed to declare the num_var := '';
On Sep 11, 10:45 pm, Nick wrote:
> CREATE FUNCTION test() RETURNS text
> LANGUAGE plpgsql
> AS $$DECLARE
> num_var TEXT;
> BEGIN
> FOR i IN 1..10 LOOP
> num_var := num_var ||
I dont mind if the commas are at the beginning and end, im more
concerned about "three,four" staying in one row because its surrounded
by quotes. -Nick
On Sep 10, 6:03 pm, alvhe...@commandprompt.com (Alvaro Herrera) wrote:
> Excerpts from Nick's message of vie sep 10 2
Yes, that gets down to the root of my question... what is the
expression that would properly split the values? -Nick
On Sep 10, 4:43 pm, brick...@gmail.com (bricklen) wrote:
> On Fri, Sep 10, 2010 at 3:43 PM, Nick wrote:
> > What would be the regexp_split_to_table pattern that split
What would be the regexp_split_to_table pattern that splits a comma
separated string into a table? Im having trouble when a string
contains commas or there are commas at the beginning or end
String
',one,two,''three,four'',five,six,'
Should return
,one
two
three,four
five
six,
--
Sent via pgsql
On Sep 9, 2:21 am, dmit...@gmail.com (Dmitriy Igrishin) wrote:
> Hey Nick,
>
> You may do it with PL/pgSQL more easily with hstore module.
> Please, refer tohttp://www.postgresql.org/docs/9.0/static/hstore.html
> Please, look at the hstore(record) and populate_record(record, hst
I need to dynamically update NEW columns. Ive been inserting the NEW
values into a temp table, updating them, then passing the temp table
values back to NEW (is there a better way?). Ive had success with this
method unless there is a null value...
EXECUTE 'CREATE TEMP TABLE new AS SELECT $1.*' USI
Anyone? Please
On Jul 31, 12:36 pm, Nick wrote:
> If I insert a duplicate row into a table, id like to return the
> existing key.
>
> I tried creating a rule for this...
>
> CREATE RULE no_duplicates AS ON INSERT TO names WHERE EXISTS (SELECT 1
> FROM names WHERE new.na
Is this the most efficient way to write this query? Id like to get a
list of users that have the categories 1, 2, and 3?
SELECT user_id FROM user_categories WHERE category_id IN (1,2,3) GROUP
BY user_id HAVING COUNT(*) = 3
users_categories (user_id, category_id)
1 | 1
1 | 2
1 | 3
2 | 1
2 | 2
3 |
sectors_basetop.geom
or artcc.the_geom, because the last working query also works when
matching intersecting polygons with the zoa_sectors_basetop.geom. So
looks like the problem may lie in the geometry in the table
zoa_metar_xml. But can't figure why? Hope this is enough info, can
anyone help
On Jan 28, 4:32 pm, Nick wrote:
> The following query's all work fine,
>
> select distinct zoa_metar_xml.stn_id, zoa_metar_xml.metar_txt,
> zoa_metar_xml.time, zoa_metar_xml.flt_cat, zoa_metar_xml.cld_cvr,
> zoa_metar_xml.cld_base, zoa_metar_xml.lonlat, zoa_metar_xml.geom
On Jan 13, 4:21 pm, t...@sss.pgh.pa.us (Tom Lane) wrote:
> Nick writes:
> > SELECT * FROM locations WHERE id = 12345 LIMIT 1
> > uses the primary key (id) index, but...
> > SELECT * FROM locations WHERE id = get_location_id_from_ip(641923892)
> > LIMIT 1
> > does
1 - 100 of 188 matches
Mail list logo