Hi all,
I recently wanted to declare a CHECK constraint to ensure that a JSON value
was an object with keys that were scalars (not nested objects or arrays).
This proved to be more difficult than I had expected. In the end, I had to
write a json_typeof() function in pl/pgsql. It's a simple funct
Hi all.
I have a function that has an attribute with datatype of character varying.
In the pg_type table the oid of the data type points to type varchar
Is there somewhere that identifies the alias for each type?
E.g.
int4 = integer
varchar = character varying.
and so on.
I can do an if statem
On Wed, Jun 12, 2013 at 9:02 AM, Andrew Tipton wrote:
> Hi all,
>
> I recently wanted to declare a CHECK constraint to ensure that a JSON value
> was an object with keys that were scalars (not nested objects or arrays).
> This proved to be more difficult than I had expected. In the end, I had to
Hello,
I am working on an extension which defines a number of user-defined
functions which will operate on a common, custom data type to perform a
pipeline of transformations (the data type is the IN/OUT parameter for all
of the functions), eventually being supplied to a sink function which takes
Rebecca Clarke escribió:
> Hi all.
>
> I have a function that has an attribute with datatype of character varying.
> In the pg_type table the oid of the data type points to type varchar
>
> Is there somewhere that identifies the alias for each type?
Cast the type name to regtype. That outputs t
Stephen Scheck writes:
> "Never modify the contents of a pass-by-reference input value. If you do so
> you are likely to corrupt on-disk data, since the pointer you are given
> might point directly into a disk buffer. The sole exception to this rule is
> explained in Section 35.10."
> If the UDTs
Hmm, that might work - so allocate the values in a transaction-scoped
memory context?
But how would the hash table keys themselves be deleted? Is there some
callback API to
hook transaction completion?
On Wed, Jun 12, 2013 at 1:07 PM, Tom Lane wrote:
> Stephen Scheck writes:
> > "Never modify
Stephen Scheck writes:
> But how would the hash table keys themselves be deleted? Is there some
> callback API to hook transaction completion?
See RegisterXactCallback and RegisterSubXactCallback.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@
Hi,
>From two columns in my table I want to get a unified count for the values in
these columns.
As an example, two columns are:
Table: reports
| type| place |
-
| one | home|
| two
On Jun 13, 2013, at 24:09, chuydb wrote:
> Hi,
> From two columns in my table I want to get a unified count for the values in
> these columns.
> As an example, two columns are:
>
> Table: reports
> | type| place |
> -
> |
On Wed, Jun 12, 2013 at 3:09 PM, chuydb wrote:
> Im trying to get something like this: (one column with my types grouped
> together and multiple columns with the count vales for each place)
> I get:
> | type| home| school | work|
> cafe|
Thanks for your quick answer...!
Ill try this out to see if I can get it working.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Get-multiple-columns-with-counts-from-one-table-tp5758977p5758981.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com
Stephen Scheck writes:
> However, whenever I run one of the UDTs defined in bar, I get this error
> message:
> dev=# SELECT * FROM test1 WHERE (info(bar_dat)).some_prop = 10;
> ERROR: could not load library
> "/vol/data/home/postgres/pg-builds/9.2.4/lib/bar.so":
> /vol/data/home/postgres/pg-buil
Tom,
Not sure what you mean by "oid" system:
[postgres@dev1 lib]$ uname -a
Linux dev1 2.6.35.14-106.fc14.x86_64 #1 SMP Wed Nov 23 13:07:52 UTC 2011
x86_64 x86_64 x86_64 GNU/Linux
[postgres@dev1 lib]$ ldd bar.so
linux-vdso.so.1 => (0x7fff1c7ff000)
libc.so.6 => /lib64/libc.so.
14 matches
Mail list logo