public inbox for [email protected]help / color / mirror / Atom feed
How to get the data from the query 3+ messages / 2 participants [nested] [flat]
* How to get the data from the query @ 2025-04-27 01:06 David G. Johnston <[email protected]> 0 siblings, 2 replies; 3+ messages in thread From: David G. Johnston @ 2025-04-27 01:06 UTC (permalink / raw) To: Igor Korot <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> On Saturday, April 26, 2025, Igor Korot <[email protected]> wrote: > but the size comes out "" (empty) > > What is the value you are expecting? What is the minimal table definition (i.e., a one or few column table) that would produce this expected value? What does psql show if you use it to output the query against that table? David J. ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to get the data from the query @ 2025-04-27 05:44 Igor Korot <[email protected]> parent: David G. Johnston <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: Igor Korot @ 2025-04-27 05:44 UTC (permalink / raw) To: David G. Johnston <[email protected]>; pgsql-generallists.postgresql.org <[email protected]> Hi, David, On Sat, Apr 26, 2025 at 8:06 PM David G. Johnston <[email protected]> wrote: > > On Saturday, April 26, 2025, Igor Korot <[email protected]> wrote: >> >> but the size comes out "" (empty) >> > > What is the value you are expecting? Expecting to have "100". What is the minimal table definition (i.e., a one or few column table) that would produce this expected value? CREATE TABLE IF NOT EXISTS leagues(id integer primary key, name varchar(100), drafttype integer, scoringtype integer, roundvalues integer, leaguetype char(5), salary integer, benchplayers integer); Field "name" should be 100. What does psql show if you use it to output the query against that table? draft=# SELECT column_name, data_type, character_maximum_length, numeric_precision, table_name FROM information_schema.columns WHERE column_name = 'name' ORDER BY tabl e_name; column_name | data_type | character_maximum_length | numeric_precision | table_name -------------+-------------------+--------------------------+-------------------+--------------------------------- name | text | | | abcß name | character varying | 100 | | leagues name | name | | | pg_available_extension_versions name | name | | | pg_available_extensions name | text | | | pg_config name | text | | | pg_cursors name | text | | | pg_file_settings name | text | | | pg_prepared_statements name | text | | | pg_settings name | text | | | pg_shmem_allocations name | text | | | pg_stat_slru name | text | | | pg_timezone_names name | character varying | 70 | | players name | character varying | 50 | | teams (14 rows) draft=# Query is shorter, but it gives the result of 100. Let me try the full one from my code... Thank you. > > David J. > ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to get the data from the query @ 2025-04-27 05:53 Igor Korot <[email protected]> parent: David G. Johnston <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: Igor Korot @ 2025-04-27 05:53 UTC (permalink / raw) To: David G. Johnston <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> Now this query still works: [code] draft=# SELECT DISTINCT column_name, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_precision_radix, numeric_scale, is_nullabl e, column_default, ordinal_position FROM information_schema.columns WHERE table_name='leagues' ORDER BY ordinal_position; column_name | data_type | character_maximum_length | character_octet_length | numeric_precision | numeric_precision_radix | numeric_scale | is_nullable | col umn_default | ordinal_position --------------+-------------------+--------------------------+------------------------+-------------------+-------------------------+---------------+-------------+---- ------------+------------------ id | integer | | | 32 | 2 | 0 | NO | | 1 name | character varying | 100 | 400 | | | | YES | | 2 drafttype | integer | | | 32 | 2 | 0 | YES | | 3 scoringtype | integer | | | 32 | 2 | 0 | YES | | 4 roundvalues | integer | | | 32 | 2 | 0 | YES | | 5 leaguetype | character | 5 | 20 | | | | YES | | 6 salary | integer | | | 32 | 2 | 0 | YES | | 7 benchplayers | integer | | | 32 | 2 | 0 | YES | | 8 (8 rows) [/code] Thank you. On Sat, Apr 26, 2025 at 8:06 PM David G. Johnston <[email protected]> wrote: > > On Saturday, April 26, 2025, Igor Korot <[email protected]> wrote: >> >> but the size comes out "" (empty) >> > > What is the value you are expecting? What is the minimal table definition (i.e., a one or few column table) that would produce this expected value? What does psql show if you use it to output the query against that table? > > David J. > ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-04-27 05:53 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-04-27 01:06 How to get the data from the query David G. Johnston <[email protected]> 2025-04-27 05:44 ` Igor Korot <[email protected]> 2025-04-27 05:53 ` Igor Korot <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox