> On Jul 3, 2024, at 13:24, Kent Dorfman wrote:
> Is it SQL standard or postgres specific?
It's not in the SQL standard (at the bottom of each page for each SQL command
is a note regarding its relationship with the SQL standard). Other DBMS
implement something similar, however.
On 7/3/24 15:30, Christophe Pettus wrote:
On Jul 3, 2024, at 12:28, Kent Dorfman wrote:
Is there any psql function/command to add a description field to a table or
view definition in the system?
Allow me to introduce you to my good friend "COMMENT":
https://www.postgresql.org/docs/
Στις 3/7/24 22:28, ο/η Kent Dorfman έγραψε:
I think I already know the answer but asking here is probably quicker
turnaround than researching it.
I've gotten into a "view bloat" scenario with many many custom views
that I cannot remember what they actually do. Is there any psql
function/comm
Quick example:
xof=# CREATE TABLE t1 (id SERIAL PRIMARY KEY);
CREATE TABLE
xof=# CREATE TABLE t2 (id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY);
CREATE TABLE
xof=# \d+
List of relations
Schema | Name| Type | Owner | Persistence | Access meth
Comment is probably what you’re looking for.
If you don’t want to use that: it’s a database. Make a table. Put whatever
information in there that you need.
Either look up by view name, or schema + view name, or oid:
https://www.postgresql.org/docs/current/datatype-oid.html
> On Jul 3, 2024, at
> On Jul 3, 2024, at 12:28, Kent Dorfman wrote:
>
> Is there any psql function/command to add a description field to a table or
> view definition in the system?
Allow me to introduce you to my good friend "COMMENT":
https://www.postgresql.org/docs/current/sql-comment.html
I think I already know the answer but asking here is probably quicker
turnaround than researching it.
I've gotten into a "view bloat" scenario with many many custom views
that I cannot remember what they actually do. Is there any psql
function/command to add a description field to a table or
Hello everyone,
We are doing a POC on postgres HA setup with streaming replication (async)
using pgpool-II as a load balancing & connection pooling and repmgr for
setting up HA & automatic failover.
We are applying a test case, like isolating the VM1 node from the Network
completely for more than
clippe...@gmx.fr writes:
> I don't know if it is the right mailing list, but i was
> wondering if one could introspect via gdb the content of PGresult.
You might have better luck with that if you install the debuginfo
RPM corresponding to your libpq RPM. PGresult's innards are not
exposed to appl
On Wed, 3 Jul 2024, Adrian Klaver wrote:
alter table array_conv alter column email type varchar[] using array[email];
select * from array_conv ;
id |email
+-
1 | {adrian.kla...@aklaver.com}
2 | {akla...@example.com}
Adrian,
Given my inexperience
On 7/3/24 07:13, Rich Shepard wrote:
On Wed, 3 Jul 2024, David G. Johnston wrote:
Yeah, the simply cast suggested will not work. You’d have to apply an
expression that turns the current contents into an array. The current
contents are not likely to be an array literal.
David,
No, it's not no
On 2024-07-03 07:13:47 -0700, Rich Shepard wrote:
> On Wed, 3 Jul 2024, David G. Johnston wrote:
> > Yeah, the simply cast suggested will not work. You’d have to apply an
> > expression that turns the current contents into an array. The current
> > contents are not likely to be an array literal.
>
On Wed, Jul 3, 2024 at 7:13 AM Rich Shepard
wrote:
> On Wed, 3 Jul 2024, David G. Johnston wrote:
>
> > Yeah, the simply cast suggested will not work. You’d have to apply an
> > expression that turns the current contents into an array. The current
> > contents are not likely to be an array litera
Check this out
https://www.postgresql.org/docs/16/arrays.html#ARRAYS-INPUT
You can use
('{' || email || '}')::varchar(64)[]
or the syntax I suggested earlier.
On Wed, Jul 3, 2024 at 4:13 PM Rich Shepard
wrote:
> On Wed, 3 Jul 2024, David G. Johnston wrote:
>
> > Yeah, the simply cast sugge
On Wed, 3 Jul 2024, David G. Johnston wrote:
Yeah, the simply cast suggested will not work. You’d have to apply an
expression that turns the current contents into an array. The current
contents are not likely to be an array literal.
David,
No, it's not now an array.
I thought that this expre
The USING phrase basically answers the question how do I convert an
existing value of the old type to the new type.
On Wed, Jul 3, 2024 at 4:03 PM Rich Shepard
wrote:
> On Wed, 3 Jul 2024, Rich Shepard wrote:
>
> > What I've tried:
> > bustrac=# alter table people alter column email set data typ
On Wednesday, July 3, 2024, Rich Shepard wrote:
> On Wed, 3 Jul 2024, Rich Shepard wrote:
>
> What I've tried:
>> bustrac=# alter table people alter column email set data type varchar(64)
>> [];
>> ERROR: column "email" cannot be cast automatically to type character
>> varying[]
>> HINT: You mi
You could try
ALTER TABLE ... SET TYPE TEXT[] USING ARRAY[email]::TEXT[]
something along these lines.
On Wed, Jul 3, 2024 at 3:58 PM Rich Shepard
wrote:
> On Tue, 2 Jul 2024, Christophe Pettus wrote:
>
> > To be clear, I wasn't suggesting stuffing them all into a text column
> with
> > a delim
On Wed, 3 Jul 2024, Rich Shepard wrote:
What I've tried:
bustrac=# alter table people alter column email set data type varchar(64) [];
ERROR: column "email" cannot be cast automatically to type character
varying[]
HINT: You might need to specify "USING email::character varying(64)[]".
What
On Wednesday, July 3, 2024, Rich Shepard wrote:
>
> I'm not using the proper syntax and the postgres alter table doc has no
> example in the alter column choices.
Simpler syntax forms tend to get skipped over when doing examples.
>
> How do I incorporate the "USING email::..." string?
>
ALTE
On Tue, 2 Jul 2024, Christophe Pettus wrote:
To be clear, I wasn't suggesting stuffing them all into a text column with
a delimiter, but storing them in a text *array* field, each email address
one component of the array.
Christophe,
I'm not using the proper syntax and the postgres alter tabl
On Tue, 2024-07-02 at 18:13 +0200, clippe...@gmx.fr wrote:
>
> Hi all
> I don't know if it is the right mailing list, but i was wondering if
> one could introspect via gdb the content of PGresult.
> In my case i got a coredump and when i tried to analyze the core and
> try to print the content of
Hi all
I don't know if it is the right mailing list, but i was wondering if one could introspect via gdb the content of PGresult.
In my case i got a coredump and when i tried to analyze the core and try to print the content of PGresult i got incomplete type
I'm using libpq-13.3 (installed via
23 matches
Mail list logo